Skip to content

Commit 949c429

Browse files
author
George Karpenkov
committed
[libFuzzer] [NFC] Generalize DSO tests to work even when files are moved.
Differential Revision: https://reviews.llvm.org/D47292 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@333243 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent ee03851 commit 949c429

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

test/fuzzer/dso.test

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
RUN: %cpp_compiler %S/DSO1.cpp -fPIC -shared -o %t-DSO1.so
2-
RUN: %cpp_compiler %S/DSO2.cpp -fPIC -shared -o %t-DSO2.so
3-
RUN: %cpp_compiler %S/DSOTestMain.cpp %S/DSOTestExtra.cpp -L. %t-DSO1.so %t-DSO2.so -o %t-DSOTest
1+
RUN: %cpp_compiler %S/DSO1.cpp -fPIC -shared -o %dynamiclib1 %ld_flags_rpath_so1
2+
RUN: %cpp_compiler %S/DSO2.cpp -fPIC -shared -o %dynamiclib2 %ld_flags_rpath_so2
3+
RUN: %cpp_compiler %S/DSOTestMain.cpp %S/DSOTestExtra.cpp %ld_flags_rpath_exe1 %ld_flags_rpath_exe2 -o %t-DSOTest
44

55
RUN: not %run %t-DSOTest 2>&1 | FileCheck %s --check-prefix=DSO
66
DSO: INFO: Loaded 3 modules

test/fuzzer/dump_coverage.test

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
UNSUPPORTED: freebsd
2-
RUN: %cpp_compiler -fsanitize-coverage=0 -fsanitize-coverage=trace-pc-guard %S/DSO1.cpp -fPIC -shared -o %t-DSO1.so
3-
RUN: %cpp_compiler -fsanitize-coverage=0 -fsanitize-coverage=trace-pc-guard %S/DSO2.cpp -fPIC -shared -o %t-DSO2.so
4-
RUN: %cpp_compiler -fsanitize-coverage=0 -fsanitize-coverage=trace-pc-guard %S/DSOTestMain.cpp %S/DSOTestExtra.cpp -L. %t-DSO1.so %t-DSO2.so -o %t-DSOTest
2+
RUN: %cpp_compiler -fsanitize-coverage=0 -fsanitize-coverage=trace-pc-guard %S/DSO1.cpp -fPIC -shared -o %dynamiclib1 %ld_flags_rpath_so1
3+
RUN: %cpp_compiler -fsanitize-coverage=0 -fsanitize-coverage=trace-pc-guard %S/DSO2.cpp -fPIC -shared -o %dynamiclib2 %ld_flags_rpath_so2
4+
RUN: %cpp_compiler -fsanitize-coverage=0 -fsanitize-coverage=trace-pc-guard %S/DSOTestMain.cpp %S/DSOTestExtra.cpp %ld_flags_rpath_exe1 %ld_flags_rpath_exe2 -o %t-DSOTest
55

66
RUN: %cpp_compiler -fsanitize-coverage=0 -fsanitize-coverage=trace-pc-guard %S/NullDerefTest.cpp -o %t-NullDerefTest
77

@@ -15,7 +15,7 @@ CHECK: SanitizerCoverage: {{.*}}NullDerefTest.{{.*}}.sancov: {{.*}} PCs written
1515
SANCOV: LLVMFuzzerTestOneInput
1616

1717
DSO: SanitizerCoverage: {{.*}}DSOTest.{{.*}}.sancov: {{.*}} PCs written
18-
DSO-DAG: SanitizerCoverage: {{.*}}DSO1.{{.*}}.sancov: {{.*}} PCs written
19-
DSO-DAG: SanitizerCoverage: {{.*}}DSO2.{{.*}}.sancov: {{.*}} PCs written
18+
DSO-DAG: SanitizerCoverage: {{.*}}1.{{.*}}.sancov: {{.*}} PCs written
19+
DSO-DAG: SanitizerCoverage: {{.*}}2.{{.*}}.sancov: {{.*}} PCs written
2020

2121
NOCOV-NOT: SanitizerCoverage: {{.*}} PCs written

0 commit comments

Comments
 (0)