[compiler-rt] a00cd6d - [GWP-ASan] [Scudo] ifdef entire GWP-ASan tests.
Mitch Phillips via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 13 09:45:48 PST 2019
Author: Mitch Phillips
Date: 2019-12-13T09:45:28-08:00
New Revision: a00cd6dfea9f071c042c1eacd3ed9b587fe44feb
URL: https://github.com/llvm/llvm-project/commit/a00cd6dfea9f071c042c1eacd3ed9b587fe44feb
DIFF: https://github.com/llvm/llvm-project/commit/a00cd6dfea9f071c042c1eacd3ed9b587fe44feb.diff
LOG: [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.
Added:
Modified:
compiler-rt/lib/scudo/standalone/tests/flags_test.cpp
Removed:
################################################################################
diff --git a/compiler-rt/lib/scudo/standalone/tests/flags_test.cpp b/compiler-rt/lib/scudo/standalone/tests/flags_test.cpp
index 85ae422e70f4..0205052edd26 100644
--- a/compiler-rt/lib/scudo/standalone/tests/flags_test.cpp
+++ b/compiler-rt/lib/scudo/standalone/tests/flags_test.cpp
@@ -118,11 +118,8 @@ TEST(ScudoFlagsTest, AllocatorFlags) {
EXPECT_EQ(2048, Flags.quarantine_max_chunk_size);
}
+#ifdef GWP_ASAN_HOOKS
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::Flags Flags;
scudo::registerFlags(&Parser, &Flags);
@@ -134,3 +131,4 @@ TEST(ScudoFlagsTest, GWPASanFlags) {
EXPECT_FALSE(Flags.GWP_ASAN_InstallSignalHandlers);
EXPECT_EQ(1, Flags.GWP_ASAN_SampleRate);
}
+#endif // GWP_ASAN_HOOKS
More information about the llvm-commits
mailing list