2015-05-07 08:11:33 +08:00
|
|
|
CHECK: BINGO
|
2015-12-19 11:35:30 +08:00
|
|
|
Done1000000: Done 1000000 runs in
|
2017-08-05 04:05:25 +08:00
|
|
|
RUN: %cpp_compiler %S/BogusInitializeTest.cpp -o %t-BogusInitializeTest
|
|
|
|
RUN: %cpp_compiler %S/BufferOverflowOnInput.cpp -o %t-BufferOverflowOnInput
|
|
|
|
RUN: %cpp_compiler %S/CounterTest.cpp -o %t-CounterTest
|
|
|
|
RUN: %cpp_compiler %S/DSO1.cpp -fPIC -shared -o %t-DSO1.so
|
|
|
|
RUN: %cpp_compiler %S/DSO2.cpp -fPIC -shared -o %t-DSO2.so
|
|
|
|
RUN: %cpp_compiler %S/DSOTestMain.cpp %S/DSOTestExtra.cpp -L. %t-DSO1.so %t-DSO2.so -o %t-DSOTest
|
|
|
|
RUN: %cpp_compiler %S/FullCoverageSetTest.cpp -o %t-FullCoverageSetTest
|
|
|
|
RUN: %cpp_compiler %S/InitializeTest.cpp -o %t-InitializeTest
|
2017-08-15 03:55:23 +08:00
|
|
|
RUN: %cpp_compiler %S/NotinstrumentedTest.cpp -fsanitize-coverage=0 -o %t-NotinstrumentedTest-NoCoverage
|
2017-08-05 04:05:25 +08:00
|
|
|
RUN: %cpp_compiler %S/NullDerefOnEmptyTest.cpp -o %t-NullDerefOnEmptyTest
|
|
|
|
RUN: %cpp_compiler %S/NullDerefTest.cpp -o %t-NullDerefTest
|
|
|
|
RUN: %cpp_compiler %S/SimpleCmpTest.cpp -o %t-SimpleCmpTest
|
|
|
|
RUN: %cpp_compiler %S/SimpleTest.cpp -o %t-SimpleTest
|
|
|
|
RUN: %cpp_compiler %S/StrncmpOOBTest.cpp -o %t-StrncmpOOBTest
|
|
|
|
|
|
|
|
RUN: not %t-SimpleTest 2>&1 | FileCheck %s
|
2015-01-30 00:58:29 +08:00
|
|
|
|
2016-05-27 04:03:02 +08:00
|
|
|
# only_ascii mode. Will perform some minimal self-validation.
|
2017-08-05 04:05:25 +08:00
|
|
|
RUN: not %t-SimpleTest -only_ascii=1 2>&1
|
2016-05-27 04:03:02 +08:00
|
|
|
|
2017-08-05 04:05:25 +08:00
|
|
|
RUN: %t-SimpleCmpTest -max_total_time=1 -use_cmp=0 2>&1 | FileCheck %s --check-prefix=MaxTotalTime
|
2015-10-03 04:47:55 +08:00
|
|
|
MaxTotalTime: Done {{.*}} runs in {{.}} second(s)
|
|
|
|
|
2017-08-05 04:05:25 +08:00
|
|
|
RUN: not %t-NullDerefTest 2>&1 | FileCheck %s --check-prefix=NullDerefTest
|
|
|
|
RUN: not %t-NullDerefTest -close_fd_mask=3 2>&1 | FileCheck %s --check-prefix=NullDerefTest
|
2017-02-08 08:02:25 +08:00
|
|
|
NullDerefTest: ERROR: AddressSanitizer: {{SEGV|access-violation}} on unknown address
|
2015-10-09 11:57:59 +08:00
|
|
|
NullDerefTest: Test unit written to ./crash-
|
2017-08-05 04:05:25 +08:00
|
|
|
RUN: not %t-NullDerefTest -artifact_prefix=ZZZ 2>&1 | FileCheck %s --check-prefix=NullDerefTestPrefix
|
2015-10-09 11:57:59 +08:00
|
|
|
NullDerefTestPrefix: Test unit written to ZZZcrash-
|
2017-08-05 04:05:25 +08:00
|
|
|
RUN: not %t-NullDerefTest -artifact_prefix=ZZZ -exact_artifact_path=FOOBAR 2>&1 | FileCheck %s --check-prefix=NullDerefTestExactPath
|
2015-11-26 05:40:46 +08:00
|
|
|
NullDerefTestExactPath: Test unit written to FOOBAR
|
2015-01-30 07:01:07 +08:00
|
|
|
|
2017-08-05 04:05:25 +08:00
|
|
|
RUN: not %t-NullDerefOnEmptyTest -print_final_stats=1 2>&1 | FileCheck %s --check-prefix=NULL_DEREF_ON_EMPTY
|
2016-05-25 08:15:36 +08:00
|
|
|
NULL_DEREF_ON_EMPTY: stat::number_of_executed_units:
|
|
|
|
|
2017-08-05 04:05:25 +08:00
|
|
|
#not %t-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
|
|
|
|
2017-08-05 04:05:25 +08:00
|
|
|
RUN: not %t-CounterTest -max_len=6 -seed=1 -timeout=15 2>&1 | FileCheck %s --check-prefix=COUNTERS
|
2016-09-15 09:30:18 +08:00
|
|
|
|
2016-10-06 06:56:21 +08:00
|
|
|
COUNTERS: INITED {{.*}} {{bits:|ft:}}
|
|
|
|
COUNTERS: NEW {{.*}} {{bits:|ft:}} {{[1-9]*}}
|
|
|
|
COUNTERS: NEW {{.*}} {{bits:|ft:}} {{[1-9]*}}
|
2016-09-15 09:30:18 +08:00
|
|
|
COUNTERS: BINGO
|
2015-02-20 11:02:37 +08:00
|
|
|
|
2016-12-13 04:58:10 +08:00
|
|
|
# Don't run UninstrumentedTest for now since we build libFuzzer itself with asan.
|
2017-08-05 04:05:25 +08:00
|
|
|
DISABLED: not %t-UninstrumentedTest-Uninstrumented 2>&1 | FileCheck %s --check-prefix=UNINSTRUMENTED
|
2015-11-10 07:17:45 +08:00
|
|
|
UNINSTRUMENTED: ERROR: __sanitizer_set_death_callback is not defined. Exiting.
|
2016-01-06 08:21:22 +08:00
|
|
|
|
2017-08-05 04:05:25 +08:00
|
|
|
RUN: not %t-NotinstrumentedTest-NoCoverage 2>&1 | FileCheck %s --check-prefix=NO_COVERAGE
|
2016-06-08 09:46:13 +08:00
|
|
|
NO_COVERAGE: ERROR: no interesting inputs were found. Is the code instrumented for coverage? Exiting
|
|
|
|
|
2017-08-05 04:05:25 +08:00
|
|
|
RUN: not %t-BufferOverflowOnInput 2>&1 | FileCheck %s --check-prefix=OOB
|
2016-01-14 07:02:30 +08:00
|
|
|
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
|
|
|
|
2017-08-05 04:05:25 +08:00
|
|
|
RUN: not %t-InitializeTest -use_value_profile=1 2>&1 | FileCheck %s
|
2016-01-20 04:33:57 +08:00
|
|
|
|
2017-08-05 04:05:25 +08:00
|
|
|
RUN: not %t-DSOTest 2>&1 | FileCheck %s --check-prefix=DSO
|
2016-09-17 13:04:47 +08:00
|
|
|
DSO: INFO: Loaded 3 modules
|
|
|
|
DSO: BINGO
|
|
|
|
|
2017-08-05 04:05:25 +08:00
|
|
|
RUN: env ASAN_OPTIONS=strict_string_checks=1 not %t-StrncmpOOBTest -seed=1 -runs=1000000 2>&1 | FileCheck %s --check-prefix=STRNCMP
|
2016-10-22 08:05:44 +08:00
|
|
|
STRNCMP: AddressSanitizer: heap-buffer-overflow
|
|
|
|
STRNCMP-NOT: __sanitizer_weak_hook_strncmp
|
|
|
|
STRNCMP: in LLVMFuzzerTestOneInput
|
2017-01-21 05:34:24 +08:00
|
|
|
|
2017-08-05 04:05:25 +08:00
|
|
|
RUN: not %t-BogusInitializeTest 2>&1 | FileCheck %s --check-prefix=BOGUS_INITIALIZE
|
2017-01-21 05:34:24 +08:00
|
|
|
BOGUS_INITIALIZE: argv[0] has been modified in LLVMFuzzerInitialize
|