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

Dan Liew via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 7 14:30:09 PDT 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL272061: [LibFuzzer] Split the fuzzer-oom.test into two tests. (authored by delcypher).

Changed prior to commit:
  http://reviews.llvm.org/D20977?vs=59825&id=59952#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D20977

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

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


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


More information about the llvm-commits mailing list