summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Fuzzer/test
diff options
context:
space:
mode:
authorKostya Serebryany <kcc@google.com>2016-09-27 00:10:20 +0000
committerKostya Serebryany <kcc@google.com>2016-09-27 00:10:20 +0000
commit5ff481fd9e9d8fb4a057a1cfc0b5041facfeca15 (patch)
tree718d12ea3e12f62bf2bf1b1f930388d5f56139f4 /llvm/lib/Fuzzer/test
parentbde62d78e92256a2e176e96308119263d04d2648 (diff)
downloadbcm5719-llvm-5ff481fd9e9d8fb4a057a1cfc0b5041facfeca15.tar.gz
bcm5719-llvm-5ff481fd9e9d8fb4a057a1cfc0b5041facfeca15.zip
[libFuzzer] add -exit_on_src_pos to test libFuzzer itself, add a test script for RE2 that uses this flag
llvm-svn: 282458
Diffstat (limited to 'llvm/lib/Fuzzer/test')
-rw-r--r--llvm/lib/Fuzzer/test/MinimizeCorpusTest.cpp2
-rw-r--r--llvm/lib/Fuzzer/test/fuzzer.test4
2 files changed, 5 insertions, 1 deletions
diff --git a/llvm/lib/Fuzzer/test/MinimizeCorpusTest.cpp b/llvm/lib/Fuzzer/test/MinimizeCorpusTest.cpp
index 02ef99fb26e..2fa17f156e2 100644
--- a/llvm/lib/Fuzzer/test/MinimizeCorpusTest.cpp
+++ b/llvm/lib/Fuzzer/test/MinimizeCorpusTest.cpp
@@ -21,7 +21,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
int Z = Ids[(unsigned char)'Z'];
if (F >= 0 && U > F && Z > U) {
Sink++;
- // printf("IDS: %d %d %d\n", F, U, Z);
+ // fprintf(stderr, "IDS: %d %d %d\n", F, U, Z);
}
return 0;
}
diff --git a/llvm/lib/Fuzzer/test/fuzzer.test b/llvm/lib/Fuzzer/test/fuzzer.test
index ce207855e52..b48d734ef67 100644
--- a/llvm/lib/Fuzzer/test/fuzzer.test
+++ b/llvm/lib/Fuzzer/test/fuzzer.test
@@ -53,3 +53,7 @@ RUN: not LLVMFuzzer-DSOTest 2>&1 | FileCheck %s --check-prefix=DSO
DSO: INFO: Loaded 3 modules
DSO: BINGO
+RUN: LLVMFuzzer-SimpleTest-TracePC -exit_on_src_pos=SimpleTest.cpp:17 2>&1 | FileCheck %s --check-prefix=EXIT_ON_SRC_POS
+RUN: LLVMFuzzer-MinimizeCorpusTest-TracePC -exit_on_src_pos=MinimizeCorpusTest.cpp:23 2>&1 | FileCheck %s --check-prefix=EXIT_ON_SRC_POS
+EXIT_ON_SRC_POS: INFO: found line matching '{{.*}}', exiting.
+
OpenPOWER on IntegriCloud