2018-09-05 01:08:47 +08:00
|
|
|
# FIXME: Disabled on Windows because -fPIC cannot be used to compile for Windows.
|
2018-10-10 08:57:44 +08:00
|
|
|
UNSUPPORTED: windows
|
2017-08-22 07:25:50 +08:00
|
|
|
RUN: %cpp_compiler -mllvm -use-unknown-locations=Disable %S/NullDerefTest.cpp -o %t-NullDerefTest
|
2018-06-15 06:13:36 +08:00
|
|
|
RUN: %cpp_compiler -mllvm -use-unknown-locations=Disable %S/DSO1.cpp -fPIC %ld_flags_rpath_so1 -shared -o %dynamiclib1
|
|
|
|
RUN: %cpp_compiler -mllvm -use-unknown-locations=Disable %S/DSO2.cpp -fPIC %ld_flags_rpath_so2 -shared -o %dynamiclib2
|
|
|
|
RUN: %cpp_compiler -mllvm -use-unknown-locations=Disable %S/DSOTestMain.cpp %S/DSOTestExtra.cpp %ld_flags_rpath_exe1 %ld_flags_rpath_exe2 -o %t-DSOTest
|
2017-08-22 07:25:50 +08:00
|
|
|
|
|
|
|
CHECK: COVERAGE:
|
2019-01-21 10:22:06 +08:00
|
|
|
CHECK: COVERED_FUNC: {{.*}}LLVMFuzzerTestOneInput {{.*}}NullDerefTest.cpp:14
|
2018-05-12 05:29:51 +08:00
|
|
|
RUN: not %run %t-NullDerefTest -print_coverage=1 2>&1 | FileCheck %s
|
2017-08-22 07:25:50 +08:00
|
|
|
|
2018-05-12 05:29:51 +08:00
|
|
|
RUN: %run %t-DSOTest -print_coverage=1 -runs=0 2>&1 | FileCheck %s --check-prefix=DSO
|
2017-08-22 07:25:50 +08:00
|
|
|
DSO: COVERAGE:
|
2018-06-15 06:13:36 +08:00
|
|
|
DSO-DAG: COVERED_FUNC:{{.*}}1{{.*}}
|
|
|
|
DSO-DAG: COVERED_FUNC:{{.*}}2{{.*}}
|
2018-05-11 09:17:52 +08:00
|
|
|
DSO-DAG: COVERED_FUNC:{{.*}}LLVMFuzzerTestOneInput{{.*}}DSOTestMain
|
2018-06-15 06:13:36 +08:00
|
|
|
DSO-DAG: UNCOVERED_PC:{{.*}}1
|
|
|
|
DSO-DAG: UNCOVERED_PC:{{.*}}2
|
2018-05-11 09:17:52 +08:00
|
|
|
DSO-DAG: UNCOVERED_PC:{{.*}}DSOTestMain
|
2019-01-26 09:33:09 +08:00
|
|
|
DSO-DAG: UNCOVERED_FUNC:{{.*}}Uncovered1
|