1RUN: %cpp_compiler %S/CustomMutatorTest.cpp -o %t-CustomMutatorTest
2RUN: not %run %t-CustomMutatorTest 2>&1 | FileCheck %s --check-prefix=LLVMFuzzerCustomMutator
3LLVMFuzzerCustomMutator: INFO: found LLVMFuzzerCustomMutator
4LLVMFuzzerCustomMutator: In LLVMFuzzerCustomMutator
5LLVMFuzzerCustomMutator: {{.*}} lim: 4096 {{.*}}
6LLVMFuzzerCustomMutator: BINGO
7
8# len_control is disabled for custom mutators by default, test that it can be enabled.
9RUN: not %run %t-CustomMutatorTest -len_control=1000 2>&1 | FileCheck %s --check-prefix=LLVMFuzzerCustomMutatorWithLenControl
10LLVMFuzzerCustomMutatorWithLenControl: INFO: found LLVMFuzzerCustomMutator
11LLVMFuzzerCustomMutatorWithLenControl: In LLVMFuzzerCustomMutator
12LLVMFuzzerCustomMutatorWithLenControl: {{.*}} lim: {{[1-9][0-9]?}} {{.*}}
13LLVMFuzzerCustomMutatorWithLenControl: BINGO
14
15# sanity check: verify that we do get long lines with verbose printing on
16RUN: %cpp_compiler %S/CustomMutatorWithLongSequencesTest.cpp -o %t-CustomMutatorWithLongSequencesTest
17RUN: not %run %t-CustomMutatorWithLongSequencesTest -verbosity=2 2>&1 | FileCheck %s --check-prefix=LLVMFuzzerCustomMutatorLongSequence
18LLVMFuzzerCustomMutatorLongSequence: Flag: verbosity 2
19LLVMFuzzerCustomMutatorLongSequence: {{.*}} MS: {{[0-9]*}} {{(([a-zA-Z]*-){11,})}} {{.*}}
20LLVMFuzzerCustomMutatorLongSequence: BINGO
21
22# check a target that prints long mutation sequences and verifies the printed
23# output is capped at 10 entries
24RUN: not %run %t-CustomMutatorWithLongSequencesTest 2>&1 | FileCheck %s --check-prefix=LLVMFuzzerCustomMutatorLongSequenceTrimmed
25LLVMFuzzerCustomMutatorLongSequenceTrimmed-NOT: Flag: verbosity 2
26LLVMFuzzerCustomMutatorLongSequenceTrimmed-NOT: {{.*}} MS: {{[0-9]*}} {{(([a-zA-Z]*-){11,})}} {{.*}}
27LLVMFuzzerCustomMutatorLongSequenceTrimmed: BINGO
28