Skip to content

Commit

Permalink
[scudo] Fix test harness integration
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ddcc committed Mar 17, 2022
1 parent 7abd683 commit 03e82d9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion compiler-rt/lib/scudo/standalone/tests/combined_test.cpp
Expand Up @@ -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> \
Expand Down
2 changes: 1 addition & 1 deletion compiler-rt/lib/scudo/standalone/tests/memtag_test.cpp
Expand Up @@ -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())
Expand Down
2 changes: 1 addition & 1 deletion compiler-rt/lib/scudo/standalone/tests/primary_test.cpp
Expand Up @@ -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> \
Expand Down

0 comments on commit 03e82d9

Please sign in to comment.