aboutsummaryrefslogtreecommitdiff
path: root/src/client/mac/tests/exception_handler_test.cc
diff options
context:
space:
mode:
authorqsr@chromium.org <qsr@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2011-11-23 14:22:05 +0000
committerqsr@chromium.org <qsr@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2011-11-23 14:22:05 +0000
commitbad70be095dd93ecc9c28bab90bed0c86fbdedca (patch)
tree6f6a1ac9584f998128dbe5f0e4a4bbc254fb788b /src/client/mac/tests/exception_handler_test.cc
parentRename md5.c to md5.cc, put its contents inside the google_breakpad namespace. (diff)
downloadbreakpad-bad70be095dd93ecc9c28bab90bed0c86fbdedca.tar.xz
Correct compilation warning.
1) Modify src/common/mac/macho_walker.cc to remove a signed vs unsigned comparison. 2) Replace mktemp in test using AutoTmpDir that has been moved from client/mac/tests to common/tests. Review URL: http://breakpad.appspot.com/328001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@888 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.cc28
1 files changed, 15 insertions, 13 deletions
diff --git a/src/client/mac/tests/exception_handler_test.cc b/src/client/mac/tests/exception_handler_test.cc
index b1b74ef1..02ff0f56 100644
--- a/src/client/mac/tests/exception_handler_test.cc
+++ b/src/client/mac/tests/exception_handler_test.cc
@@ -36,8 +36,8 @@
#include "breakpad_googletest_includes.h"
#include "client/mac/handler/exception_handler.h"
-#include "client/mac/tests/auto_tempdir.h"
#include "common/mac/MachIPC.h"
+#include "common/tests/auto_tempdir.h"
#include "google_breakpad/processor/minidump.h"
namespace google_breakpad {
@@ -103,7 +103,7 @@ TEST_F(ExceptionHandlerTest, InProcess) {
if (pid == 0) {
// In the child process.
close(fds[0]);
- ExceptionHandler eh(tempDir.path, NULL, MDCallback, &fds[1], true, NULL);
+ ExceptionHandler eh(tempDir.path(), NULL, MDCallback, &fds[1], true, NULL);
// crash
SoonToCrash();
// not reached
@@ -141,7 +141,8 @@ static bool DumpNameMDCallback(const char *dump_dir, const char *file_name,
}
TEST_F(ExceptionHandlerTest, WriteMinidump) {
- ExceptionHandler eh(tempDir.path, NULL, DumpNameMDCallback, this, true, NULL);
+ ExceptionHandler eh(tempDir.path(), NULL, DumpNameMDCallback, this, true,
+ NULL);
ASSERT_TRUE(eh.WriteMinidump());
// Ensure that minidump file exists and is > 0 bytes.
@@ -159,7 +160,8 @@ TEST_F(ExceptionHandlerTest, WriteMinidump) {
}
TEST_F(ExceptionHandlerTest, WriteMinidumpWithException) {
- ExceptionHandler eh(tempDir.path, NULL, DumpNameMDCallback, this, true, NULL);
+ ExceptionHandler eh(tempDir.path(), NULL, DumpNameMDCallback, this, true,
+ NULL);
ASSERT_TRUE(eh.WriteMinidump(true));
// Ensure that minidump file exists and is > 0 bytes.
@@ -227,10 +229,10 @@ TEST_F(ExceptionHandlerTest, DumpChildProcess) {
// Write a minidump of the child process.
bool result = ExceptionHandler::WriteMinidumpForChild(child_task,
- child_thread,
- tempDir.path,
- DumpNameMDCallback,
- this);
+ child_thread,
+ tempDir.path(),
+ DumpNameMDCallback,
+ this);
ASSERT_EQ(true, result);
// Ensure that minidump file exists and is > 0 bytes.
@@ -267,7 +269,7 @@ TEST_F(ExceptionHandlerTest, InstructionPointerMemory) {
pid_t pid = fork();
if (pid == 0) {
close(fds[0]);
- ExceptionHandler eh(tempDir.path, NULL, MDCallback, &fds[1], true, NULL);
+ ExceptionHandler eh(tempDir.path(), NULL, MDCallback, &fds[1], true, NULL);
// Get some executable memory.
char* memory =
reinterpret_cast<char*>(mmap(NULL,
@@ -379,7 +381,7 @@ TEST_F(ExceptionHandlerTest, InstructionPointerMemoryMinBound) {
pid_t pid = fork();
if (pid == 0) {
close(fds[0]);
- ExceptionHandler eh(tempDir.path, NULL, MDCallback, &fds[1], true, NULL);
+ ExceptionHandler eh(tempDir.path(), NULL, MDCallback, &fds[1], true, NULL);
// Get some executable memory.
char* memory =
reinterpret_cast<char*>(mmap(NULL,
@@ -491,7 +493,7 @@ TEST_F(ExceptionHandlerTest, InstructionPointerMemoryMaxBound) {
pid_t pid = fork();
if (pid == 0) {
close(fds[0]);
- ExceptionHandler eh(tempDir.path, NULL, MDCallback, &fds[1], true, NULL);
+ ExceptionHandler eh(tempDir.path(), NULL, MDCallback, &fds[1], true, NULL);
// Get some executable memory.
char* memory =
reinterpret_cast<char*>(mmap(NULL,
@@ -594,7 +596,7 @@ TEST_F(ExceptionHandlerTest, InstructionPointerMemoryNullPointer) {
pid_t pid = fork();
if (pid == 0) {
close(fds[0]);
- ExceptionHandler eh(tempDir.path, NULL, MDCallback, &fds[1], true, NULL);
+ ExceptionHandler eh(tempDir.path(), NULL, MDCallback, &fds[1], true, NULL);
// Try calling a NULL pointer.
typedef void (*void_function)(void);
void_function memory_function =
@@ -651,7 +653,7 @@ TEST_F(ExceptionHandlerTest, MemoryListMultipleThreads) {
pid_t pid = fork();
if (pid == 0) {
close(fds[0]);
- ExceptionHandler eh(tempDir.path, NULL, MDCallback, &fds[1], true, NULL);
+ ExceptionHandler eh(tempDir.path(), NULL, MDCallback, &fds[1], true, NULL);
// Run an extra thread so >2 memory regions will be written.
pthread_t junk_thread;