Skip to content

Commit bd50a6b

Browse files
committed
[compiler-rt] Remove temporary directories from lit tests
This patch removes substitutions that create temporary directories to house executables in.
1 parent 3a1111d commit bd50a6b

File tree

14 files changed

+91
-105
lines changed

14 files changed

+91
-105
lines changed

compiler-rt/test/asan/TestCases/Linux/odr-violation.cpp

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -10,39 +10,38 @@
1010
// -fno-sanitize-address-use-odr-indicator turns off both.
1111
//
1212
// Different size: detect a bug if detect_odr_violation>=1
13-
// RUN: mkdir -p %t.dir && cd %t.dir
1413
// RUN: %clangxx_asan -g -DBUILD_SO=1 -fPIC -shared -fno-sanitize-address-use-odr-indicator %s -o %dynamiclib
15-
// RUN: %clangxx_asan -g -fno-sanitize-address-use-odr-indicator %s %ld_flags_rpath_exe -o %t.dir/ODR-EXE
16-
// RUN: %env_asan_opts=fast_unwind_on_malloc=0:detect_odr_violation=1 not %run %t.dir/ODR-EXE 2>&1 | FileCheck %s
17-
// RUN: %env_asan_opts=fast_unwind_on_malloc=0:detect_odr_violation=2 not %run %t.dir/ODR-EXE 2>&1 | FileCheck %s
18-
// RUN: %env_asan_opts=fast_unwind_on_malloc=0:detect_odr_violation=0 %run %t.dir/ODR-EXE 2>&1 | FileCheck %s --check-prefix=DISABLED
19-
// RUN: %env_asan_opts=fast_unwind_on_malloc=0 not %run %t.dir/ODR-EXE 2>&1 | FileCheck %s
14+
// RUN: %clangxx_asan -g -fno-sanitize-address-use-odr-indicator %s %ld_flags_rpath_exe -o %t-ODR-EXE
15+
// RUN: %env_asan_opts=fast_unwind_on_malloc=0:detect_odr_violation=1 not %run %t-ODR-EXE 2>&1 | FileCheck %s
16+
// RUN: %env_asan_opts=fast_unwind_on_malloc=0:detect_odr_violation=2 not %run %t-ODR-EXE 2>&1 | FileCheck %s
17+
// RUN: %env_asan_opts=fast_unwind_on_malloc=0:detect_odr_violation=0 %run %t-ODR-EXE 2>&1 | FileCheck %s --check-prefix=DISABLED
18+
// RUN: %env_asan_opts=fast_unwind_on_malloc=0 not %run %t-ODR-EXE 2>&1 | FileCheck %s
2019
//
2120
// Same size: report a bug only if detect_odr_violation>=2.
2221
// RUN: %clangxx_asan -g -DBUILD_SO=1 -fPIC -shared -fno-sanitize-address-use-odr-indicator %s -o %dynamiclib -DSZ=100
23-
// RUN: %env_asan_opts=fast_unwind_on_malloc=0:detect_odr_violation=1 %run %t.dir/ODR-EXE 2>&1 | FileCheck %s --check-prefix=DISABLED
24-
// RUN: %env_asan_opts=fast_unwind_on_malloc=0:detect_odr_violation=2 not %run %t.dir/ODR-EXE 2>&1 | FileCheck %s
25-
// RUN: %env_asan_opts=fast_unwind_on_malloc=0 not %run %t.dir/ODR-EXE 2>&1 | FileCheck %s
26-
// RUN: echo "odr_violation:foo::ZZZ" > %t.dir/supp
27-
// RUN: %env_asan_opts=fast_unwind_on_malloc=0:detect_odr_violation=2:suppressions=%t.dir/supp not %run %t.dir/ODR-EXE 2>&1 | FileCheck %s
28-
// RUN: echo "odr_violation:foo::G" > %t.dir/supp
29-
// RUN: %env_asan_opts=fast_unwind_on_malloc=0:detect_odr_violation=2:suppressions=%t.dir/supp %run %t.dir/ODR-EXE 2>&1 | FileCheck %s --check-prefix=DISABLED
30-
// RUN: rm -f %t.dir/supp
22+
// RUN: %env_asan_opts=fast_unwind_on_malloc=0:detect_odr_violation=1 %run %t-ODR-EXE 2>&1 | FileCheck %s --check-prefix=DISABLED
23+
// RUN: %env_asan_opts=fast_unwind_on_malloc=0:detect_odr_violation=2 not %run %t-ODR-EXE 2>&1 | FileCheck %s
24+
// RUN: %env_asan_opts=fast_unwind_on_malloc=0 not %run %t-ODR-EXE 2>&1 | FileCheck %s
25+
// RUN: echo "odr_violation:foo::ZZZ" > %t.supp
26+
// RUN: %env_asan_opts=fast_unwind_on_malloc=0:detect_odr_violation=2:suppressions=%t.supp not %run %t-ODR-EXE 2>&1 | FileCheck %s
27+
// RUN: echo "odr_violation:foo::G" > %t.supp
28+
// RUN: %env_asan_opts=fast_unwind_on_malloc=0:detect_odr_violation=2:suppressions=%t.supp %run %t-ODR-EXE 2>&1 | FileCheck %s --check-prefix=DISABLED
29+
// RUN: rm -f %t.supp
3130
//
3231
// Use private aliases for global variables without indicator symbol.
3332
// RUN: %clangxx_asan -g -DBUILD_SO=1 -fPIC -shared -mllvm -asan-use-odr-indicator=0 %s -o %dynamiclib -DSZ=100
34-
// RUN: %clangxx_asan -g -mllvm -asan-use-odr-indicator=0 %s %ld_flags_rpath_exe -o %t.dir/ODR-EXE
35-
// RUN: %env_asan_opts=fast_unwind_on_malloc=0 %run %t.dir/ODR-EXE 2>&1 | FileCheck %s --check-prefix=DISABLED
33+
// RUN: %clangxx_asan -g -mllvm -asan-use-odr-indicator=0 %s %ld_flags_rpath_exe -o %t-ODR-EXE
34+
// RUN: %env_asan_opts=fast_unwind_on_malloc=0 %run %t-ODR-EXE 2>&1 | FileCheck %s --check-prefix=DISABLED
3635

