[PATCH] D29537: [libFuzzer] fuzzer.test - separate tests with environment variables.

Marcos Pividori via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 3 22:59:42 PST 2017


mpividori created this revision.

https://reviews.llvm.org/D29537

Files:
  lib/Fuzzer/test/fuzzer-posix.test
  lib/Fuzzer/test/fuzzer-win.test
  lib/Fuzzer/test/fuzzer.test


Index: lib/Fuzzer/test/fuzzer.test
===================================================================
--- lib/Fuzzer/test/fuzzer.test
+++ lib/Fuzzer/test/fuzzer.test
@@ -51,10 +51,5 @@
 RUN: LLVMFuzzer-ShrinkControlFlowTest  -exit_on_src_pos=ShrinkControlFlowTest.cpp:23 2>&1 | FileCheck %s --check-prefix=EXIT_ON_SRC_POS
 EXIT_ON_SRC_POS: INFO: found line matching '{{.*}}', exiting.
 
-RUN: ASAN_OPTIONS=strict_string_checks=1 not LLVMFuzzer-StrncmpOOBTest -seed=1 -runs=1000000 2>&1 | FileCheck %s --check-prefix=STRNCMP
-STRNCMP: AddressSanitizer: heap-buffer-overflow
-STRNCMP-NOT: __sanitizer_weak_hook_strncmp
-STRNCMP: in LLVMFuzzerTestOneInput
-
 RUN: not LLVMFuzzer-BogusInitializeTest 2>&1 | FileCheck %s --check-prefix=BOGUS_INITIALIZE
 BOGUS_INITIALIZE: argv[0] has been modified in LLVMFuzzerInitialize
Index: lib/Fuzzer/test/fuzzer-win.test
===================================================================
--- /dev/null
+++ lib/Fuzzer/test/fuzzer-win.test
@@ -0,0 +1,7 @@
+REQUIRES: windows
+
+RUN: cmd /c "SET ASAN_OPTIONS=strict_string_checks=1 && not LLVMFuzzer-StrncmpOOBTest -seed=1 -runs=1000000" 2>&1 | FileCheck %s --check-prefix=STRNCMP
+STRNCMP: AddressSanitizer: heap-buffer-overflow
+STRNCMP-NOT: __sanitizer_weak_hook_strncmp
+STRNCMP: in LLVMFuzzerTestOneInput
+
Index: lib/Fuzzer/test/fuzzer-posix.test
===================================================================
--- /dev/null
+++ lib/Fuzzer/test/fuzzer-posix.test
@@ -0,0 +1,9 @@
+REQUIRES: posix
+
+CHECK: BINGO
+
+RUN: ASAN_OPTIONS=strict_string_checks=1 not LLVMFuzzer-StrncmpOOBTest -seed=1 -runs=1000000 2>&1 | FileCheck %s --check-prefix=STRNCMP
+STRNCMP: AddressSanitizer: heap-buffer-overflow
+STRNCMP-NOT: __sanitizer_weak_hook_strncmp
+STRNCMP: in LLVMFuzzerTestOneInput
+


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D29537.87083.patch
Type: text/x-patch
Size: 1776 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170204/a708e7a8/attachment.bin>


More information about the llvm-commits mailing list