summaryrefslogtreecommitdiff
path: root/test/fuzzer
diff options
context:
space:
mode:
authorKostya Serebryany <kcc@google.com>2019-02-16 01:23:41 +0000
committerKostya Serebryany <kcc@google.com>2019-02-16 01:23:41 +0000
commitaa02904f11073a76cf36bd35b66f42bbed36a9f1 (patch)
tree585b772a46d7002c5692aaa4a10b8e8cf6dc4f6a /test/fuzzer
parent11a863301ddd9d596d47e03128a5832b5f963f13 (diff)
downloadcompiler-rt-aa02904f11073a76cf36bd35b66f42bbed36a9f1.tar.gz
[libFuzzer] make len_control less agressive: set the initial max len to the length of the largest seed. This was the original intent, but... Now, with a test, to ensure it stays this way
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@354191 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/fuzzer')
-rw-r--r--test/fuzzer/len_control.test11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/fuzzer/len_control.test b/test/fuzzer/len_control.test
new file mode 100644
index 000000000..189ad3603
--- /dev/null
+++ b/test/fuzzer/len_control.test
@@ -0,0 +1,11 @@
+# Tests len_control
+RUN: %cpp_compiler %S/SimpleTest.cpp -o %t-SimpleTest
+
+LIM4: DONE{{.*}}lim: 4
+LIM77: DONE{{.*}}lim: 77
+LIM20: DONE{{.*}}lim: 20
+RUN: %run %t-SimpleTest -runs=1 2>&1 | FileCheck %s --check-prefix=LIM4
+RUN: %run %t-SimpleTest -seed_inputs=%t-SimpleTest -max_len=77 -runs=1 2>&1 | FileCheck %s --check-prefix=LIM77
+RUN: echo -n 01234567890123456789 > %t-temp
+RUN: %run %t-SimpleTest -seed_inputs=%t-temp -runs=1 2>&1 | FileCheck %s --check-prefix=LIM20
+