3736
// Use private aliases for global variables: use indicator symbol to detect ODR violation.
3837
// RUN: %clangxx_asan -g -DBUILD_SO=1 -fPIC -shared %s -o %dynamiclib -DSZ=100
39-
// RUN: %clangxx_asan -g %s %ld_flags_rpath_exe -o %t.dir/ODR-EXE
40-
// RUN: %env_asan_opts=fast_unwind_on_malloc=0 not %run %t.dir/ODR-EXE 2>&1 | FileCheck %s
38+
// RUN: %clangxx_asan -g %s %ld_flags_rpath_exe -o %t-ODR-EXE
39+
// RUN: %env_asan_opts=fast_unwind_on_malloc=0 not %run %t-ODR-EXE 2>&1 | FileCheck %s
4140

4241
// Same as above but with clang switches.
4342
// RUN: %clangxx_asan -g -DBUILD_SO=1 -fPIC -shared -fsanitize-address-use-odr-indicator %s -o %dynamiclib -DSZ=100
44-
// RUN: %clangxx_asan -g -fsanitize-address-use-odr-indicator %s %ld_flags_rpath_exe -o %t.dir/ODR-EXE
45-
// RUN: %env_asan_opts=fast_unwind_on_malloc=0 not %run %t.dir/ODR-EXE 2>&1 | FileCheck %s
43+
// RUN: %clangxx_asan -g -fsanitize-address-use-odr-indicator %s %ld_flags_rpath_exe -o %t-ODR-EXE
44+
// RUN: %env_asan_opts=fast_unwind_on_malloc=0 not %run %t-ODR-EXE 2>&1 | FileCheck %s
4645

4746
// GNU driver doesn't handle .so files properly.
4847
// REQUIRES: Clang
@@ -59,15 +58,15 @@ namespace foo { char G[SZ]; }
5958
#include <stdio.h>
6059
namespace foo { char G[100]; }
6160
// CHECK: ERROR: AddressSanitizer: odr-violation
62-
// CHECK: size=100 'foo::G' {{.*}}odr-violation.cpp:[[@LINE-2]] in {{.*}}/ODR-EXE
61+
// CHECK: size=100 'foo::G' {{.*}}odr-violation.cpp:[[@LINE-2]] in {{.*}}ODR-EXE
6362
// CHECK: size={{4|100}} 'foo::G'
6463
int main(int argc, char **argv) {
6564
printf("PASS: %p\n", &foo::G);
6665
}
6766
#endif
6867

