[llvm] r272061 - [LibFuzzer] Split the fuzzer-oom.test into two tests.
Dan Liew via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 7 14:23:30 PDT 2016
Author: delcypher
Date: Tue Jun 7 16:23:30 2016
New Revision: 272061
URL: http://llvm.org/viewvc/llvm-project?rev=272061&view=rev
Log:
[LibFuzzer] Split the fuzzer-oom.test into two tests.
This is necessary because the existing fuzzer-oom.test was Linux
specific due to its use of __sanitizer_print_memory_profile() which
is only available on Linux right now and so the test would fail on OSX.
Differential Revision: http://reviews.llvm.org/D20977
Added:
llvm/trunk/lib/Fuzzer/test/fuzzer-oom-with-profile.test
- copied, changed from r272060, llvm/trunk/lib/Fuzzer/test/fuzzer-oom.test
Modified:
llvm/trunk/lib/Fuzzer/test/fuzzer-oom.test
llvm/trunk/lib/Fuzzer/test/lit.cfg
Copied: llvm/trunk/lib/Fuzzer/test/fuzzer-oom-with-profile.test (from r272060, llvm/trunk/lib/Fuzzer/test/fuzzer-oom.test)
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Fuzzer/test/fuzzer-oom-with-profile.test?p2=llvm/trunk/lib/Fuzzer/test/fuzzer-oom-with-profile.test&p1=llvm/trunk/lib/Fuzzer/test/fuzzer-oom.test&r1=272060&r2=272061&rev=272061&view=diff
==============================================================================
--- llvm/trunk/lib/Fuzzer/test/fuzzer-oom.test (original)
+++ llvm/trunk/lib/Fuzzer/test/fuzzer-oom-with-profile.test Tue Jun 7 16:23:30 2016
@@ -1,3 +1,4 @@
+REQUIRES: linux
RUN: not LLVMFuzzer-OutOfMemoryTest -rss_limit_mb=10 2>&1 | FileCheck %s
CHECK: ERROR: libFuzzer: out-of-memory (used: {{.*}}; limit: 10Mb)
CHECK: Live Heap Allocations
Modified: llvm/trunk/lib/Fuzzer/test/fuzzer-oom.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Fuzzer/test/fuzzer-oom.test?rev=272061&r1=272060&r2=272061&view=diff
==============================================================================
--- llvm/trunk/lib/Fuzzer/test/fuzzer-oom.test (original)
+++ llvm/trunk/lib/Fuzzer/test/fuzzer-oom.test Tue Jun 7 16:23:30 2016
@@ -1,5 +1,4 @@
RUN: not LLVMFuzzer-OutOfMemoryTest -rss_limit_mb=10 2>&1 | FileCheck %s
CHECK: ERROR: libFuzzer: out-of-memory (used: {{.*}}; limit: 10Mb)
-CHECK: Live Heap Allocations
CHECK: Test unit written to ./oom-
SUMMARY: libFuzzer: out-of-memory
Modified: llvm/trunk/lib/Fuzzer/test/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Fuzzer/test/lit.cfg?rev=272061&r1=272060&r2=272061&view=diff
==============================================================================
--- llvm/trunk/lib/Fuzzer/test/lit.cfg (original)
+++ llvm/trunk/lib/Fuzzer/test/lit.cfg Tue Jun 7 16:23:30 2016
@@ -1,4 +1,5 @@
import lit.formats
+import sys
config.name = "LLVMFuzzer"
config.test_format = lit.formats.ShTest(True)
@@ -25,3 +26,10 @@ if config.has_lsan:
else:
lit_config.note('lsan feature unavailable')
+if sys.platform.startswith('linux'):
+ # Note the value of ``sys.platform`` is not consistent
+ # between python 2 and 3, hence the use of ``.startswith()``.
+ lit_config.note('linux feature available')
+ config.available_features.add('linux')
+else:
+ lit_config.note('linux feature unavailable')
More information about the llvm-commits
mailing list