[sanitizer/coverage] Add AFL-style coverage counters (search heuristic for fuzzing).
[oota-llvm.git] / lib / Fuzzer / test / fuzzer.test
1 RUN: ./LLVMFuzzer-SimpleTest 2>&1 | FileCheck %s --check-prefix=SimpleTest
2 SimpleTest: Found the target, exiting
3
4 RUN: not ./LLVMFuzzer-InfiniteTest -timeout=2 2>&1 | FileCheck %s --check-prefix=InfiniteTest
5 InfiniteTest: ALARM: working on the last Unit for
6 InfiniteTest-NOT: CRASHED; file written to timeout
7
8 RUN: not ./LLVMFuzzer-TimeoutTest -timeout=5 2>&1 | FileCheck %s --check-prefix=TimeoutTest
9 TimeoutTest: ALARM: working on the last Unit for
10 TimeoutTest: CRASHED; file written to timeout
11
12 RUN: not ./LLVMFuzzer-NullDerefTest 2>&1 | FileCheck %s --check-prefix=NullDerefTest
13 NullDerefTest: CRASHED; file written to crash-
14
15 RUN: not ./LLVMFuzzer-FullCoverageSetTest -timeout=15 -seed=1 -mutate_depth=2 -use_full_coverage_set=1 2>&1 | FileCheck %s --check-prefix=FullCoverageSetTest
16 FullCoverageSetTest: BINGO
17
18 RUN: not ./LLVMFuzzer-FourIndependentBranchesTest -timeout=15 -seed=1 -use_coverage_pairs=1 2>&1 | FileCheck %s --check-prefix=FourIndependentBranchesTest
19 FourIndependentBranchesTest: BINGO
20
21 RUN: not ./LLVMFuzzer-CounterTest -use_counters=1 -max_len=6 -seed=1 -timeout=15 2>&1 | FileCheck %s --check-prefix=CounterTest
22 CounterTest: BINGO