6968
// CHECK: These globals were registered at these points:
70-
// CHECK: {{odr-violation.cpp|ODR-EXE}}
69+
// CHECK: {{odr-violation.cpp|.*ODR-EXE}}
7170
// CHECK: odr-violation.cpp{{$}}
7271
// CHECK: SUMMARY: AddressSanitizer: odr-violation: global 'foo::G' at {{.*}}odr-violation.cpp
7372
// DISABLED: PASS

compiler-rt/test/asan/TestCases/Linux/preinit_test.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
// RUN: mkdir -p %t.dir && cd %t.dir
21
// RUN: %clangxx -DFUNC=zzzz %s -shared -o %dynamiclib -fPIC
3-
// RUN: %clangxx_asan -DFUNC=main %s -o %t.dir/EXE %ld_flags_rpath_exe
4-
// RUN: %run %t.dir/EXE
2+
// RUN: %clangxx_asan -DFUNC=main %s -o %t-EXE %ld_flags_rpath_exe
3+
// RUN: %run %t-EXE
54

65
// GNU driver doesn't handle .so files properly.
76
// REQUIRES: Clang

compiler-rt/test/asan/TestCases/Posix/coverage-reset.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
// RUN: rm -rf %t.dir && mkdir -p %t.dir && cd %t.dir
21
// RUN: %clangxx_asan -fsanitize-coverage=func,trace-pc-guard -DSHARED %s -shared -o %dynamiclib -fPIC %ld_flags_rpath_so
3-
// RUN: %clangxx_asan -fsanitize-coverage=func,trace-pc-guard %s %ld_flags_rpath_exe -o %t.dir/EXE
4-
// RUN: %env_asan_opts=coverage=1:verbosity=1 %run %t.dir/EXE 2>&1 | tee /tmp/test
2+
// RUN: %clangxx_asan -fsanitize-coverage=func,trace-pc-guard %s %ld_flags_rpath_exe -o %t-EXE
3+
// RUN: %env_asan_opts=coverage=1:verbosity=1 %run %t-EXE 2>&1 | tee /tmp/test
54
//
65
// UNSUPPORTED: ios
76

compiler-rt/test/asan/TestCases/Posix/interception-in-shared-lib-test.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
// Check that memset() call from a shared library gets intercepted.
2-
// RUN: mkdir -p %t.dir && cd %t.dir
32
// RUN: %clangxx_asan -O0 %s -DSHARED_LIB \
43
// RUN: -shared -o %dynamiclib -fPIC %ld_flags_rpath_so
5-
// RUN: %clangxx_asan -O0 %s -o %t.dir/EXE %ld_flags_rpath_exe && \
6-
// RUN: not %run %t.dir/EXE 2>&1 | FileCheck %s
4+
// RUN: %clangxx_asan -O0 %s -o %t-EXE %ld_flags_rpath_exe && \
5+
// RUN: not %run %t-EXE 2>&1 | FileCheck %s
76

87
#include <stdio.h>
98
#include <string.h>

compiler-rt/test/cfi/cross-dso-diagnostic.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
// Check that cross-DSO diagnostics print the names of both modules
22

3-
// RUN: mkdir -p %t.dir && cd %t.dir
43
// RUN: %clangxx_cfi_diag -g -DSHARED_LIB -fPIC -shared -o %dynamiclib %s %ld_flags_rpath_so
5-
// RUN: %clangxx_cfi_diag -g -o %t.dir/file_exe_suffix %s %ld_flags_rpath_exe
6-
// RUN: %t.dir/file_exe_suffix 2>&1 | FileCheck -DDSONAME=%xdynamiclib_namespec %s
4+
// RUN: %clangxx_cfi_diag -g -o %t-file_exe_suffix %s %ld_flags_rpath_exe
5+
// RUN: %t-file_exe_suffix 2>&1 | FileCheck -DDSONAME=%xdynamiclib_namespec %s
76

87
// UNSUPPORTED: target={{.*windows-msvc.*}}
98
// REQUIRES: cxxabi

compiler-rt/test/cfi/cross-dso/icall/diag.cpp

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,35 +6,34 @@
66
// * otherwise, the callee decides between trap/recover/norecover.
77

