Stop executing if skip occurs.
Bug: 141358530
Test: Forced a skip and verified it registers as a skip.
Change-Id: I9915c67ebae4389a26f28e16375ad4a41f3e4837
diff --git a/tests/sys_ptrace_test.cpp b/tests/sys_ptrace_test.cpp
index 90539fe..15e9a24 100644
--- a/tests/sys_ptrace_test.cpp
+++ b/tests/sys_ptrace_test.cpp
@@ -176,6 +176,9 @@
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 @@
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 @@
ASSERT_EQ(SIGSTOP, WSTOPSIG(status)) << "Status was: " << status;
check_hw_feature_supported(child, HwFeature::Breakpoint);
+ if (::testing::Test::IsSkipped()) {
+ return;
+ }
set_breakpoint(child);