summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorge Karpenkov <ekarpenkov@apple.com>2018-05-24 23:55:53 +0000
committerGeorge Karpenkov <ekarpenkov@apple.com>2018-05-24 23:55:53 +0000
commitfe44eb4cf10e7b06cbb9fb70814c07770df4c7b9 (patch)
treec06ee7c3c314f522fef384231f5c55e1b67aabec
parent464d1415b2befb1db8469076cb977bb4892ded43 (diff)
downloadbcm5719-llvm-fe44eb4cf10e7b06cbb9fb70814c07770df4c7b9.tar.gz
bcm5719-llvm-fe44eb4cf10e7b06cbb9fb70814c07770df4c7b9.zip
[libFuzzer] [NFC] Generalize DSO tests to work even when files are moved.
Differential Revision: https://reviews.llvm.org/D47292 llvm-svn: 333243
-rw-r--r--compiler-rt/test/fuzzer/dso.test6
-rw-r--r--compiler-rt/test/fuzzer/dump_coverage.test10
2 files changed, 8 insertions, 8 deletions
diff --git a/compiler-rt/test/fuzzer/dso.test b/compiler-rt/test/fuzzer/dso.test
index d17ffe8ede1..35bc93de2fa 100644
--- a/compiler-rt/test/fuzzer/dso.test
+++ b/compiler-rt/test/fuzzer/dso.test
@@ -1,6 +1,6 @@
-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/DSO1.cpp -fPIC -shared -o %dynamiclib1 %ld_flags_rpath_so1
+RUN: %cpp_compiler %S/DSO2.cpp -fPIC -shared -o %dynamiclib2 %ld_flags_rpath_so2
+RUN: %cpp_compiler %S/DSOTestMain.cpp %S/DSOTestExtra.cpp %ld_flags_rpath_exe1 %ld_flags_rpath_exe2 -o %t-DSOTest
RUN: not %run %t-DSOTest 2>&1 | FileCheck %s --check-prefix=DSO
DSO: INFO: Loaded 3 modules
diff --git a/compiler-rt/test/fuzzer/dump_coverage.test b/compiler-rt/test/fuzzer/dump_coverage.test
index dd3e73e44c0..6d8feb84f93 100644
--- a/compiler-rt/test/fuzzer/dump_coverage.test
+++ b/compiler-rt/test/fuzzer/dump_coverage.test
@@ -1,7 +1,7 @@
UNSUPPORTED: freebsd
-RUN: %cpp_compiler -fsanitize-coverage=0 -fsanitize-coverage=trace-pc-guard %S/DSO1.cpp -fPIC -shared -o %t-DSO1.so
-RUN: %cpp_compiler -fsanitize-coverage=0 -fsanitize-coverage=trace-pc-guard %S/DSO2.cpp -fPIC -shared -o %t-DSO2.so
-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
+RUN: %cpp_compiler -fsanitize-coverage=0 -fsanitize-coverage=trace-pc-guard %S/DSO1.cpp -fPIC -shared -o %dynamiclib1 %ld_flags_rpath_so1
+RUN: %cpp_compiler -fsanitize-coverage=0 -fsanitize-coverage=trace-pc-guard %S/DSO2.cpp -fPIC -shared -o %dynamiclib2 %ld_flags_rpath_so2
+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
RUN: %cpp_compiler -fsanitize-coverage=0 -fsanitize-coverage=trace-pc-guard %S/NullDerefTest.cpp -o %t-NullDerefTest
@@ -15,7 +15,7 @@ CHECK: SanitizerCoverage: {{.*}}NullDerefTest.{{.*}}.sancov: {{.*}} PCs written
SANCOV: LLVMFuzzerTestOneInput
DSO: SanitizerCoverage: {{.*}}DSOTest.{{.*}}.sancov: {{.*}} PCs written
-DSO-DAG: SanitizerCoverage: {{.*}}DSO1.{{.*}}.sancov: {{.*}} PCs written
-DSO-DAG: SanitizerCoverage: {{.*}}DSO2.{{.*}}.sancov: {{.*}} PCs written
+DSO-DAG: SanitizerCoverage: {{.*}}1.{{.*}}.sancov: {{.*}} PCs written
+DSO-DAG: SanitizerCoverage: {{.*}}2.{{.*}}.sancov: {{.*}} PCs written
NOCOV-NOT: SanitizerCoverage: {{.*}} PCs written
OpenPOWER on IntegriCloud