Remove timeout signal in ptrace test.
Bionic gtest runner kills a test when it runs over 90s, so there
is no need to use timeout signal in ptrace test.
Bug: http://b/69525592
Test: run bionic-unit-tests.
Change-Id: I767b81a412724ee40fb0f031103a1f05bd7358c4
diff --git a/tests/sys_ptrace_test.cpp b/tests/sys_ptrace_test.cpp
index d460dec..e6a1e22 100644
--- a/tests/sys_ptrace_test.cpp
+++ b/tests/sys_ptrace_test.cpp
@@ -271,18 +271,8 @@
// test fail on arm64, you will likely need to cherry-pick fdfeff0f into your
// kernel.
TEST(sys_ptrace, watchpoint_imprecise) {
- // Make sure we get interrupted in case a buggy kernel does not report the
- // watchpoint hit correctly.
- struct sigaction action, oldaction;
- action.sa_handler = [](int) {};
- sigemptyset(&action.sa_mask);
- action.sa_flags = 0;
- ASSERT_EQ(0, sigaction(SIGALRM, &action, &oldaction)) << strerror(errno);
- alarm(5);
-
+ // This test relies on the infrastructure to timeout if the test hangs.
run_watchpoint_test<Uint128_t>(watchpoint_imprecise_child, 8, sizeof(void*));
-
- ASSERT_EQ(0, sigaction(SIGALRM, &oldaction, nullptr)) << strerror(errno);
}
static void __attribute__((noinline)) breakpoint_func() {