[PATCH] D20977: [LibFuzzer] Split the fuzzer-oom.test into two tests.

Dan Liew via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 6 22:15:40 PDT 2016


delcypher updated this revision to Diff 59825.
delcypher added a comment.

- Renames tests
- Remove 'darwin' from feature list


http://reviews.llvm.org/D20977

Files:
  lib/Fuzzer/test/fuzzer-oom-with-profile.test
  lib/Fuzzer/test/fuzzer-oom.test
  lib/Fuzzer/test/lit.cfg

Index: lib/Fuzzer/test/lit.cfg
===================================================================
--- lib/Fuzzer/test/lit.cfg
+++ 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 @@
 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')
Index: lib/Fuzzer/test/fuzzer-oom.test
===================================================================
--- lib/Fuzzer/test/fuzzer-oom.test
+++ 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
Index: lib/Fuzzer/test/fuzzer-oom-with-profile.test
===================================================================
--- /dev/null
+++ 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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20977.59825.patch
Type: text/x-patch
Size: 1556 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160607/6cac7939/attachment.bin>


More information about the llvm-commits mailing list