summaryrefslogtreecommitdiff
path: root/tests/mte_test.cpp
diff options
context:
space:
mode:
authorEvgenii Stepanov <eugenis@google.com>2021-07-12 14:44:02 -0700
committerEvgenii Stepanov <eugenis@google.com>2021-07-13 09:42:08 -0700
commit72a91823c18201e30f0235206bdcee617ddfdb2a (patch)
tree90c5086edfe8d53f091396dff6ea620dbebb1f67 /tests/mte_test.cpp
parenta44aa2e1381c9de60d287f27ac59751e7a8cc999 (diff)
Make MTE tests pass with all values of MEMTAG_OPTIONS.
Do not assume that tests start with Sync MTE; check the initial setting and change test logic as appropriate. Bug: 192480262 Test: bionic-unit-tests with MEMTAG_OPTIONS=(off|sync|async) Merged-In: Id80301e6426af16f89bd80a7a7ab127b6fd60425 Change-Id: Id80301e6426af16f89bd80a7a7ab127b6fd60425 (cherry picked from commit 53df1f3772ad4843461e78540111b21e9061c051)
Diffstat (limited to 'tests/mte_test.cpp')
-rw-r--r--tests/mte_test.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/mte_test.cpp b/tests/mte_test.cpp
index f329d8d70..ade95326c 100644
--- a/tests/mte_test.cpp
+++ b/tests/mte_test.cpp
@@ -38,7 +38,7 @@ static void test_tag_mismatch() {
#endif
}
#if defined(__aarch64__)
- if (mte_supported()) {
+ if (mte_supported() && running_with_mte()) {
EXPECT_DEATH(
{
volatile int load ATTRIBUTE_UNUSED = *mistagged_p;