Skip to content

Commit

Permalink
Skip MemtagBasicDeathTest#Unsupported when running with HWASan (#84243)
Browse files Browse the repository at this point in the history
Tested in AOSP.
  • Loading branch information
fmayer committed Mar 8, 2024
1 parent 3ceebcb commit 1cf428a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions compiler-rt/lib/scudo/standalone/tests/memtag_test.cpp
Expand Up @@ -12,12 +12,17 @@
#include "platform.h"
#include "tests/scudo_unit_test.h"

extern "C" void __hwasan_init() __attribute__((weak));

#if SCUDO_LINUX
namespace scudo {

TEST(MemtagBasicDeathTest, Unsupported) {
if (archSupportsMemoryTagging())
GTEST_SKIP();
// Skip when running with HWASan.
if (&__hwasan_init != 0)
GTEST_SKIP();

EXPECT_DEATH(archMemoryTagGranuleSize(), "not supported");
EXPECT_DEATH(untagPointer((uptr)0), "not supported");
Expand Down

0 comments on commit 1cf428a

Please sign in to comment.