From 6f287a5f57ee0143156f939bad7ac398e60bcda7 Mon Sep 17 00:00:00 2001 From: Joshua Peraza Date: Mon, 3 Jun 2019 16:59:11 -0700 Subject: [PATCH] linux: fix broken tests Fixes errors for comparisons between signed and unsigned ints. Change-Id: I7ef151ba84a48a0c8cc449cfaf12b9fef775d5a7 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1642361 Reviewed-by: Mark Mentovai --- src/client/linux/handler/exception_handler_unittest.cc | 4 ++-- .../linux/minidump_writer/linux_ptrace_dumper_unittest.cc | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/client/linux/handler/exception_handler_unittest.cc b/src/client/linux/handler/exception_handler_unittest.cc index be49ef09..bcbf9c26 100644 --- a/src/client/linux/handler/exception_handler_unittest.cc +++ b/src/client/linux/handler/exception_handler_unittest.cc @@ -887,13 +887,13 @@ TEST(ExceptionHandlerTest, InstructionPointerMemoryNullPointer) { uint64_t instruction_pointer; ASSERT_TRUE(exception_context->GetInstructionPointer(&instruction_pointer)); - EXPECT_EQ(instruction_pointer, 0); + EXPECT_EQ(instruction_pointer, 0u); MinidumpMemoryList* memory_list = minidump.GetMemoryList(); ASSERT_TRUE(memory_list); unsigned int region_count = memory_list->region_count(); - ASSERT_GE(region_count, 1); + ASSERT_GE(region_count, 1u); for (unsigned int region_index = 0; region_index < region_count; 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 8757563e..a41dafce 100644 --- a/src/client/linux/minidump_writer/linux_ptrace_dumper_unittest.cc +++ b/src/client/linux/minidump_writer/linux_ptrace_dumper_unittest.cc @@ -426,7 +426,7 @@ TEST_F(LinuxPtraceDumperChildTest, FileIDsMatch) { #undef TestBody TEST(LinuxPtraceDumperTest, VerifyStackReadWithMultipleThreads) { - static const int kNumberOfThreadsInHelperProgram = 5; + static const size_t kNumberOfThreadsInHelperProgram = 5; pid_t child_pid = SetupChildProcess(kNumberOfThreadsInHelperProgram); ASSERT_NE(child_pid, -1); @@ -484,7 +484,7 @@ TEST(LinuxPtraceDumperTest, VerifyStackReadWithMultipleThreads) { } TEST_F(LinuxPtraceDumperTest, SanitizeStackCopy) { - static const int kNumberOfThreadsInHelperProgram = 1; + static const size_t kNumberOfThreadsInHelperProgram = 1; pid_t child_pid = SetupChildProcess(kNumberOfThreadsInHelperProgram); ASSERT_NE(child_pid, -1);