[compiler-rt] 03e82d9 - [scudo] Fix test harness integration
Dominic Chen via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 17 10:17:57 PDT 2022
Author: Dominic Chen
Date: 2022-03-17T10:17:36-07:00
New Revision: 03e82d94fcbe8fcb66a10c02ee1df76149fc518f
URL: https://github.com/llvm/llvm-project/commit/03e82d94fcbe8fcb66a10c02ee1df76149fc518f
DIFF: https://github.com/llvm/llvm-project/commit/03e82d94fcbe8fcb66a10c02ee1df76149fc518f.diff
LOG: [scudo] Fix test harness integration
Explicitly specify the class name to avoid selecting the wrong Run function, and inherit from the correct Test parent
Differential Revision: https://reviews.llvm.org/D121854
Added:
Modified:
compiler-rt/lib/scudo/standalone/tests/combined_test.cpp
compiler-rt/lib/scudo/standalone/tests/memtag_test.cpp
compiler-rt/lib/scudo/standalone/tests/primary_test.cpp
Removed:
################################################################################
diff --git a/compiler-rt/lib/scudo/standalone/tests/combined_test.cpp b/compiler-rt/lib/scudo/standalone/tests/combined_test.cpp
index 668dab79fb569..94d97df816771 100644
--- a/compiler-rt/lib/scudo/standalone/tests/combined_test.cpp
+++ b/compiler-rt/lib/scudo/standalone/tests/combined_test.cpp
@@ -118,7 +118,7 @@ template <typename T> using ScudoCombinedDeathTest = ScudoCombinedTest<T>;
#define SCUDO_TYPED_TEST_TYPE(FIXTURE, NAME, TYPE) \
using FIXTURE##NAME##_##TYPE = FIXTURE##NAME<scudo::TYPE>; \
- TEST_F(FIXTURE##NAME##_##TYPE, NAME) { Run(); }
+ TEST_F(FIXTURE##NAME##_##TYPE, NAME) { FIXTURE##NAME<scudo::TYPE>::Run(); }
#define SCUDO_TYPED_TEST(FIXTURE, NAME) \
template <class TypeParam> \
diff --git a/compiler-rt/lib/scudo/standalone/tests/memtag_test.cpp b/compiler-rt/lib/scudo/standalone/tests/memtag_test.cpp
index 72c9de36b8bd5..283edaa2a2cce 100644
--- a/compiler-rt/lib/scudo/standalone/tests/memtag_test.cpp
+++ b/compiler-rt/lib/scudo/standalone/tests/memtag_test.cpp
@@ -38,7 +38,7 @@ TEST(MemtagBasicDeathTest, Unsupported) {
EXPECT_DEATH(addFixedTag(nullptr, 0), "not supported");
}
-class MemtagTest : public ::testing::Test {
+class MemtagTest : public Test {
protected:
void SetUp() override {
if (!archSupportsMemoryTagging() || !systemDetectsMemoryTagFaultsTestOnly())
diff --git a/compiler-rt/lib/scudo/standalone/tests/primary_test.cpp b/compiler-rt/lib/scudo/standalone/tests/primary_test.cpp
index 5ec43619a2a48..3179ed5906dd9 100644
--- a/compiler-rt/lib/scudo/standalone/tests/primary_test.cpp
+++ b/compiler-rt/lib/scudo/standalone/tests/primary_test.cpp
@@ -105,7 +105,7 @@ template <class BaseConfig> struct ScudoPrimaryTest : public Test {};
#define SCUDO_TYPED_TEST_TYPE(FIXTURE, NAME, TYPE) \
using FIXTURE##NAME##_##TYPE = FIXTURE##NAME<TYPE>; \
- TEST_F(FIXTURE##NAME##_##TYPE, NAME) { Run(); }
+ TEST_F(FIXTURE##NAME##_##TYPE, NAME) { FIXTURE##NAME<TYPE>::Run(); }
#define SCUDO_TYPED_TEST(FIXTURE, NAME) \
template <class TypeParam> \
More information about the llvm-commits
mailing list