[llvm] r310106 - [libFuzzer] split one test into several

Kostya Serebryany via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 4 13:01:04 PDT 2017


Author: kcc
Date: Fri Aug  4 13:01:04 2017
New Revision: 310106

URL: http://llvm.org/viewvc/llvm-project?rev=310106&view=rev
Log:
[libFuzzer] split one test into several

Added:
    llvm/trunk/lib/Fuzzer/test/memcmp.test
    llvm/trunk/lib/Fuzzer/test/memcmp64.test
    llvm/trunk/lib/Fuzzer/test/recommended-dictionary.test
      - copied, changed from r310101, llvm/trunk/lib/Fuzzer/test/fuzzer-traces-hooks.test
    llvm/trunk/lib/Fuzzer/test/strcmp.test
    llvm/trunk/lib/Fuzzer/test/strncmp.test
    llvm/trunk/lib/Fuzzer/test/strstr.test
Removed:
    llvm/trunk/lib/Fuzzer/test/fuzzer-traces-hooks.test

Removed: llvm/trunk/lib/Fuzzer/test/fuzzer-traces-hooks.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Fuzzer/test/fuzzer-traces-hooks.test?rev=310105&view=auto
==============================================================================
--- llvm/trunk/lib/Fuzzer/test/fuzzer-traces-hooks.test (original)
+++ llvm/trunk/lib/Fuzzer/test/fuzzer-traces-hooks.test (removed)
@@ -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. ######

Added: llvm/trunk/lib/Fuzzer/test/memcmp.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Fuzzer/test/memcmp.test?rev=310106&view=auto
==============================================================================
--- llvm/trunk/lib/Fuzzer/test/memcmp.test (added)
+++ llvm/trunk/lib/Fuzzer/test/memcmp.test Fri Aug  4 13:01:04 2017
@@ -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

Added: llvm/trunk/lib/Fuzzer/test/memcmp64.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Fuzzer/test/memcmp64.test?rev=310106&view=auto
==============================================================================
--- llvm/trunk/lib/Fuzzer/test/memcmp64.test (added)
+++ llvm/trunk/lib/Fuzzer/test/memcmp64.test Fri Aug  4 13:01:04 2017
@@ -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

Copied: llvm/trunk/lib/Fuzzer/test/recommended-dictionary.test (from r310101, llvm/trunk/lib/Fuzzer/test/fuzzer-traces-hooks.test)
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Fuzzer/test/recommended-dictionary.test?p2=llvm/trunk/lib/Fuzzer/test/recommended-dictionary.test&p1=llvm/trunk/lib/Fuzzer/test/fuzzer-traces-hooks.test&r1=310101&r2=310106&rev=310106&view=diff
==============================================================================
--- llvm/trunk/lib/Fuzzer/test/fuzzer-traces-hooks.test (original)
+++ llvm/trunk/lib/Fuzzer/test/recommended-dictionary.test Fri Aug  4 13:01:04 2017
@@ -1,22 +1,4 @@
-// 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"

Added: llvm/trunk/lib/Fuzzer/test/strcmp.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Fuzzer/test/strcmp.test?rev=310106&view=auto
==============================================================================
--- llvm/trunk/lib/Fuzzer/test/strcmp.test (added)
+++ llvm/trunk/lib/Fuzzer/test/strcmp.test Fri Aug  4 13:01:04 2017
@@ -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
+

Added: llvm/trunk/lib/Fuzzer/test/strncmp.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Fuzzer/test/strncmp.test?rev=310106&view=auto
==============================================================================
--- llvm/trunk/lib/Fuzzer/test/strncmp.test (added)
+++ llvm/trunk/lib/Fuzzer/test/strncmp.test Fri Aug  4 13:01:04 2017
@@ -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
+

Added: llvm/trunk/lib/Fuzzer/test/strstr.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Fuzzer/test/strstr.test?rev=310106&view=auto
==============================================================================
--- llvm/trunk/lib/Fuzzer/test/strstr.test (added)
+++ llvm/trunk/lib/Fuzzer/test/strstr.test Fri Aug  4 13:01:04 2017
@@ -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
+




More information about the llvm-commits mailing list