From efbe428d832769f6ddb09e2b9cdba796e196e6af Mon Sep 17 00:00:00 2001 From: "ted.mielczarek" Date: Mon, 13 Dec 2010 22:10:32 +0000 Subject: Add some unit tests for the mac MinidumpGenerator R=mark at http://breakpad.appspot.com/240001/show git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@742 4c0a9323-5329-0410-9bdc-e9ce6186880e --- src/client/mac/tests/exception_handler_test.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/client/mac/tests/exception_handler_test.cc') diff --git a/src/client/mac/tests/exception_handler_test.cc b/src/client/mac/tests/exception_handler_test.cc index 004bc8e7..ae2e0513 100644 --- a/src/client/mac/tests/exception_handler_test.cc +++ b/src/client/mac/tests/exception_handler_test.cc @@ -155,7 +155,7 @@ TEST_F(ExceptionHandlerTest, DumpChildProcess) { pid_t pid = fork(); if (pid == 0) { // In the child process - close(fds[0]); + close(fds[1]); // Send parent process the task and thread ports. MachSendMessage child_message(0); @@ -168,12 +168,12 @@ TEST_F(ExceptionHandlerTest, DumpChildProcess) { // Wait for the parent process. uint8_t data; - read(fds[1], &data, 1); + read(fds[0], &data, 1); exit(0); } // In the parent process. ASSERT_NE(-1, pid); - close(fds[1]); + close(fds[0]); // Read the child's task and thread ports. MachReceiveMessage child_message; @@ -200,7 +200,7 @@ TEST_F(ExceptionHandlerTest, DumpChildProcess) { // Unblock child process uint8_t data = 1; - (void)write(fds[0], &data, 1); + (void)write(fds[1], &data, 1); // Child process should have exited with a zero status. int ret; -- cgit v1.2.1