88
// Full-recover.
9-
// RUN: mkdir -p %t.dir && cd %t.dir
109
// RUN: %clangxx_cfi_dso_diag -g -DSHARED_LIB %s -fPIC -shared -o %dynamiclib %ld_flags_rpath_so
11-
// RUN: %clangxx_cfi_dso_diag -g %s -o %t.dir/exe %ld_flags_rpath_exe
10+
// RUN: %clangxx_cfi_dso_diag -g %s -o %t-exe %ld_flags_rpath_exe
1211

13-
// RUN: %t.dir/exe icv 2>&1 | FileCheck %s --check-prefix=ICALL-DIAG --check-prefix=CAST-DIAG \
12+
// RUN: %t-exe icv 2>&1 | FileCheck %s --check-prefix=ICALL-DIAG --check-prefix=CAST-DIAG \
1413
// RUN: --check-prefix=VCALL-DIAG --check-prefix=ALL-RECOVER
1514

16-
// RUN: %t.dir/exe i_v 2>&1 | FileCheck %s --check-prefix=ICALL-DIAG --check-prefix=CAST-NODIAG \
15+
// RUN: %t-exe i_v 2>&1 | FileCheck %s --check-prefix=ICALL-DIAG --check-prefix=CAST-NODIAG \
1716
// RUN: --check-prefix=VCALL-DIAG --check-prefix=ALL-RECOVER
1817

19-
// RUN: %t.dir/exe _cv 2>&1 | FileCheck %s --check-prefix=ICALL-NODIAG --check-prefix=CAST-DIAG \
18+
// RUN: %t-exe _cv 2>&1 | FileCheck %s --check-prefix=ICALL-NODIAG --check-prefix=CAST-DIAG \
2019
// RUN: --check-prefix=VCALL-DIAG --check-prefix=ALL-RECOVER
2120

22-
// RUN: %t.dir/exe ic_ 2>&1 | FileCheck %s --check-prefix=ICALL-DIAG --check-prefix=CAST-DIAG \
21+
// RUN: %t-exe ic_ 2>&1 | FileCheck %s --check-prefix=ICALL-DIAG --check-prefix=CAST-DIAG \
2322
// RUN: --check-prefix=VCALL-NODIAG --check-prefix=ALL-RECOVER
2423

2524
// Trap on icall, no-recover on cast.
2625
// RUN: %clangxx_cfi_dso_diag -fsanitize-trap=cfi-icall -fno-sanitize-recover=cfi-unrelated-cast \
2726
// RUN: -g -DSHARED_LIB %s -fPIC -shared -o %dynamiclib %ld_flags_rpath_so
2827
// RUN: %clangxx_cfi_dso_diag -fsanitize-trap=cfi-icall -fno-sanitize-recover=cfi-unrelated-cast \
29-
// RUN: -g %s -o %t.dir/exe %ld_flags_rpath_exe
28+
// RUN: -g %s -o %t-exe %ld_flags_rpath_exe
3029

31-
// RUN: %expect_crash %t.dir/exe icv 2>&1 | FileCheck %s --check-prefix=ICALL-NODIAG --check-prefix=CAST-NODIAG \
30+
// RUN: %expect_crash %t-exe icv 2>&1 | FileCheck %s --check-prefix=ICALL-NODIAG --check-prefix=CAST-NODIAG \
3231
// RUN: --check-prefix=VCALL-NODIAG --check-prefix=ICALL-FATAL
3332

34-
// RUN: not %t.dir/exe _cv 2>&1 | FileCheck %s --check-prefix=ICALL-NODIAG --check-prefix=CAST-DIAG \
33+
// RUN: not %t-exe _cv 2>&1 | FileCheck %s --check-prefix=ICALL-NODIAG --check-prefix=CAST-DIAG \
3534
// RUN: --check-prefix=VCALL-NODIAG --check-prefix=CAST-FATAL
3635

37-
// RUN: %t.dir/exe __v 2>&1 | FileCheck %s --check-prefix=ICALL-NODIAG --check-prefix=CAST-NODIAG \
36+
// RUN: %t-exe __v 2>&1 | FileCheck %s --check-prefix=ICALL-NODIAG --check-prefix=CAST-NODIAG \
3837
// RUN: --check-prefix=VCALL-DIAG
3938

