aboutsummaryrefslogtreecommitdiff
path: root/src/client/mac/tests/exception_handler_test.cc
diff options
context:
space:
mode:
authorted.mielczarek <ted.mielczarek@4c0a9323-5329-0410-9bdc-e9ce6186880e>2010-12-13 22:10:32 +0000
committerted.mielczarek <ted.mielczarek@4c0a9323-5329-0410-9bdc-e9ce6186880e>2010-12-13 22:10:32 +0000
commitefbe428d832769f6ddb09e2b9cdba796e196e6af (patch)
tree29482b1f954a26d349bf5539a9adf001fc8bf25e /src/client/mac/tests/exception_handler_test.cc
parentallow passing info about known memory mappings to MinidumpWriter and Exceptio... (diff)
downloadbreakpad-efbe428d832769f6ddb09e2b9cdba796e196e6af.tar.xz
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
Diffstat (limited to 'src/client/mac/tests/exception_handler_test.cc')
-rw-r--r--src/client/mac/tests/exception_handler_test.cc8
1 files changed, 4 insertions, 4 deletions
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;