summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaslyn Tonelli <caslyn@google.com>2023-04-28 08:32:20 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2023-04-28 08:32:20 +0000
commit1843ed9c81cb08a9b4b1ecac52ed1fc02335854e (patch)
tree291c7f06270e61aae8244e857ac9c145f6b5d2f9
parente7ec6a33615d70282018c886be5f3793fca6e665 (diff)
parent6e6144b17ef2e9c078e527fda1e07cfd860056b0 (diff)
downloadgwp_asan-1843ed9c81cb08a9b4b1ecac52ed1fc02335854e.tar.gz
[gwp_asan] Exclude recoverable tests on Fuchsia am: 92529f313e am: e019f02f85 am: 6e6144b17e
Original change: https://android-review.googlesource.com/c/platform/external/gwp_asan/+/2569410 Change-Id: I5de3b51f298d369986059d2b20947941515805c9 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--gwp_asan/tests/backtrace.cpp4
-rw-r--r--gwp_asan/tests/harness.cpp7
2 files changed, 9 insertions, 2 deletions
diff --git a/gwp_asan/tests/backtrace.cpp b/gwp_asan/tests/backtrace.cpp
index 7cbbcf5..6a84a2a 100644
--- a/gwp_asan/tests/backtrace.cpp
+++ b/gwp_asan/tests/backtrace.cpp
@@ -21,7 +21,7 @@ TEST_P(BacktraceGuardedPoolAllocatorDeathTest, DoubleFree) {
DeathRegex.append("was deallocated.*DeallocateMemory[^2].*");
DeathRegex.append("was allocated.*AllocateMemory");
if (!Recoverable) {
- ASSERT_DEATH(DeallocateMemory2(GPA, Ptr), DeathRegex);
+ EXPECT_DEATH(DeallocateMemory2(GPA, Ptr), DeathRegex);
return;
}
@@ -51,7 +51,7 @@ TEST_P(BacktraceGuardedPoolAllocatorDeathTest, UseAfterFree) {
DeathRegex.append("was allocated.*AllocateMemory");
if (!Recoverable) {
- ASSERT_DEATH(TouchMemory(Ptr), DeathRegex);
+ EXPECT_DEATH(TouchMemory(Ptr), DeathRegex);
return;
}
diff --git a/gwp_asan/tests/harness.cpp b/gwp_asan/tests/harness.cpp
index 6d41630..4633d3e 100644
--- a/gwp_asan/tests/harness.cpp
+++ b/gwp_asan/tests/harness.cpp
@@ -47,8 +47,15 @@ void CheckOnlyOneGwpAsanCrash(const std::string &OutputBuffer) {
<< OutputBuffer;
}
+// Fuchsia does not support recoverable GWP-ASan.
+#if defined(__Fuchsia__)
+INSTANTIATE_TEST_SUITE_P(RecoverableAndNonRecoverableTests,
+ BacktraceGuardedPoolAllocatorDeathTest,
+ /* Recoverable */ testing::Values(false));
+#else
INSTANTIATE_TEST_SUITE_P(RecoverableTests, BacktraceGuardedPoolAllocator,
/* Recoverable */ testing::Values(true));
INSTANTIATE_TEST_SUITE_P(RecoverableAndNonRecoverableTests,
BacktraceGuardedPoolAllocatorDeathTest,
/* Recoverable */ testing::Bool());
+#endif