diff --git a/src/client/linux/minidump_writer/linux_ptrace_dumper_unittest.cc b/src/client/linux/minidump_writer/linux_ptrace_dumper_unittest.cc index 59b7c61b..d693df32 100644 --- a/src/client/linux/minidump_writer/linux_ptrace_dumper_unittest.cc +++ b/src/client/linux/minidump_writer/linux_ptrace_dumper_unittest.cc @@ -80,8 +80,8 @@ pid_t SetupChildProcess(int number_of_threads) { string helper_path(GetHelperBinary()); if (helper_path.empty()) { - ADD_FAILURE() << "Couldn't find helper binary"; - return -1; + fprintf(stderr, "Couldn't find helper binary\n"); + _exit(1); } // Pass the pipe fd and the number of threads as arguments. @@ -94,8 +94,9 @@ pid_t SetupChildProcess(int number_of_threads) { NULL); // Kill if we get here. printf("Errno from exec: %d", errno); - ADD_FAILURE() << "Exec of " << helper_path << " failed: " << strerror(errno); - return -1; + std::string err_str = "Exec of " + helper_path + " failed"; + perror(err_str.c_str()); + _exit(1); } close(fds[1]); diff --git a/src/client/linux/minidump_writer/minidump_writer_unittest.cc b/src/client/linux/minidump_writer/minidump_writer_unittest.cc index b9d8cd0d..f3b78a22 100644 --- a/src/client/linux/minidump_writer/minidump_writer_unittest.cc +++ b/src/client/linux/minidump_writer/minidump_writer_unittest.cc @@ -241,7 +241,8 @@ TEST(MinidumpWriterTest, StacksSkippedIfRequested) { // pass an invalid principal mapping address, which will force // WriteMinidump to not dump any thread stacks. ASSERT_TRUE(WriteMinidump(templ.c_str(), child, &context, sizeof(context), - true, 0x0102030405060708, false)); + true, static_cast(0x0102030405060708ull), + false)); // Read the minidump. And ensure that no thread memory was dumped. Minidump minidump(templ); @@ -286,7 +287,12 @@ TEST(MinidumpWriterTest, StacksAreSanitizedIfRequested) { Minidump minidump(templ); ASSERT_TRUE(minidump.Read()); - const uintptr_t defaced = 0X0DEFACED0DEFACEDull; + const uintptr_t defaced = +#if defined(__LP64__) + 0x0defaced0defaced; +#else + 0x0defaced; +#endif MinidumpThreadList *threads = minidump.GetThreadList(); for (unsigned int i = 0; i < threads->thread_count(); ++i) { MinidumpThread *thread = threads->GetThreadAtIndex(i);