[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
This commit is contained in:
Dominic Chen 2022-03-16 13:45:24 -07:00
parent 7abd6837a0
commit 03e82d94fc
3 changed files with 3 additions and 3 deletions

View File

@ -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> \

View File

@ -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())

View File

@ -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> \