Skip the MemtagNoteTests when the overriding sysprop is set. Bug: 273807460 Change-Id: Ieb33354fd8a705c1b2a661055f69d2ec4b32b5e8
diff --git a/tests/heap_tagging_level_test.cpp b/tests/heap_tagging_level_test.cpp index ae678b7..917be37 100644 --- a/tests/heap_tagging_level_test.cpp +++ b/tests/heap_tagging_level_test.cpp
@@ -26,6 +26,7 @@ #include "SignalUtils.h" +#include <android-base/properties.h> #include <android-base/test_utils.h> #include <bionic/malloc_tagged_pointers.h> @@ -223,6 +224,9 @@ TEST_P(MemtagNoteTest, SEGV) { #if defined(__BIONIC__) && defined(__aarch64__) SKIP_WITH_NATIVE_BRIDGE; // http://b/242170715 + if (android::base::GetProperty("persist.arm64.memtag.default", "") != "") { + GTEST_SKIP() << "not supported when overriding memtag mode with property"; + } // Note that we do not check running_with_hwasan() - what matters here is whether the test binary // itself is built with HWASan. bool withHWASAN = __has_feature(hwaddress_sanitizer);