aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Ferris <cferris@google.com>2019-09-24 01:14:15 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2019-09-24 01:14:15 +0000
commit7c852064bb693f4b6d1ac809782ea676ad54be96 (patch)
treecce0515de4ea0ec9ac44f0977c26cb9fb734dfae
parent14d5c12ed6d4febc054c49d6b48e3e3a94d3530d (diff)
parent103b998a52fa80eee2c85a420533bf75a0b11e41 (diff)
downloadbionic-7c852064bb693f4b6d1ac809782ea676ad54be96.tar.gz
Merge "Stop executing if skip occurs."
-rw-r--r--tests/sys_ptrace_test.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/sys_ptrace_test.cpp b/tests/sys_ptrace_test.cpp
index 90539fe8c..15e9a2491 100644
--- a/tests/sys_ptrace_test.cpp
+++ b/tests/sys_ptrace_test.cpp
@@ -176,6 +176,9 @@ static void run_watchpoint_test(std::function<void(T&)> child_func, size_t offse
ASSERT_EQ(SIGSTOP, WSTOPSIG(status)) << "Status was: " << status;
check_hw_feature_supported(child, HwFeature::Watchpoint);
+ if (::testing::Test::IsSkipped()) {
+ return;
+ }
set_watchpoint(child, uintptr_t(untag_address(&data)) + offset, size);
@@ -224,6 +227,10 @@ TEST(sys_ptrace, watchpoint_stress) {
if (!CPU_ISSET(cpu, &available_cpus)) continue;
run_watchpoint_stress<uint8_t>(cpu);
+ if (::testing::Test::IsSkipped()) {
+ // Only check first case, since all others would skip for same reason.
+ return;
+ }
run_watchpoint_stress<uint16_t>(cpu);
run_watchpoint_stress<uint32_t>(cpu);
#if defined(__LP64__)
@@ -343,6 +350,9 @@ TEST(sys_ptrace, hardware_breakpoint) {
ASSERT_EQ(SIGSTOP, WSTOPSIG(status)) << "Status was: " << status;
check_hw_feature_supported(child, HwFeature::Breakpoint);
+ if (::testing::Test::IsSkipped()) {
+ return;
+ }
set_breakpoint(child);