comparison projects/compiler-rt/test/fuzzer/fuzzer.test @ 131:f476a9ba4795

http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
author mir3636
date Fri, 16 Feb 2018 21:02:11 +0900
parents
children
comparison
equal deleted inserted replaced
130:cc94f0a83282 131:f476a9ba4795
1 CHECK: BINGO
2 Done1000000: Done 1000000 runs in
3 RUN: %cpp_compiler %S/BogusInitializeTest.cpp -o %t-BogusInitializeTest
4 RUN: %cpp_compiler %S/BufferOverflowOnInput.cpp -o %t-BufferOverflowOnInput
5 RUN: %cpp_compiler %S/CounterTest.cpp -o %t-CounterTest
6 RUN: %cpp_compiler %S/DSO1.cpp -fPIC -shared -o %t-DSO1.so
7 RUN: %cpp_compiler %S/DSO2.cpp -fPIC -shared -o %t-DSO2.so
8 RUN: %cpp_compiler %S/DSOTestMain.cpp %S/DSOTestExtra.cpp -L. %t-DSO1.so %t-DSO2.so -o %t-DSOTest
9 RUN: %cpp_compiler %S/FullCoverageSetTest.cpp -o %t-FullCoverageSetTest
10 RUN: %cpp_compiler %S/InitializeTest.cpp -o %t-InitializeTest
11 RUN: %cpp_compiler %S/NotinstrumentedTest.cpp -fsanitize-coverage=0 -o %t-NotinstrumentedTest-NoCoverage
12 RUN: %cpp_compiler %S/NullDerefOnEmptyTest.cpp -o %t-NullDerefOnEmptyTest
13 RUN: %cpp_compiler %S/NullDerefTest.cpp -o %t-NullDerefTest
14 RUN: %cpp_compiler %S/SimpleCmpTest.cpp -o %t-SimpleCmpTest
15 RUN: %cpp_compiler %S/SimpleTest.cpp -o %t-SimpleTest
16 RUN: %cpp_compiler %S/StrncmpOOBTest.cpp -o %t-StrncmpOOBTest
17
18 RUN: not %t-SimpleTest 2>&1 | FileCheck %s
19
20 # only_ascii mode. Will perform some minimal self-validation.
21 RUN: not %t-SimpleTest -only_ascii=1 2>&1
22
23 RUN: %t-SimpleCmpTest -max_total_time=1 -use_cmp=0 2>&1 | FileCheck %s --check-prefix=MaxTotalTime
24 MaxTotalTime: Done {{.*}} runs in {{.}} second(s)
25
26 RUN: not %t-NullDerefTest 2>&1 | FileCheck %s --check-prefix=NullDerefTest
27 RUN: not %t-NullDerefTest -close_fd_mask=3 2>&1 | FileCheck %s --check-prefix=NullDerefTest
28 NullDerefTest: ERROR: AddressSanitizer: {{SEGV|access-violation}} on unknown address
29 NullDerefTest: Test unit written to ./crash-
30 RUN: not %t-NullDerefTest -artifact_prefix=ZZZ 2>&1 | FileCheck %s --check-prefix=NullDerefTestPrefix
31 NullDerefTestPrefix: Test unit written to ZZZcrash-
32 RUN: not %t-NullDerefTest -artifact_prefix=ZZZ -exact_artifact_path=FOOBAR 2>&1 | FileCheck %s --check-prefix=NullDerefTestExactPath
33 NullDerefTestExactPath: Test unit written to FOOBAR
34
35 RUN: not %t-NullDerefOnEmptyTest -print_final_stats=1 2>&1 | FileCheck %s --check-prefix=NULL_DEREF_ON_EMPTY
36 NULL_DEREF_ON_EMPTY: stat::number_of_executed_units:
37
38 #not %t-FullCoverageSetTest -timeout=15 -seed=1 -mutate_depth=2 -use_full_coverage_set=1 2>&1 | FileCheck %s
39
40 RUN: not %t-CounterTest -max_len=6 -seed=1 -timeout=15 2>&1 | FileCheck %s --check-prefix=COUNTERS
41
42 COUNTERS: INITED {{.*}} {{bits:|ft:}}
43 COUNTERS: NEW {{.*}} {{bits:|ft:}} {{[1-9]*}}
44 COUNTERS: NEW {{.*}} {{bits:|ft:}} {{[1-9]*}}
45 COUNTERS: BINGO
46
47 # Don't run UninstrumentedTest for now since we build libFuzzer itself with asan.
48 DISABLED: not %t-UninstrumentedTest-Uninstrumented 2>&1 | FileCheck %s --check-prefix=UNINSTRUMENTED
49 UNINSTRUMENTED: ERROR: __sanitizer_set_death_callback is not defined. Exiting.
50
51 RUN: not %t-NotinstrumentedTest-NoCoverage 2>&1 | FileCheck %s --check-prefix=NO_COVERAGE
52 NO_COVERAGE: ERROR: no interesting inputs were found. Is the code instrumented for coverage? Exiting
53
54 RUN: not %t-BufferOverflowOnInput 2>&1 | FileCheck %s --check-prefix=OOB
55 OOB: AddressSanitizer: heap-buffer-overflow
56 OOB: is located 0 bytes to the right of 3-byte region
57
58 RUN: not %t-InitializeTest -use_value_profile=1 2>&1 | FileCheck %s
59
60 RUN: not %t-DSOTest 2>&1 | FileCheck %s --check-prefix=DSO
61 DSO: INFO: Loaded 3 modules
62 DSO: BINGO
63
64 RUN: env ASAN_OPTIONS=strict_string_checks=1 not %t-StrncmpOOBTest -seed=1 -runs=1000000 2>&1 | FileCheck %s --check-prefix=STRNCMP
65 STRNCMP: AddressSanitizer: heap-buffer-overflow
66 STRNCMP-NOT: __sanitizer_weak_hook_strncmp
67 STRNCMP: in LLVMFuzzerTestOneInput
68
69 RUN: not %t-BogusInitializeTest 2>&1 | FileCheck %s --check-prefix=BOGUS_INITIALIZE
70 BOGUS_INITIALIZE: argv[0] has been modified in LLVMFuzzerInitialize