OSDN Git Service

watchpoint_imprecise test: set 4-byte watchpoints on 32-bit arches
authorPavel Labath <labath@google.com>
Wed, 26 Apr 2017 10:30:06 +0000 (11:30 +0100)
committerPavel Labath <labath@google.com>
Wed, 26 Apr 2017 10:33:17 +0000 (11:33 +0100)
8-byte watchpoints are not supported on 32-bit kernels (at least on x86,
probably arm as well). 8-byte watchpoints are not required for this
test, so just decrease the size of watchpoints on these architectures.

Change-Id: Ie96b4bc8ce0ad8c924ac737083cf9fe0182aee4d
Test: bionic-unit-tests-static --gtest_filter=sys_ptrace.*
Bug: 37662849

tests/sys_ptrace_test.cpp

index 69638be..00322ec 100644 (file)
@@ -266,7 +266,7 @@ TEST(sys_ptrace, watchpoint_imprecise) {
   ASSERT_EQ(0, sigaction(SIGALRM, &action, &oldaction)) << strerror(errno);
   alarm(5);
 
-  run_watchpoint_test<Uint128_t>(watchpoint_imprecise_child, 8, 8);
+  run_watchpoint_test<Uint128_t>(watchpoint_imprecise_child, 8, sizeof(void*));
 
   ASSERT_EQ(0, sigaction(SIGALRM, &oldaction, nullptr)) << strerror(errno);
 }