Stop executing if skip occurs.
Bug: 141358530 Test: Forced a skip and verified it registers as a skip. Change-Id: I9915c67ebae4389a26f28e16375ad4a41f3e4837
This commit is contained in:
parent
14d5c12ed6
commit
103b998a52
|
@ -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;
|
ASSERT_EQ(SIGSTOP, WSTOPSIG(status)) << "Status was: " << status;
|
||||||
|
|
||||||
check_hw_feature_supported(child, HwFeature::Watchpoint);
|
check_hw_feature_supported(child, HwFeature::Watchpoint);
|
||||||
|
if (::testing::Test::IsSkipped()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
set_watchpoint(child, uintptr_t(untag_address(&data)) + offset, size);
|
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;
|
if (!CPU_ISSET(cpu, &available_cpus)) continue;
|
||||||
|
|
||||||
run_watchpoint_stress<uint8_t>(cpu);
|
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<uint16_t>(cpu);
|
||||||
run_watchpoint_stress<uint32_t>(cpu);
|
run_watchpoint_stress<uint32_t>(cpu);
|
||||||
#if defined(__LP64__)
|
#if defined(__LP64__)
|
||||||
|
@ -343,6 +350,9 @@ TEST(sys_ptrace, hardware_breakpoint) {
|
||||||
ASSERT_EQ(SIGSTOP, WSTOPSIG(status)) << "Status was: " << status;
|
ASSERT_EQ(SIGSTOP, WSTOPSIG(status)) << "Status was: " << status;
|
||||||
|
|
||||||
check_hw_feature_supported(child, HwFeature::Breakpoint);
|
check_hw_feature_supported(child, HwFeature::Breakpoint);
|
||||||
|
if (::testing::Test::IsSkipped()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
set_breakpoint(child);
|
set_breakpoint(child);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue