From 143b454ae56755647e21bf2551fe503ca18fcdc5 Mon Sep 17 00:00:00 2001 From: Yabin Cui Date: Wed, 29 Nov 2017 10:34:24 -0800 Subject: [PATCH] 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 --- tests/sys_ptrace_test.cpp | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/tests/sys_ptrace_test.cpp b/tests/sys_ptrace_test.cpp index d460dec85..e6a1e22ea 100644 --- a/tests/sys_ptrace_test.cpp +++ b/tests/sys_ptrace_test.cpp @@ -271,18 +271,8 @@ static void watchpoint_imprecise_child(Uint128_t& data) { // 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(watchpoint_imprecise_child, 8, sizeof(void*)); - - ASSERT_EQ(0, sigaction(SIGALRM, &oldaction, nullptr)) << strerror(errno); } static void __attribute__((noinline)) breakpoint_func() {