4039
// Callee: trap on icall, no-recover on cast.
@@ -43,15 +42,15 @@
4342
// RUN: %clangxx_cfi_dso_diag -fsanitize-trap=cfi-icall -fno-sanitize-recover=cfi-unrelated-cast \
4443
// RUN: -g -DSHARED_LIB %s -fPIC -shared -o %dynamiclib %ld_flags_rpath_so
4544
// RUN: %clangxx_cfi_dso_diag \
46-
// RUN: -g %s -o %t.dir/exe %ld_flags_rpath_exe
45+
// RUN: -g %s -o %t-exe %ld_flags_rpath_exe
4746

48-
// RUN: %expect_crash %t.dir/exe icv 2>&1 | FileCheck %s --check-prefix=ICALL-NODIAG --check-prefix=CAST-NODIAG \
47+
// RUN: %expect_crash %t-exe icv 2>&1 | FileCheck %s --check-prefix=ICALL-NODIAG --check-prefix=CAST-NODIAG \
4948
// RUN: --check-prefix=VCALL-NODIAG --check-prefix=ICALL-FATAL
5049

51-
// RUN: not %t.dir/exe _cv 2>&1 | FileCheck %s --check-prefix=ICALL-NODIAG --check-prefix=CAST-DIAG \
50+
// RUN: not %t-exe _cv 2>&1 | FileCheck %s --check-prefix=ICALL-NODIAG --check-prefix=CAST-DIAG \
5251
// RUN: --check-prefix=VCALL-NODIAG --check-prefix=CAST-FATAL
5352

54-
// RUN: %t.dir/exe __v 2>&1 | FileCheck %s --check-prefix=ICALL-NODIAG --check-prefix=CAST-NODIAG \
53+
// RUN: %t-exe __v 2>&1 | FileCheck %s --check-prefix=ICALL-NODIAG --check-prefix=CAST-NODIAG \
5554
// RUN: --check-prefix=VCALL-DIAG
5655

5756
// Caller in trapping mode, callee with full diagnostic+recover.
@@ -60,15 +59,15 @@
6059
// RUN: %clangxx_cfi_dso_diag \
6160
// RUN: -g -DSHARED_LIB %s -fPIC -shared -o %dynamiclib %ld_flags_rpath_so
6261
// RUN: %clangxx_cfi_dso -fno-sanitize-trap=cfi-nvcall \
63-
// RUN: -g %s -o %t.dir/exe %ld_flags_rpath_exe
62+
// RUN: -g %s -o %t-exe %ld_flags_rpath_exe
6463

65-
// RUN: %expect_crash %t.dir/exe icv 2>&1 | FileCheck %s --check-prefix=ICALL-NODIAG --check-prefix=CAST-NODIAG \
64+
// RUN: %expect_crash %t-exe icv 2>&1 | FileCheck %s --check-prefix=ICALL-NODIAG --check-prefix=CAST-NODIAG \
6665
// RUN: --check-prefix=VCALL-NODIAG --check-prefix=ICALL-FATAL
6766

68-
// RUN: %expect_crash %t.dir/exe _cv 2>&1 | FileCheck %s --check-prefix=ICALL-NODIAG --check-prefix=CAST-NODIAG \
67+
// RUN: %expect_crash %t-exe _cv 2>&1 | FileCheck %s --check-prefix=ICALL-NODIAG --check-prefix=CAST-NODIAG \
6968
// RUN: --check-prefix=VCALL-NODIAG --check-prefix=CAST-FATAL
7069

71-
// RUN: %expect_crash %t.dir/exe __v 2>&1 | FileCheck %s --check-prefix=ICALL-NODIAG --check-prefix=CAST-NODIAG \
70+
// RUN: %expect_crash %t-exe __v 2>&1 | FileCheck %s --check-prefix=ICALL-NODIAG --check-prefix=CAST-NODIAG \
7271
// RUN: --check-prefix=VCALL-NODIAG --check-prefix=VCALL-FATAL
7372

7473
// REQUIRES: cxxabi

compiler-rt/test/cfi/cross-dso/icall/icall-from-dso.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
// RUN: mkdir -p %t.dir && cd %t.dir
21
// RUN: %clangxx_cfi_dso -DSHARED_LIB %s -fPIC -shared -o %dynamiclib %ld_flags_rpath_so
3-
// RUN: %clangxx_cfi_dso %s -o %t.dir/exe %ld_flags_rpath_exe && %expect_crash %t.dir/exe 2>&1 | FileCheck %s
2+
// RUN: %clangxx_cfi_dso %s -o %t-exe %ld_flags_rpath_exe && %expect_crash %t-exe 2>&1 | FileCheck %s
43

