diff options
author | ted.mielczarek@gmail.com <ted.mielczarek@gmail.com@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2010-08-16 16:48:59 +0000 |
---|---|---|
committer | ted.mielczarek@gmail.com <ted.mielczarek@gmail.com@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2010-08-16 16:48:59 +0000 |
commit | 14889c340ffe6edeb362232318a8723a96b43a22 (patch) | |
tree | 9b46975cb11d44d50b726c43ae8200a7b212b742 /src/client/mac/tests | |
parent | Put MachIPC into the google_breakpad namespace (diff) | |
download | breakpad-14889c340ffe6edeb362232318a8723a96b43a22.tar.xz |
Change ClientInfo into a class to match other platforms, rename the current ClientInfo to ExceptionInfo
R=mark at http://breakpad.appspot.com/156001/show
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@651 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/client/mac/tests')
-rw-r--r-- | src/client/mac/tests/crash_generation_server_test.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/client/mac/tests/crash_generation_server_test.cc b/src/client/mac/tests/crash_generation_server_test.cc index 6f225337..1ea5bf16 100644 --- a/src/client/mac/tests/crash_generation_server_test.cc +++ b/src/client/mac/tests/crash_generation_server_test.cc @@ -60,6 +60,8 @@ public: char mach_port_name[128]; // Filename of the last dump that was generated string last_dump_name; + // PID of the child process + pid_t child_pid; // A temp dir AutoTempDir temp_dir; // Counter just to ensure that we don't hit the same port again @@ -69,6 +71,7 @@ public: sprintf(mach_port_name, "com.google.breakpad.ServerTest.%d.%d", getpid(), CrashGenerationServerTest::i++); + child_pid = (pid_t)-1; } }; int CrashGenerationServerTest::i = 0; @@ -127,6 +130,7 @@ void dumpCallback(void *context, const ClientInfo &client_info, reinterpret_cast<CrashGenerationServerTest*>(context); if (!file_path.empty()) self->last_dump_name = file_path; + self->child_pid = client_info.pid(); } } @@ -170,7 +174,9 @@ TEST_F(CrashGenerationServerTest, testRequestDump) { ASSERT_FALSE(last_dump_name.empty()); struct stat st; EXPECT_EQ(0, stat(last_dump_name.c_str(), &st)); - EXPECT_LT(0, st.st_size); + EXPECT_LT(0, st.st_size); + // check client's PID + ASSERT_EQ(pid, child_pid); } static void Crasher() { |