summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/lib/Fuzzer/test/fuzzer-oom-with-profile.test6
-rw-r--r--llvm/lib/Fuzzer/test/fuzzer-oom.test1
-rw-r--r--llvm/lib/Fuzzer/test/lit.cfg8
3 files changed, 14 insertions, 1 deletions
diff --git a/llvm/lib/Fuzzer/test/fuzzer-oom-with-profile.test b/llvm/lib/Fuzzer/test/fuzzer-oom-with-profile.test
new file mode 100644
index 00000000000..391fd4bb0ff
--- /dev/null
+++ b/llvm/lib/Fuzzer/test/fuzzer-oom-with-profile.test
@@ -0,0 +1,6 @@
+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
+CHECK: Test unit written to ./oom-
+SUMMARY: libFuzzer: out-of-memory
diff --git a/llvm/lib/Fuzzer/test/fuzzer-oom.test b/llvm/lib/Fuzzer/test/fuzzer-oom.test
index 4eeaef4c057..4cdff2142fd 100644
--- a/llvm/lib/Fuzzer/test/fuzzer-oom.test
+++ b/llvm/lib/Fuzzer/test/fuzzer-oom.test
@@ -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
diff --git a/llvm/lib/Fuzzer/test/lit.cfg b/llvm/lib/Fuzzer/test/lit.cfg
index e625fbe2286..e262e3c2585 100644
--- a/llvm/lib/Fuzzer/test/lit.cfg
+++ b/llvm/lib/Fuzzer/test/lit.cfg
@@ -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')
OpenPOWER on IntegriCloud