54
// RUN: %clangxx_cfi_dso_diag -g -DSHARED_LIB %s -fPIC -shared -o %dynamiclib %ld_flags_rpath_so
6-
// RUN: %clangxx_cfi_dso_diag -g %s -o %t.dir/exe %ld_flags_rpath_exe && %t.dir/exe 2>&1 | FileCheck %s --check-prefix=CFI-DIAG
5+
// RUN: %clangxx_cfi_dso_diag -g %s -o %t-exe %ld_flags_rpath_exe && %t-exe 2>&1 | FileCheck %s --check-prefix=CFI-DIAG
76

87
#include <stdio.h>
98

compiler-rt/test/cfi/cross-dso/icall/icall.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
// RUN: mkdir -p %t.dir && cd %t.dir
21
// RUN: %clangxx_cfi_dso -DSHARED_LIB %s -fPIC -shared -o %dynamiclib %ld_flags_rpath_so
3-
// RUN: %clangxx_cfi_dso %s -o %t.dir/exe %ld_flags_rpath_exe && %expect_crash %t.dir/exe 2>&1 | FileCheck %s
2+
// RUN: %clangxx_cfi_dso %s -o %t-exe %ld_flags_rpath_exe && %expect_crash %t-exe 2>&1 | FileCheck %s
43

54
// RUN: %clangxx_cfi_dso_diag -g -DSHARED_LIB %s -fPIC -shared -o %dynamiclib %ld_flags_rpath_so
6-
// RUN: %clangxx_cfi_dso_diag -g %s -o %t.dir/exe %ld_flags_rpath_exe && %t.dir/exe 2>&1 | FileCheck %s --check-prefix=CFI-DIAG
5+
// RUN: %clangxx_cfi_dso_diag -g %s -o %t-exe %ld_flags_rpath_exe && %t-exe 2>&1 | FileCheck %s --check-prefix=CFI-DIAG
76

87
#include <stdio.h>
98

compiler-rt/test/cfi/cross-dso/simple-fail.cpp

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,37 @@
1-
// RUN: mkdir -p %t.dir && cd %t.dir
21
// RUN: %clangxx_cfi_dso -DSHARED_LIB %s -fPIC -shared -o %dynamiclib %ld_flags_rpath_so
3-
// RUN: %clangxx_cfi_dso %s -o %t.dir/exe %ld_flags_rpath_exe
4-
// RUN: %expect_crash %t.dir/exe 2>&1 | FileCheck --check-prefix=CFI %s
5-
// RUN: %expect_crash %t.dir/exe x 2>&1 | FileCheck --check-prefix=CFI-CAST %s
2+
// RUN: %clangxx_cfi_dso %s -o %t-exe %ld_flags_rpath_exe
3+
// RUN: %expect_crash %t-exe 2>&1 | FileCheck --check-prefix=CFI %s
4+
// RUN: %expect_crash %t-exe x 2>&1 | FileCheck --check-prefix=CFI-CAST %s
65

76
// RUN: %clangxx_cfi_dso -DB32 -DSHARED_LIB %s -fPIC -shared -o %dynamiclib %ld_flags_rpath_so
8-
// RUN: %clangxx_cfi_dso -DB32 %s -o %t.dir/exe %ld_flags_rpath_exe
9-
// RUN: %expect_crash %t.dir/exe 2>&1 | FileCheck --check-prefix=CFI %s
10-
// RUN: %expect_crash %t.dir/exe x 2>&1 | FileCheck --check-prefix=CFI-CAST %s
7+
// RUN: %clangxx_cfi_dso -DB32 %s -o %t-exe %ld_flags_rpath_exe
8+
// RUN: %expect_crash %t-exe 2>&1 | FileCheck --check-prefix=CFI %s
9+
// RUN: %expect_crash %t-exe x 2>&1 | FileCheck --check-prefix=CFI-CAST %s
1110

