diff options
author | nealsid <nealsid@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2010-03-02 00:39:48 +0000 |
---|---|---|
committer | nealsid <nealsid@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2010-03-02 00:39:48 +0000 |
commit | de545c09d0363e6964822ec92529a80feaca152d (patch) | |
tree | ca6411127fed322c8f789a6b907ca93b9022b353 /src/client/linux/handler/exception_handler_unittest.cc | |
parent | Breakpad Linux symbol dumper: Handle programs linked with --gc-sections. (diff) | |
download | breakpad-de545c09d0363e6964822ec92529a80feaca152d.tar.xz |
ARM support, with some build system changes to support x86-64, arm, and i386 in an autoconf style build in Linux. The O2 build for the unit tests is still broken but I'm checking this in to unblock people
A=nealsid
R=ajwong, hannahtang, ted.mielczarek
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@541 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/client/linux/handler/exception_handler_unittest.cc')
-rw-r--r-- | src/client/linux/handler/exception_handler_unittest.cc | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/client/linux/handler/exception_handler_unittest.cc b/src/client/linux/handler/exception_handler_unittest.cc index 2e8a6dbe..9747fe71 100644 --- a/src/client/linux/handler/exception_handler_unittest.cc +++ b/src/client/linux/handler/exception_handler_unittest.cc @@ -36,7 +36,7 @@ #include <sys/socket.h> #include <sys/uio.h> -#include "client/linux/handler//exception_handler.h" +#include "client/linux/handler/exception_handler.h" #include "client/linux/minidump_writer/minidump_writer.h" #include "common/linux/eintr_wrapper.h" #include "common/linux/linux_libc_support.h" @@ -112,8 +112,8 @@ TEST(ExceptionHandlerTest, ChildCrash) { ASSERT_TRUE(pfd.revents & POLLIN); uint32_t len; - ASSERT_EQ(read(fds[0], &len, sizeof(len)), sizeof(len)); - ASSERT_LT(len, 2048); + ASSERT_EQ(read(fds[0], &len, sizeof(len)), (ssize_t)sizeof(len)); + ASSERT_LT(len, (uint32_t)2048); char* filename = reinterpret_cast<char*>(malloc(len + 1)); ASSERT_EQ(read(fds[0], filename, len), len); filename[len] = 0; @@ -137,12 +137,10 @@ CrashHandler(const void* crash_context, size_t crash_context_size, const int fd = (intptr_t) context; int fds[2]; pipe(fds); - struct kernel_msghdr msg = {0}; struct kernel_iovec iov; iov.iov_base = const_cast<void*>(crash_context); iov.iov_len = crash_context_size; - msg.msg_iov = &iov; msg.msg_iovlen = 1; char cmsg[kControlMsgSize]; @@ -183,11 +181,10 @@ TEST(ExceptionHandlerTest, ExternalDumper) { const pid_t child = fork(); if (child == 0) { close(fds[0]); - ExceptionHandler handler("/tmp", NULL, NULL, (void*) fds[1], true); + ExceptionHandler handler("/tmp1", NULL, NULL, (void*) fds[1], true); handler.set_crash_handler(CrashHandler); *reinterpret_cast<int*>(NULL) = 0; } - close(fds[1]); struct msghdr msg = {0}; struct iovec iov; |