summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Fuzzer/test
diff options
context:
space:
mode:
authorKostya Serebryany <kcc@google.com>2017-08-04 20:01:04 +0000
committerKostya Serebryany <kcc@google.com>2017-08-04 20:01:04 +0000
commit785cec91a4545d239220b9c70e2fae1e99fc4483 (patch)
treea7e53664b86ae86517010c8999665210a612cc0f /llvm/lib/Fuzzer/test
parentbf736037be5b59ec99c8e3d402597abb63f47114 (diff)
downloadbcm5719-llvm-785cec91a4545d239220b9c70e2fae1e99fc4483.tar.gz
bcm5719-llvm-785cec91a4545d239220b9c70e2fae1e99fc4483.zip
[libFuzzer] split one test into several
llvm-svn: 310106
Diffstat (limited to 'llvm/lib/Fuzzer/test')
-rw-r--r--llvm/lib/Fuzzer/test/fuzzer-traces-hooks.test24
-rw-r--r--llvm/lib/Fuzzer/test/memcmp.test3
-rw-r--r--llvm/lib/Fuzzer/test/memcmp64.test3
-rw-r--r--llvm/lib/Fuzzer/test/recommended-dictionary.test6
-rw-r--r--llvm/lib/Fuzzer/test/strcmp.test4
-rw-r--r--llvm/lib/Fuzzer/test/strncmp.test4
-rw-r--r--llvm/lib/Fuzzer/test/strstr.test4
7 files changed, 24 insertions, 24 deletions
diff --git a/llvm/lib/Fuzzer/test/fuzzer-traces-hooks.test b/llvm/lib/Fuzzer/test/fuzzer-traces-hooks.test
deleted file mode 100644
index 89b7c88b7fe..00000000000
--- a/llvm/lib/Fuzzer/test/fuzzer-traces-hooks.test
+++ /dev/null
@@ -1,24 +0,0 @@
-// FIXME: Support for sanitizer hooks for memcmp and strcmp needs to
-// be implemented in the sanitizer runtime for this test
-UNSUPPORTED: windows
-RUN: %cpp_compiler %S/MemcmpTest.cpp -o %t-LLVMFuzzer-MemcmpTest
-RUN: %cpp_compiler %S/StrncmpTest.cpp -o %t-LLVMFuzzer-StrncmpTest
-RUN: %cpp_compiler %S/StrcmpTest.cpp -o %t-LLVMFuzzer-StrcmpTest
-RUN: %cpp_compiler %S/StrstrTest.cpp -o %t-LLVMFuzzer-StrstrTest
-RUN: %cpp_compiler %S/Memcmp64BytesTest.cpp -o %t-LLVMFuzzer-Memcmp64BytesTest
-RUN: %cpp_compiler %S/RepeatedMemcmp.cpp -o %t-LLVMFuzzer-RepeatedMemcmp
-
-CHECK: BINGO
-
-RUN: not %t-LLVMFuzzer-MemcmpTest -seed=1 -runs=10000000 2>&1 | FileCheck %s
-RUN: not %t-LLVMFuzzer-StrncmpTest -seed=2 -runs=2000000 2>&1 | FileCheck %s
-RUN: not %t-LLVMFuzzer-StrcmpTest -seed=1 -runs=2000000 2>&1 | FileCheck %s
-RUN: not %t-LLVMFuzzer-StrstrTest -seed=1 -runs=2000000 2>&1 | FileCheck %s
-
-RUN: not %t-LLVMFuzzer-Memcmp64BytesTest -seed=1 -runs=1000000 2>&1 | FileCheck %s
-
-RUN: %t-LLVMFuzzer-RepeatedMemcmp -seed=11 -runs=100000 -max_len=20 2>&1 | FileCheck %s --check-prefix=RECOMMENDED_DICT
-RECOMMENDED_DICT:###### Recommended dictionary. ######
-RECOMMENDED_DICT-DAG: "foo"
-RECOMMENDED_DICT-DAG: "bar"
-RECOMMENDED_DICT:###### End of recommended dictionary. ######
diff --git a/llvm/lib/Fuzzer/test/memcmp.test b/llvm/lib/Fuzzer/test/memcmp.test
new file mode 100644
index 00000000000..a8f24408a12
--- /dev/null
+++ b/llvm/lib/Fuzzer/test/memcmp.test
@@ -0,0 +1,3 @@
+RUN: %cpp_compiler %S/MemcmpTest.cpp -o %t-LLVMFuzzer-MemcmpTest
+RUN: not %t-LLVMFuzzer-MemcmpTest -seed=1 -runs=10000000 2>&1 | FileCheck %s
+CHECK: BINGO
diff --git a/llvm/lib/Fuzzer/test/memcmp64.test b/llvm/lib/Fuzzer/test/memcmp64.test
new file mode 100644
index 00000000000..50fcad047c4
--- /dev/null
+++ b/llvm/lib/Fuzzer/test/memcmp64.test
@@ -0,0 +1,3 @@
+RUN: %cpp_compiler %S/Memcmp64BytesTest.cpp -o %t-LLVMFuzzer-Memcmp64BytesTest
+RUN: not %t-LLVMFuzzer-Memcmp64BytesTest -seed=1 -runs=1000000 2>&1 | FileCheck %s
+CHECK: BINGO
diff --git a/llvm/lib/Fuzzer/test/recommended-dictionary.test b/llvm/lib/Fuzzer/test/recommended-dictionary.test
new file mode 100644
index 00000000000..4380ea97020
--- /dev/null
+++ b/llvm/lib/Fuzzer/test/recommended-dictionary.test
@@ -0,0 +1,6 @@
+RUN: %cpp_compiler %S/RepeatedMemcmp.cpp -o %t-LLVMFuzzer-RepeatedMemcmp
+RUN: %t-LLVMFuzzer-RepeatedMemcmp -seed=11 -runs=100000 -max_len=20 2>&1 | FileCheck %s --check-prefix=RECOMMENDED_DICT
+RECOMMENDED_DICT:###### Recommended dictionary. ######
+RECOMMENDED_DICT-DAG: "foo"
+RECOMMENDED_DICT-DAG: "bar"
+RECOMMENDED_DICT:###### End of recommended dictionary. ######
diff --git a/llvm/lib/Fuzzer/test/strcmp.test b/llvm/lib/Fuzzer/test/strcmp.test
new file mode 100644
index 00000000000..a4997cb1cfc
--- /dev/null
+++ b/llvm/lib/Fuzzer/test/strcmp.test
@@ -0,0 +1,4 @@
+RUN: %cpp_compiler %S/StrcmpTest.cpp -o %t-LLVMFuzzer-StrcmpTest
+RUN: not %t-LLVMFuzzer-StrcmpTest -seed=1 -runs=2000000 2>&1 | FileCheck %s
+CHECK: BINGO
+
diff --git a/llvm/lib/Fuzzer/test/strncmp.test b/llvm/lib/Fuzzer/test/strncmp.test
new file mode 100644
index 00000000000..6d4ad6d315b
--- /dev/null
+++ b/llvm/lib/Fuzzer/test/strncmp.test
@@ -0,0 +1,4 @@
+RUN: %cpp_compiler %S/StrncmpTest.cpp -o %t-LLVMFuzzer-StrncmpTest
+RUN: not %t-LLVMFuzzer-StrncmpTest -seed=2 -runs=2000000 2>&1 | FileCheck %s
+CHECK: BINGO
+
diff --git a/llvm/lib/Fuzzer/test/strstr.test b/llvm/lib/Fuzzer/test/strstr.test
new file mode 100644
index 00000000000..7a98319ecc9
--- /dev/null
+++ b/llvm/lib/Fuzzer/test/strstr.test
@@ -0,0 +1,4 @@
+RUN: %cpp_compiler %S/StrstrTest.cpp -o %t-LLVMFuzzer-StrstrTest
+RUN: not %t-LLVMFuzzer-StrstrTest -seed=1 -runs=2000000 2>&1 | FileCheck %s
+CHECK: BINGO
+
OpenPOWER on IntegriCloud