1211
// RUN: %clangxx_cfi_dso -DB64 -DSHARED_LIB %s -fPIC -shared -o %dynamiclib %ld_flags_rpath_so
13-
// RUN: %clangxx_cfi_dso -DB64 %s -o %t.dir/exe %ld_flags_rpath_exe
14-
// RUN: %expect_crash %t.dir/exe 2>&1 | FileCheck --check-prefix=CFI %s
15-
// RUN: %expect_crash %t.dir/exe x 2>&1 | FileCheck --check-prefix=CFI-CAST %s
12+
// RUN: %clangxx_cfi_dso -DB64 %s -o %t-exe %ld_flags_rpath_exe
13+
// RUN: %expect_crash %t-exe 2>&1 | FileCheck --check-prefix=CFI %s
14+
// RUN: %expect_crash %t-exe x 2>&1 | FileCheck --check-prefix=CFI-CAST %s
1615

1716
// RUN: %clangxx_cfi_dso -DBM -DSHARED_LIB %s -fPIC -shared -o %dynamiclib %ld_flags_rpath_so
18-
// RUN: %clangxx_cfi_dso -DBM %s -o %t.dir/exe %ld_flags_rpath_exe
19-
// RUN: %expect_crash %t.dir/exe 2>&1 | FileCheck --check-prefix=CFI %s
20-
// RUN: %expect_crash %t.dir/exe x 2>&1 | FileCheck --check-prefix=CFI-CAST %s
17+
// RUN: %clangxx_cfi_dso -DBM %s -o %t-exe %ld_flags_rpath_exe
18+
// RUN: %expect_crash %t-exe 2>&1 | FileCheck --check-prefix=CFI %s
19+
// RUN: %expect_crash %t-exe x 2>&1 | FileCheck --check-prefix=CFI-CAST %s
2120

2221
// RUN: %clangxx -DBM -DSHARED_LIB %s -fPIC -shared -o %dynamiclib %ld_flags_rpath_so
23-
// RUN: %clangxx -DBM %s -o %t.dir/exe %ld_flags_rpath_exe
24-
// RUN: %t.dir/exe 2>&1 | FileCheck --check-prefix=NCFI %s
25-
// RUN: %t.dir/exe x 2>&1 | FileCheck --check-prefix=NCFI %s
22+
// RUN: %clangxx -DBM %s -o %t-exe %ld_flags_rpath_exe
23+
// RUN: %t-exe 2>&1 | FileCheck --check-prefix=NCFI %s
24+
// RUN: %t-exe x 2>&1 | FileCheck --check-prefix=NCFI %s
2625

2726
// RUN: %clangxx -DBM -DSHARED_LIB %s -fPIC -shared -o %dynamiclib %ld_flags_rpath_so
28-
// RUN: %clangxx_cfi_dso -DBM %s -o %t.dir/exe %ld_flags_rpath_exe
29-
// RUN: %t.dir/exe 2>&1 | FileCheck --check-prefix=NCFI %s
30-
// RUN: %t.dir/exe x 2>&1 | FileCheck --check-prefix=NCFI %s
27+
// RUN: %clangxx_cfi_dso -DBM %s -o %t-exe %ld_flags_rpath_exe
28+
// RUN: %t-exe 2>&1 | FileCheck --check-prefix=NCFI %s
29+
// RUN: %t-exe x 2>&1 | FileCheck --check-prefix=NCFI %s
3130

3231
// RUN: %clangxx_cfi_dso_diag -DSHARED_LIB %s -fPIC -shared -o %dynamiclib %ld_flags_rpath_so
33-
// RUN: %clangxx_cfi_dso_diag %s -o %t.dir/exe %ld_flags_rpath_exe
34-
// RUN: %t.dir/exe 2>&1 | FileCheck --check-prefix=CFI-DIAG-CALL %s
35-
// RUN: %t.dir/exe x 2>&1 | FileCheck --check-prefix=CFI-DIAG-CALL --check-prefix=CFI-DIAG-CAST %s
32+
// RUN: %clangxx_cfi_dso_diag %s -o %t-exe %ld_flags_rpath_exe
33+
// RUN: %t-exe 2>&1 | FileCheck --check-prefix=CFI-DIAG-CALL %s
34+
// RUN: %t-exe x 2>&1 | FileCheck --check-prefix=CFI-DIAG-CALL --check-prefix=CFI-DIAG-CAST %s
3635

3736
// Tests that the CFI mechanism crashes the program when making a virtual call
3837
// to an object of the wrong class but with a compatible vtable, by casting a

0 commit comments

Comments
 (0)