| 1 |
CHECK: BINGO |
| 2 |
Done1000000: Done 1000000 runs in |
| 3 |
|
| 4 |
RUN: LLVMFuzzer-SimpleTest 2>&1 | FileCheck %s |
| 5 |
|
| 6 |
# only_ascii mode. Will perform some minimal self-validation. |
| 7 |
RUN: LLVMFuzzer-SimpleTest -only_ascii=1 2>&1 |
| 8 |
|
| 9 |
RUN: LLVMFuzzer-SimpleCmpTest -max_total_time=1 -use_cmp=0 2>&1 | FileCheck %s --check-prefix=MaxTotalTime |
| 10 |
MaxTotalTime: Done {{.*}} runs in {{.}} second(s) |
| 11 |
|
| 12 |
RUN: not LLVMFuzzer-NullDerefTest 2>&1 | FileCheck %s --check-prefix=NullDerefTest |
| 13 |
RUN: not LLVMFuzzer-NullDerefTest -close_fd_mask=3 2>&1 | FileCheck %s --check-prefix=NullDerefTest |
| 14 |
NullDerefTest: ERROR: AddressSanitizer: SEGV on unknown address |
| 15 |
NullDerefTest: Test unit written to ./crash- |
| 16 |
RUN: not LLVMFuzzer-NullDerefTest -artifact_prefix=ZZZ 2>&1 | FileCheck %s --check-prefix=NullDerefTestPrefix |
| 17 |
NullDerefTestPrefix: Test unit written to ZZZcrash- |
| 18 |
RUN: not LLVMFuzzer-NullDerefTest -artifact_prefix=ZZZ -exact_artifact_path=FOOBAR 2>&1 | FileCheck %s --check-prefix=NullDerefTestExactPath |
| 19 |
NullDerefTestExactPath: Test unit written to FOOBAR |
| 20 |
|
| 21 |
RUN: not LLVMFuzzer-NullDerefOnEmptyTest -print_final_stats=1 2>&1 | FileCheck %s --check-prefix=NULL_DEREF_ON_EMPTY |
| 22 |
NULL_DEREF_ON_EMPTY: stat::number_of_executed_units: |
| 23 |
|
| 24 |
#not LLVMFuzzer-FullCoverageSetTest -timeout=15 -seed=1 -mutate_depth=2 -use_full_coverage_set=1 2>&1 | FileCheck %s |
| 25 |
|
| 26 |
RUN: not LLVMFuzzer-CounterTest -max_len=6 -seed=1 -timeout=15 2>&1 | FileCheck %s --check-prefix=COUNTERS |
| 27 |
|
| 28 |
COUNTERS: INITED {{.*}} {{bits:|ft:}} |
| 29 |
COUNTERS: NEW {{.*}} {{bits:|ft:}} {{[1-9]*}} |
| 30 |
COUNTERS: NEW {{.*}} {{bits:|ft:}} {{[1-9]*}} |
| 31 |
COUNTERS: BINGO |
| 32 |
|
| 33 |
# Don't run UninstrumentedTest for now since we build libFuzzer itself with asan. |
| 34 |
DISABLED: not LLVMFuzzer-UninstrumentedTest-Uninstrumented 2>&1 | FileCheck %s --check-prefix=UNINSTRUMENTED |
| 35 |
UNINSTRUMENTED: ERROR: __sanitizer_set_death_callback is not defined. Exiting. |
| 36 |
|
| 37 |
RUN: not LLVMFuzzer-UninstrumentedTest-NoCoverage 2>&1 | FileCheck %s --check-prefix=NO_COVERAGE |
| 38 |
NO_COVERAGE: ERROR: no interesting inputs were found. Is the code instrumented for coverage? Exiting |
| 39 |
|
| 40 |
RUN: not LLVMFuzzer-BufferOverflowOnInput 2>&1 | FileCheck %s --check-prefix=OOB |
| 41 |
OOB: AddressSanitizer: heap-buffer-overflow |
| 42 |
OOB: is located 0 bytes to the right of 3-byte region |
| 43 |
|
| 44 |
RUN: not LLVMFuzzer-InitializeTest -use_value_profile=1 2>&1 | FileCheck %s |
| 45 |
|
| 46 |
RUN: not LLVMFuzzer-DSOTest 2>&1 | FileCheck %s --check-prefix=DSO |
| 47 |
DSO: INFO: Loaded 3 modules |
| 48 |
DSO: BINGO |
| 49 |
|
| 50 |
RUN: LLVMFuzzer-SimpleTest -exit_on_src_pos=SimpleTest.cpp:17 2>&1 | FileCheck %s --check-prefix=EXIT_ON_SRC_POS |
| 51 |
RUN: LLVMFuzzer-ShrinkControlFlowTest -exit_on_src_pos=ShrinkControlFlowTest.cpp:23 2>&1 | FileCheck %s --check-prefix=EXIT_ON_SRC_POS |
| 52 |
EXIT_ON_SRC_POS: INFO: found line matching '{{.*}}', exiting. |
| 53 |
|
| 54 |
RUN: ASAN_OPTIONS=strict_string_checks=1 not LLVMFuzzer-StrncmpOOBTest -seed=1 -runs=1000000 2>&1 | FileCheck %s --check-prefix=STRNCMP |
| 55 |
STRNCMP: AddressSanitizer: heap-buffer-overflow |
| 56 |
STRNCMP-NOT: __sanitizer_weak_hook_strncmp |
| 57 |
STRNCMP: in LLVMFuzzerTestOneInput |