From 0c8339c8aab25f1156558e9e2082b4b124dc2327 Mon Sep 17 00:00:00 2001 From: George Karpenkov Date: Mon, 21 Aug 2017 23:25:50 +0000 Subject: Move libFuzzer to compiler_rt. Resulting library binaries will be named libclang_rt.fuzzer*, and will be placed in Clang toolchain, allowing redistribution. Differential Revision: https://reviews.llvm.org/D36908 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@311407 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/fuzzer/reduce_inputs.test | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 test/fuzzer/reduce_inputs.test (limited to 'test/fuzzer/reduce_inputs.test') diff --git a/test/fuzzer/reduce_inputs.test b/test/fuzzer/reduce_inputs.test new file mode 100644 index 000000000..02e090ebd --- /dev/null +++ b/test/fuzzer/reduce_inputs.test @@ -0,0 +1,16 @@ +# Test -reduce_inputs=1 + +RUN: rm -rf %t/C +RUN: mkdir -p %t/C +RUN: %cpp_compiler %S/ShrinkControlFlowSimpleTest.cpp -o %t-ShrinkControlFlowSimpleTest +RUN: %cpp_compiler %S/ShrinkControlFlowTest.cpp -o %t-ShrinkControlFlowTest +RUN: %t-ShrinkControlFlowSimpleTest -exit_on_item=0eb8e4ed029b774d80f2b66408203801cb982a60 -runs=1000000 %t/C 2>&1 | FileCheck %s +CHECK: INFO: found item with checksum '0eb8e4ed029b774d80f2b66408203801cb982a60' + +# Test that reduce_inputs deletes redundant files in the corpus. +RUN: %t-ShrinkControlFlowSimpleTest -runs=0 %t/C 2>&1 | FileCheck %s --check-prefix=COUNT +COUNT: READ units: 4 + +# a bit longer test +RUN: %t-ShrinkControlFlowTest -exit_on_item=0eb8e4ed029b774d80f2b66408203801cb982a60 -seed=1 -runs=1000000 2>&1 | FileCheck %s + -- cgit v1.2.1 From 04d0769c4c9fe8e3204424cfc5368b4a78006d03 Mon Sep 17 00:00:00 2001 From: Kostya Serebryany Date: Tue, 29 Aug 2017 20:51:24 +0000 Subject: [libFUzzer] change the way we load the seed corpora: instead of loading all files and these executing all files, load and execute them one-by-one. This should reduce the memory usage in many cases git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@312033 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/fuzzer/reduce_inputs.test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/fuzzer/reduce_inputs.test') diff --git a/test/fuzzer/reduce_inputs.test b/test/fuzzer/reduce_inputs.test index 02e090ebd..94f8cc4f3 100644 --- a/test/fuzzer/reduce_inputs.test +++ b/test/fuzzer/reduce_inputs.test @@ -9,7 +9,7 @@ CHECK: INFO: found item with checksum '0eb8e4ed029b774d80f2b66408203801cb982a60' # Test that reduce_inputs deletes redundant files in the corpus. RUN: %t-ShrinkControlFlowSimpleTest -runs=0 %t/C 2>&1 | FileCheck %s --check-prefix=COUNT -COUNT: READ units: 4 +COUNT: seed corpus: files: 4 # a bit longer test RUN: %t-ShrinkControlFlowTest -exit_on_item=0eb8e4ed029b774d80f2b66408203801cb982a60 -seed=1 -runs=1000000 2>&1 | FileCheck %s -- cgit v1.2.1