From e54785c6e9e647b9d0846b3ce63284045df1118d Mon Sep 17 00:00:00 2001 From: Kostya Serebryany Date: Fri, 24 Mar 2017 00:51:18 +0000 Subject: [PATCH] [libFuzzer] split two tests to get more parallelism in test runs llvm-svn: 298673 --- llvm/lib/Fuzzer/test/disable-leaks.test | 4 ++++ llvm/lib/Fuzzer/test/equivalence-signals.test | 9 +++++++++ llvm/lib/Fuzzer/test/equivalence.test | 10 ---------- llvm/lib/Fuzzer/test/fuzzer-leak.test | 2 -- 4 files changed, 13 insertions(+), 12 deletions(-) create mode 100644 llvm/lib/Fuzzer/test/disable-leaks.test create mode 100644 llvm/lib/Fuzzer/test/equivalence-signals.test diff --git a/llvm/lib/Fuzzer/test/disable-leaks.test b/llvm/lib/Fuzzer/test/disable-leaks.test new file mode 100644 index 000000000000..467b64ccc6f4 --- /dev/null +++ b/llvm/lib/Fuzzer/test/disable-leaks.test @@ -0,0 +1,4 @@ +REQUIRES: lsan +RUN: LLVMFuzzer-AccumulateAllocationsTest -detect_leaks=1 -runs=100000 2>&1 | FileCheck %s --check-prefix=ACCUMULATE_ALLOCS +ACCUMULATE_ALLOCS: INFO: libFuzzer disabled leak detection after every mutation + diff --git a/llvm/lib/Fuzzer/test/equivalence-signals.test b/llvm/lib/Fuzzer/test/equivalence-signals.test new file mode 100644 index 000000000000..81a7f37602cc --- /dev/null +++ b/llvm/lib/Fuzzer/test/equivalence-signals.test @@ -0,0 +1,9 @@ +REQUIRES: posix +# Run EquivalenceATest against itself with a small timeout +# to stress the signal handling and ensure that shmem doesn't mind +# the signals. + +RUN: LLVMFuzzer-EquivalenceATest -timeout=1 -run_equivalence_server=EQUIV_SIG_TEST & export APID=$! +RUN: sleep 3 +RUN: LLVMFuzzer-EquivalenceATest -timeout=1 -use_equivalence_server=EQUIV_SIG_TEST -runs=500000 2>&1 +RUN: kill -9 $APID diff --git a/llvm/lib/Fuzzer/test/equivalence.test b/llvm/lib/Fuzzer/test/equivalence.test index c9b5f690202e..015ba855c600 100644 --- a/llvm/lib/Fuzzer/test/equivalence.test +++ b/llvm/lib/Fuzzer/test/equivalence.test @@ -6,13 +6,3 @@ RUN: not LLVMFuzzer-EquivalenceBTest -use_equivalence_server=EQUIV_TEST -max_len CHECK: ERROR: libFuzzer: equivalence-mismatch. Sizes: {{.*}}; offset 2 CHECK: SUMMARY: libFuzzer: equivalence-mismatch RUN: kill -9 $APID - - -# Run EquivalenceATest against itself with a small timeout -# to stress the signal handling and ensure that shmem doesn't mind -# the signals. - -RUN: LLVMFuzzer-EquivalenceATest -timeout=1 -run_equivalence_server=EQUIV_TEST & export APID=$! -RUN: sleep 3 -RUN: LLVMFuzzer-EquivalenceATest -timeout=1 -use_equivalence_server=EQUIV_TEST -runs=500000 2>&1 -RUN: kill -9 $APID diff --git a/llvm/lib/Fuzzer/test/fuzzer-leak.test b/llvm/lib/Fuzzer/test/fuzzer-leak.test index 9cf5c743fff5..13e3ad740e6d 100644 --- a/llvm/lib/Fuzzer/test/fuzzer-leak.test +++ b/llvm/lib/Fuzzer/test/fuzzer-leak.test @@ -29,7 +29,5 @@ RUN: not LLVMFuzzer-LeakTimeoutTest -timeout=1 2>&1 | FileCheck %s --check-prefi LEAK_TIMEOUT: ERROR: libFuzzer: timeout after LEAK_TIMEOUT-NOT: LeakSanitizer -RUN: LLVMFuzzer-AccumulateAllocationsTest -detect_leaks=1 -runs=100000 2>&1 | FileCheck %s --check-prefix=ACCUMULATE_ALLOCS -ACCUMULATE_ALLOCS: INFO: libFuzzer disabled leak detection after every mutation RUN: LLVMFuzzer-LeakTest -error_exitcode=0