diff options
author | ted.mielczarek <ted.mielczarek@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2012-04-11 20:44:09 +0000 |
---|---|---|
committer | ted.mielczarek <ted.mielczarek@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2012-04-11 20:44:09 +0000 |
commit | 789eac95fdbb6313922a9d15889444e9dedfceb9 (patch) | |
tree | d054878bb06fb3ebdfd34ada8d55d21947fda1be | |
parent | Fix crash_generator error message (diff) | |
download | breakpad-789eac95fdbb6313922a9d15889444e9dedfceb9.tar.xz |
Fix file descriptor leaks in ExternalDumper test
Patch by Chris Dearman <chris@mips.com>
R=ted at http://breakpad.appspot.com/372002/
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@951 4c0a9323-5329-0410-9bdc-e9ce6186880e
-rw-r--r-- | src/client/linux/handler/exception_handler_unittest.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/client/linux/handler/exception_handler_unittest.cc b/src/client/linux/handler/exception_handler_unittest.cc index f8024f26..84fc08ed 100644 --- a/src/client/linux/handler/exception_handler_unittest.cc +++ b/src/client/linux/handler/exception_handler_unittest.cc @@ -736,6 +736,7 @@ TEST(ExceptionHandlerTest, ExternalDumper) { ASSERT_EQ(n, kCrashContextSize); ASSERT_EQ(msg.msg_controllen, kControlMsgSize); ASSERT_EQ(msg.msg_flags, 0); + ASSERT_EQ(close(fds[0]), 0); pid_t crashing_pid = -1; int signal_fd = -1; @@ -764,6 +765,7 @@ TEST(ExceptionHandlerTest, ExternalDumper) { kCrashContextSize)); static const char b = 0; HANDLE_EINTR(write(signal_fd, &b, 1)); + ASSERT_EQ(close(signal_fd), 0); int status; ASSERT_NE(HANDLE_EINTR(waitpid(child, &status, 0)), -1); |