OLD | NEW |
1 // Copyright 2014 The Crashpad Authors. All rights reserved. | 1 // Copyright 2014 The Crashpad Authors. All rights reserved. |
2 // | 2 // |
3 // Licensed under the Apache License, Version 2.0 (the "License"); | 3 // Licensed under the Apache License, Version 2.0 (the "License"); |
4 // you may not use this file except in compliance with the License. | 4 // you may not use this file except in compliance with the License. |
5 // You may obtain a copy of the License at | 5 // You may obtain a copy of the License at |
6 // | 6 // |
7 // http://www.apache.org/licenses/LICENSE-2.0 | 7 // http://www.apache.org/licenses/LICENSE-2.0 |
8 // | 8 // |
9 // Unless required by applicable law or agreed to in writing, software | 9 // Unless required by applicable law or agreed to in writing, software |
10 // distributed under the License is distributed on an "AS IS" BASIS, | 10 // distributed under the License is distributed on an "AS IS" BASIS, |
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
435 TestGetExceptionPorts( | 435 TestGetExceptionPorts( |
436 other_thread_ports, thread_handler, EXCEPTION_STATE_IDENTITY); | 436 other_thread_ports, thread_handler, EXCEPTION_STATE_IDENTITY); |
437 } | 437 } |
438 | 438 |
439 // Let the child process know that everything in the parent process is set | 439 // Let the child process know that everything in the parent process is set |
440 // up. | 440 // up. |
441 c = '\0'; | 441 c = '\0'; |
442 CheckedWriteFD(WritePipeFD(), &c, 1); | 442 CheckedWriteFD(WritePipeFD(), &c, 1); |
443 | 443 |
444 if (who_crashes_ != kNobodyCrashes) { | 444 if (who_crashes_ != kNobodyCrashes) { |
445 kern_return_t kr = MachMessageServer::Run(this, | 445 kern_return_t kr = |
446 local_port, | 446 MachMessageServer::Run(this, |
447 MACH_MSG_OPTION_NONE, | 447 local_port, |
448 MachMessageServer::kOneShot, | 448 MACH_MSG_OPTION_NONE, |
449 MachMessageServer::kBlocking, | 449 MachMessageServer::kOneShot, |
450 0); | 450 MachMessageServer::kBlocking, |
| 451 MachMessageServer::kReceiveLargeError, |
| 452 0); |
451 EXPECT_EQ(KERN_SUCCESS, kr) | 453 EXPECT_EQ(KERN_SUCCESS, kr) |
452 << MachErrorMessage(kr, "MachMessageServer::Run"); | 454 << MachErrorMessage(kr, "MachMessageServer::Run"); |
453 | 455 |
454 EXPECT_TRUE(handled_); | 456 EXPECT_TRUE(handled_); |
455 } | 457 } |
456 | 458 |
457 // Wait for the child process to exit or terminate, as indicated by it | 459 // Wait for the child process to exit or terminate, as indicated by it |
458 // closing its pipe. This keeps LocalPort() alive in the child as | 460 // closing its pipe. This keeps LocalPort() alive in the child as |
459 // RemotePort(), for the child’s use in its TestGetExceptionPorts(). | 461 // RemotePort(), for the child’s use in its TestGetExceptionPorts(). |
460 CheckedReadFDAtEOF(ReadPipeFD()); | 462 CheckedReadFDAtEOF(ReadPipeFD()); |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
568 if (geteuid() == 0) { | 570 if (geteuid() == 0) { |
569 EXPECT_TRUE(rv); | 571 EXPECT_TRUE(rv); |
570 } else { | 572 } else { |
571 EXPECT_FALSE(rv); | 573 EXPECT_FALSE(rv); |
572 } | 574 } |
573 } | 575 } |
574 | 576 |
575 } // namespace | 577 } // namespace |
576 } // namespace test | 578 } // namespace test |
577 } // namespace crashpad | 579 } // namespace crashpad |
OLD | NEW |