diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/fuzzer/OnlySomeBytesTest.cpp | 5 | ||||
-rw-r--r-- | test/fuzzer/coverage.test | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/test/fuzzer/OnlySomeBytesTest.cpp b/test/fuzzer/OnlySomeBytesTest.cpp index 3873b710b..076cda063 100644 --- a/test/fuzzer/OnlySomeBytesTest.cpp +++ b/test/fuzzer/OnlySomeBytesTest.cpp @@ -12,10 +12,13 @@ const size_t N = 2048; typedef const uint8_t *IN; +static volatile int one = 1; + extern "C" { __attribute__((noinline)) void bad() { fprintf(stderr, "BINGO\n"); - abort(); + if (one) + abort(); } __attribute__((noinline)) void f0(IN in) { diff --git a/test/fuzzer/coverage.test b/test/fuzzer/coverage.test index 83a4b12cb..3b2341f21 100644 --- a/test/fuzzer/coverage.test +++ b/test/fuzzer/coverage.test @@ -5,7 +5,7 @@ RUN: %cpp_compiler -mllvm -use-unknown-locations=Disable %S/DSO2.cpp -fPIC %ld_f RUN: %cpp_compiler -mllvm -use-unknown-locations=Disable %S/DSOTestMain.cpp %S/DSOTestExtra.cpp %ld_flags_rpath_exe1 %ld_flags_rpath_exe2 -o %t-DSOTest CHECK: COVERAGE: -CHECK: COVERED_FUNC: {{.*}}in LLVMFuzzerTestOneInput {{.*}}NullDerefTest.cpp:13 +CHECK: COVERED_FUNC: {{.*}}LLVMFuzzerTestOneInput {{.*}}NullDerefTest.cpp:13 RUN: not %run %t-NullDerefTest -print_coverage=1 2>&1 | FileCheck %s RUN: %run %t-DSOTest -print_coverage=1 -runs=0 2>&1 | FileCheck %s --check-prefix=DSO |