aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYabin Cui <yabinc@google.com>2017-11-29 21:55:49 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2017-11-29 21:55:49 +0000
commitbd6a5e0f7015c2f1d419de959967fc30780c6c2f (patch)
tree0ad06e5acf2df204ca1ad57d8238974412a62160
parent810802c1d0e1911a37b973970c7cb82e4d440603 (diff)
parent143b454ae56755647e21bf2551fe503ca18fcdc5 (diff)
downloadbionic-o-mr1-iot-preview-6.tar.gz
Merge "Remove timeout signal in ptrace test."android-o-mr1-iot-preview-6o-mr1-iot-preview-6
-rw-r--r--tests/sys_ptrace_test.cpp12
1 files changed, 1 insertions, 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<Uint128_t>(watchpoint_imprecise_child, 8, sizeof(void*));
-
- ASSERT_EQ(0, sigaction(SIGALRM, &oldaction, nullptr)) << strerror(errno);
}
static void __attribute__((noinline)) breakpoint_func() {