comparison projects/compiler-rt/test/fuzzer/coverage.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 RUN: %cpp_compiler -mllvm -use-unknown-locations=Disable %S/NullDerefTest.cpp -o %t-NullDerefTest
2 RUN: %cpp_compiler -mllvm -use-unknown-locations=Disable %S/DSO1.cpp -fPIC -shared -o %t-DSO1.so
3 RUN: %cpp_compiler -mllvm -use-unknown-locations=Disable %S/DSO2.cpp -fPIC -shared -o %t-DSO2.so
4 RUN: %cpp_compiler -mllvm -use-unknown-locations=Disable %S/DSOTestMain.cpp %S/DSOTestExtra.cpp -L. %t-DSO1.so %t-DSO2.so -o %t-DSOTest
5
6 CHECK: COVERAGE:
7 CHECK-DAG: COVERED: {{.*}}in LLVMFuzzerTestOneInput {{.*}}NullDerefTest.cpp:13
8 CHECK-DAG: COVERED: {{.*}}in LLVMFuzzerTestOneInput {{.*}}NullDerefTest.cpp:14
9 CHECK-DAG: COVERED: {{.*}}in LLVMFuzzerTestOneInput {{.*}}NullDerefTest.cpp:16
10 RUN: not %t-NullDerefTest -print_coverage=1 2>&1 | FileCheck %s
11
12 RUN: %t-DSOTest -print_coverage=1 -runs=0 2>&1 | FileCheck %s --check-prefix=DSO
13 DSO: COVERAGE:
14 DSO-DAG: COVERED:{{.*}}DSO1{{.*}}DSO1.cpp
15 DSO-DAG: COVERED:{{.*}}DSO2{{.*}}DSO2.cpp
16 DSO-DAG: COVERED:{{.*}}LLVMFuzzerTestOneInput{{.*}}DSOTestMain
17 DSO-DAG: UNCOVERED_LINE:{{.*}}DSO1{{.*}}DSO1.cpp
18 DSO-DAG: UNCOVERED_LINE:{{.*}}DSO2{{.*}}DSO2.cpp
19 DSO-DAG: UNCOVERED_FUNC: in Uncovered1
20 DSO-DAG: UNCOVERED_FUNC: in Uncovered2
21 DSO-DAG: UNCOVERED_LINE: in LLVMFuzzerTestOneInput