2015-05-07 08:11:33 +08:00
|
|
|
CHECK: BINGO
|
2015-12-19 11:35:30 +08:00
|
|
|
Done1000000: Done 1000000 runs in
|
2015-05-07 08:11:33 +08:00
|
|
|
|
2015-07-22 06:51:55 +08:00
|
|
|
RUN: LLVMFuzzer-SimpleTest 2>&1 | FileCheck %s
|
2015-10-17 06:41:47 +08:00
|
|
|
RUN: not LLVMFuzzer-NullDerefTest -test_single_input=%S/hi.txt 2>&1 | FileCheck %s --check-prefix=SingleInput
|
|
|
|
SingleInput-NOT: Test unit written to ./crash-
|
2015-01-30 00:58:29 +08:00
|
|
|
|
2015-10-03 04:47:55 +08:00
|
|
|
RUN: LLVMFuzzer-SimpleCmpTest -max_total_time=1 2>&1 | FileCheck %s --check-prefix=MaxTotalTime
|
|
|
|
MaxTotalTime: Done {{.*}} runs in {{.}} second(s)
|
|
|
|
|
2015-07-22 06:51:55 +08:00
|
|
|
RUN: not LLVMFuzzer-NullDerefTest 2>&1 | FileCheck %s --check-prefix=NullDerefTest
|
2015-10-09 11:57:59 +08:00
|
|
|
NullDerefTest: Test unit written to ./crash-
|
|
|
|
RUN: not LLVMFuzzer-NullDerefTest -artifact_prefix=ZZZ 2>&1 | FileCheck %s --check-prefix=NullDerefTestPrefix
|
|
|
|
NullDerefTestPrefix: Test unit written to ZZZcrash-
|
2015-11-26 05:40:46 +08:00
|
|
|
RUN: not LLVMFuzzer-NullDerefTest -artifact_prefix=ZZZ -exact_artifact_path=FOOBAR 2>&1 | FileCheck %s --check-prefix=NullDerefTestExactPath
|
|
|
|
NullDerefTestExactPath: Test unit written to FOOBAR
|
2015-01-30 07:01:07 +08:00
|
|
|
|
2016-03-02 06:19:21 +08:00
|
|
|
RUN: ASAN_OPTIONS=handle_segv=0 not LLVMFuzzer-NullDerefTest 2>&1 | FileCheck %s --check-prefix=LIBFUZZER_OWN_SEGV_HANDLER
|
|
|
|
LIBFUZZER_OWN_SEGV_HANDLER: == ERROR: libFuzzer: deadly signal
|
|
|
|
LIBFUZZER_OWN_SEGV_HANDLER: SUMMARY: libFuzzer: deadly signal
|
|
|
|
LIBFUZZER_OWN_SEGV_HANDLER: Test unit written to ./crash-
|
|
|
|
|
2015-10-03 06:00:32 +08:00
|
|
|
#not LLVMFuzzer-FullCoverageSetTest -timeout=15 -seed=1 -mutate_depth=2 -use_full_coverage_set=1 2>&1 | FileCheck %s
|
2015-05-07 08:11:33 +08:00
|
|
|
|
2015-07-22 06:51:55 +08:00
|
|
|
RUN: not LLVMFuzzer-CounterTest -use_counters=1 -max_len=6 -seed=1 -timeout=15 2>&1 | FileCheck %s
|
2015-02-20 11:02:37 +08:00
|
|
|
|
2015-12-19 10:49:09 +08:00
|
|
|
RUN: not LLVMFuzzer-CallerCalleeTest -cross_over=0 -max_len=6 -seed=1 -timeout=15 2>&1 | FileCheck %s
|
2016-01-07 09:49:35 +08:00
|
|
|
# This one is flaky, may actually find the goal even w/o use_indir_calls.
|
|
|
|
# LLVMFuzzer-CallerCalleeTest -use_indir_calls=0 -cross_over=0 -max_len=6 -seed=1 -runs=1000000 2>&1 | FileCheck %s --check-prefix=Done1000000
|
2015-10-23 07:55:39 +08:00
|
|
|
|
2015-03-31 06:09:51 +08:00
|
|
|
|
2015-11-10 07:17:45 +08:00
|
|
|
RUN: not LLVMFuzzer-UninstrumentedTest-Uninstrumented 2>&1 | FileCheck %s --check-prefix=UNINSTRUMENTED
|
|
|
|
UNINSTRUMENTED: ERROR: __sanitizer_set_death_callback is not defined. Exiting.
|
2016-01-06 08:21:22 +08:00
|
|
|
|
|
|
|
RUN: LLVMFuzzer-SimpleTest -print_new_cov_pcs=1 2>&1 | FileCheck %s --check-prefix=PCS
|
|
|
|
PCS:{{^0x[a-f0-9]+}}
|
|
|
|
PCS:NEW
|
|
|
|
PCS:BINGO
|
|
|
|
|
2016-01-14 07:02:30 +08:00
|
|
|
RUN: not LLVMFuzzer-BufferOverflowOnInput 2>&1 | FileCheck %s --check-prefix=OOB
|
|
|
|
OOB: AddressSanitizer: heap-buffer-overflow
|
|
|
|
OOB: is located 0 bytes to the right of 3-byte region
|
2016-01-16 09:23:12 +08:00
|
|
|
|
|
|
|
RUN: not LLVMFuzzer-InitializeTest 2>&1 | FileCheck %s
|
2016-01-20 04:33:57 +08:00
|
|
|
|
|
|
|
RUN: LLVMFuzzer-SimpleCmpTest -seed=-1 -runs=0 2>&1 | FileCheck %s --check-prefix=CHECK_SEED_MINUS_ONE
|
|
|
|
CHECK_SEED_MINUS_ONE: Seed: 4294967295
|
2016-02-02 10:07:26 +08:00
|
|
|
|
|
|
|
RUN: not LLVMFuzzer-SimpleTest NONEXISTENT_DIR 2>&1 | FileCheck %s --check-prefix=NONEXISTENT_DIR
|
|
|
|
NONEXISTENT_DIR: No such directory: NONEXISTENT_DIR; exiting
|
2016-02-02 11:03:47 +08:00
|
|
|
|
|
|
|
|
|
|
|
RUN: rm -rf %tmp/SINGLE_INPUTS
|
|
|
|
RUN: mkdir -p %tmp/SINGLE_INPUTS
|
|
|
|
RUN: echo aaa > %tmp/SINGLE_INPUTS/aaa
|
|
|
|
RUN: echo bbb > %tmp/SINGLE_INPUTS/bbb
|
|
|
|
RUN: LLVMFuzzer-SimpleTest %tmp/SINGLE_INPUTS/aaa %tmp/SINGLE_INPUTS/bbb 2>&1 | FileCheck %s --check-prefix=SINGLE_INPUTS
|
|
|
|
RUN: rm -rf %tmp/SINGLE_INPUTS
|
2016-02-12 10:32:03 +08:00
|
|
|
SINGLE_INPUTS: LLVMFuzzer-SimpleTest: Running 2 inputs 1 time(s) each.
|
2016-02-02 11:03:47 +08:00
|
|
|
SINGLE_INPUTS: aaa:
|
|
|
|
SINGLE_INPUTS: bbb:
|
|
|
|
|
2016-02-04 08:12:28 +08:00
|
|
|
RUN: not LLVMFuzzer-LeakTest -runs=10 2>&1 | FileCheck %s --check-prefix=LEAK
|
2016-02-04 08:02:17 +08:00
|
|
|
LEAK: ERROR: LeakSanitizer: detected memory leaks
|
|
|
|
LEAK-NOT: DEATH:
|
2016-02-12 10:32:03 +08:00
|
|
|
|
2016-02-13 11:25:16 +08:00
|
|
|
RUN: mkdir -p %t
|
2016-02-12 10:32:03 +08:00
|
|
|
RUN: echo abcd > %t/NthRunCrashTest.in
|
|
|
|
RUN: LLVMFuzzer-NthRunCrashTest %t/NthRunCrashTest.in
|
|
|
|
RUN: LLVMFuzzer-NthRunCrashTest %t/NthRunCrashTest.in -runs=10
|
|
|
|
RUN: not LLVMFuzzer-NthRunCrashTest %t/NthRunCrashTest.in -runs=10000 2>&1 | FileCheck %s
|
|
|
|
RUN: rm %t/NthRunCrashTest.in
|
2016-02-13 10:29:38 +08:00
|
|
|
|
|
|
|
RUN: not LLVMFuzzer-CustomMutatorTest 2>&1 | FileCheck %s --check-prefix=LLVMFuzzerCustomMutator
|
|
|
|
LLVMFuzzerCustomMutator: In LLVMFuzzerCustomMutator
|
|
|
|
LLVMFuzzerCustomMutator: BINGO
|
2016-02-27 06:42:23 +08:00
|
|
|
|
|
|
|
RUN: LLVMFuzzer-SimpleTest -seed=1 -runs=77 -print_final_stats=1 2>&1 | FileCheck %s --check-prefix=FINAL_STATS
|
|
|
|
FINAL_STATS: stat::number_of_executed_units: 77
|
|
|
|
FINAL_STATS: stat::average_exec_per_sec: 0
|
|
|
|
FINAL_STATS: stat::new_units_added:
|
|
|
|
FINAL_STATS: stat::slowest_unit_time_sec: 0
|
|
|
|
FINAL_STATS: stat::peak_rss_mb:
|
|
|
|
|