forked from OSchip/llvm-project
[GWP-ASan] [Scudo] ifdef entire GWP-ASan tests.
Turns out that gtest in LLVM is only 1.8.0 (the newest version 1.10.0) supports the GTEST_SKIP() macro, and apparently I didn't build w/o GWP-ASan. Should fix the GN bot, as well as any bots that may spuriously break on platforms where the code wasn't correctly ifdef'd out as well.
This commit is contained in:
parent
17063abd1e
commit
a00cd6dfea
|
|
@ -118,11 +118,8 @@ TEST(ScudoFlagsTest, AllocatorFlags) {
|
||||||
EXPECT_EQ(2048, Flags.quarantine_max_chunk_size);
|
EXPECT_EQ(2048, Flags.quarantine_max_chunk_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef GWP_ASAN_HOOKS
|
||||||
TEST(ScudoFlagsTest, GWPASanFlags) {
|
TEST(ScudoFlagsTest, GWPASanFlags) {
|
||||||
#ifndef GWP_ASAN_HOOKS
|
|
||||||
GTEST_SKIP() << "GWP-ASan wasn't built as part of Scudo Standalone.";
|
|
||||||
#endif // GWP_ASAN_HOOKS
|
|
||||||
|
|
||||||
scudo::FlagParser Parser;
|
scudo::FlagParser Parser;
|
||||||
scudo::Flags Flags;
|
scudo::Flags Flags;
|
||||||
scudo::registerFlags(&Parser, &Flags);
|
scudo::registerFlags(&Parser, &Flags);
|
||||||
|
|
@ -134,3 +131,4 @@ TEST(ScudoFlagsTest, GWPASanFlags) {
|
||||||
EXPECT_FALSE(Flags.GWP_ASAN_InstallSignalHandlers);
|
EXPECT_FALSE(Flags.GWP_ASAN_InstallSignalHandlers);
|
||||||
EXPECT_EQ(1, Flags.GWP_ASAN_SampleRate);
|
EXPECT_EQ(1, Flags.GWP_ASAN_SampleRate);
|
||||||
}
|
}
|
||||||
|
#endif // GWP_ASAN_HOOKS
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue