[compiler-rt] [compiler-rt] Remove temporary directories from lit tests (PR #160335)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 23 09:16:39 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-compiler-rt-sanitizer
Author: Ivan Tadeu Ferreira Antunes Filho (itf)
<details>
<summary>Changes</summary>
This patch removes substitutions that create temporary directories to house executables in.
This is a continuation of the changes in #<!-- -->155302
---
Patch is 26.36 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/160335.diff
14 Files Affected:
- (modified) compiler-rt/test/asan/TestCases/Linux/odr-violation.cpp (+21-22)
- (modified) compiler-rt/test/asan/TestCases/Linux/preinit_test.cpp (+2-3)
- (modified) compiler-rt/test/asan/TestCases/Posix/coverage-reset.cpp (+2-3)
- (modified) compiler-rt/test/asan/TestCases/Posix/interception-in-shared-lib-test.cpp (+2-3)
- (modified) compiler-rt/test/cfi/cross-dso-diagnostic.cpp (+2-3)
- (modified) compiler-rt/test/cfi/cross-dso/icall/diag.cpp (+17-18)
- (modified) compiler-rt/test/cfi/cross-dso/icall/icall-from-dso.cpp (+2-3)
- (modified) compiler-rt/test/cfi/cross-dso/icall/icall.cpp (+2-3)
- (modified) compiler-rt/test/cfi/cross-dso/simple-fail.cpp (+21-22)
- (modified) compiler-rt/test/cfi/cross-dso/simple-pass.cpp (+11-12)
- (modified) compiler-rt/test/cfi/target_uninstrumented.cpp (+2-3)
- (modified) compiler-rt/test/tsan/on_initialize_finalize_hooks.cpp (+2-3)
- (modified) compiler-rt/test/ubsan/TestCases/TypeCheck/Function/function.cpp (+3-4)
- (modified) compiler-rt/test/ubsan/TestCases/TypeCheck/vptr-non-unique-typeinfo.cpp (+2-3)
``````````diff
diff --git a/compiler-rt/test/asan/TestCases/Linux/odr-violation.cpp b/compiler-rt/test/asan/TestCases/Linux/odr-violation.cpp
index 007308438ec93..261c1e13aa6e6 100644
--- a/compiler-rt/test/asan/TestCases/Linux/odr-violation.cpp
+++ b/compiler-rt/test/asan/TestCases/Linux/odr-violation.cpp
@@ -10,39 +10,38 @@
// -fno-sanitize-address-use-odr-indicator turns off both.
//
// Different size: detect a bug if detect_odr_violation>=1
-// RUN: mkdir -p %t.dir && cd %t.dir
// RUN: %clangxx_asan -g -DBUILD_SO=1 -fPIC -shared -fno-sanitize-address-use-odr-indicator %s -o %dynamiclib
-// RUN: %clangxx_asan -g -fno-sanitize-address-use-odr-indicator %s %ld_flags_rpath_exe -o %t.dir/ODR-EXE
-// RUN: %env_asan_opts=fast_unwind_on_malloc=0:detect_odr_violation=1 not %run %t.dir/ODR-EXE 2>&1 | FileCheck %s
-// RUN: %env_asan_opts=fast_unwind_on_malloc=0:detect_odr_violation=2 not %run %t.dir/ODR-EXE 2>&1 | FileCheck %s
-// 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
-// RUN: %env_asan_opts=fast_unwind_on_malloc=0 not %run %t.dir/ODR-EXE 2>&1 | FileCheck %s
+// RUN: %clangxx_asan -g -fno-sanitize-address-use-odr-indicator %s %ld_flags_rpath_exe -o %t-ODR-EXE
+// RUN: %env_asan_opts=fast_unwind_on_malloc=0:detect_odr_violation=1 not %run %t-ODR-EXE 2>&1 | FileCheck %s
+// RUN: %env_asan_opts=fast_unwind_on_malloc=0:detect_odr_violation=2 not %run %t-ODR-EXE 2>&1 | FileCheck %s
+// RUN: %env_asan_opts=fast_unwind_on_malloc=0:detect_odr_violation=0 %run %t-ODR-EXE 2>&1 | FileCheck %s --check-prefix=DISABLED
+// RUN: %env_asan_opts=fast_unwind_on_malloc=0 not %run %t-ODR-EXE 2>&1 | FileCheck %s
//
// Same size: report a bug only if detect_odr_violation>=2.
// RUN: %clangxx_asan -g -DBUILD_SO=1 -fPIC -shared -fno-sanitize-address-use-odr-indicator %s -o %dynamiclib -DSZ=100
-// 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
-// RUN: %env_asan_opts=fast_unwind_on_malloc=0:detect_odr_violation=2 not %run %t.dir/ODR-EXE 2>&1 | FileCheck %s
-// RUN: %env_asan_opts=fast_unwind_on_malloc=0 not %run %t.dir/ODR-EXE 2>&1 | FileCheck %s
-// RUN: echo "odr_violation:foo::ZZZ" > %t.dir/supp
-// 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
-// RUN: echo "odr_violation:foo::G" > %t.dir/supp
-// 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
-// RUN: rm -f %t.dir/supp
+// RUN: %env_asan_opts=fast_unwind_on_malloc=0:detect_odr_violation=1 %run %t-ODR-EXE 2>&1 | FileCheck %s --check-prefix=DISABLED
+// RUN: %env_asan_opts=fast_unwind_on_malloc=0:detect_odr_violation=2 not %run %t-ODR-EXE 2>&1 | FileCheck %s
+// RUN: %env_asan_opts=fast_unwind_on_malloc=0 not %run %t-ODR-EXE 2>&1 | FileCheck %s
+// RUN: echo "odr_violation:foo::ZZZ" > %t.supp
+// 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
+// RUN: echo "odr_violation:foo::G" > %t.supp
+// 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
+// RUN: rm -f %t.supp
//
// Use private aliases for global variables without indicator symbol.
// RUN: %clangxx_asan -g -DBUILD_SO=1 -fPIC -shared -mllvm -asan-use-odr-indicator=0 %s -o %dynamiclib -DSZ=100
-// RUN: %clangxx_asan -g -mllvm -asan-use-odr-indicator=0 %s %ld_flags_rpath_exe -o %t.dir/ODR-EXE
-// RUN: %env_asan_opts=fast_unwind_on_malloc=0 %run %t.dir/ODR-EXE 2>&1 | FileCheck %s --check-prefix=DISABLED
+// RUN: %clangxx_asan -g -mllvm -asan-use-odr-indicator=0 %s %ld_flags_rpath_exe -o %t-ODR-EXE
+// RUN: %env_asan_opts=fast_unwind_on_malloc=0 %run %t-ODR-EXE 2>&1 | FileCheck %s --check-prefix=DISABLED
// Use private aliases for global variables: use indicator symbol to detect ODR violation.
// RUN: %clangxx_asan -g -DBUILD_SO=1 -fPIC -shared %s -o %dynamiclib -DSZ=100
-// RUN: %clangxx_asan -g %s %ld_flags_rpath_exe -o %t.dir/ODR-EXE
-// RUN: %env_asan_opts=fast_unwind_on_malloc=0 not %run %t.dir/ODR-EXE 2>&1 | FileCheck %s
+// RUN: %clangxx_asan -g %s %ld_flags_rpath_exe -o %t-ODR-EXE
+// RUN: %env_asan_opts=fast_unwind_on_malloc=0 not %run %t-ODR-EXE 2>&1 | FileCheck %s
// Same as above but with clang switches.
// RUN: %clangxx_asan -g -DBUILD_SO=1 -fPIC -shared -fsanitize-address-use-odr-indicator %s -o %dynamiclib -DSZ=100
-// RUN: %clangxx_asan -g -fsanitize-address-use-odr-indicator %s %ld_flags_rpath_exe -o %t.dir/ODR-EXE
-// RUN: %env_asan_opts=fast_unwind_on_malloc=0 not %run %t.dir/ODR-EXE 2>&1 | FileCheck %s
+// RUN: %clangxx_asan -g -fsanitize-address-use-odr-indicator %s %ld_flags_rpath_exe -o %t-ODR-EXE
+// RUN: %env_asan_opts=fast_unwind_on_malloc=0 not %run %t-ODR-EXE 2>&1 | FileCheck %s
// GNU driver doesn't handle .so files properly.
// REQUIRES: Clang
@@ -59,7 +58,7 @@ namespace foo { char G[SZ]; }
#include <stdio.h>
namespace foo { char G[100]; }
// CHECK: ERROR: AddressSanitizer: odr-violation
-// CHECK: size=100 'foo::G' {{.*}}odr-violation.cpp:[[@LINE-2]] in {{.*}}/ODR-EXE
+// CHECK: size=100 'foo::G' {{.*}}odr-violation.cpp:[[@LINE-2]] in {{.*}}ODR-EXE
// CHECK: size={{4|100}} 'foo::G'
int main(int argc, char **argv) {
printf("PASS: %p\n", &foo::G);
@@ -67,7 +66,7 @@ int main(int argc, char **argv) {
#endif
// CHECK: These globals were registered at these points:
-// CHECK: {{odr-violation.cpp|ODR-EXE}}
+// CHECK: {{odr-violation.cpp|.*ODR-EXE}}
// CHECK: odr-violation.cpp{{$}}
// CHECK: SUMMARY: AddressSanitizer: odr-violation: global 'foo::G' at {{.*}}odr-violation.cpp
// DISABLED: PASS
diff --git a/compiler-rt/test/asan/TestCases/Linux/preinit_test.cpp b/compiler-rt/test/asan/TestCases/Linux/preinit_test.cpp
index ca20a8905b122..77ddd5ae1727a 100644
--- a/compiler-rt/test/asan/TestCases/Linux/preinit_test.cpp
+++ b/compiler-rt/test/asan/TestCases/Linux/preinit_test.cpp
@@ -1,7 +1,6 @@
-// RUN: mkdir -p %t.dir && cd %t.dir
// RUN: %clangxx -DFUNC=zzzz %s -shared -o %dynamiclib -fPIC
-// RUN: %clangxx_asan -DFUNC=main %s -o %t.dir/EXE %ld_flags_rpath_exe
-// RUN: %run %t.dir/EXE
+// RUN: %clangxx_asan -DFUNC=main %s -o %t-EXE %ld_flags_rpath_exe
+// RUN: %run %t-EXE
// GNU driver doesn't handle .so files properly.
// REQUIRES: Clang
diff --git a/compiler-rt/test/asan/TestCases/Posix/coverage-reset.cpp b/compiler-rt/test/asan/TestCases/Posix/coverage-reset.cpp
index e3524fced6b4e..a1d689ae2a92a 100644
--- a/compiler-rt/test/asan/TestCases/Posix/coverage-reset.cpp
+++ b/compiler-rt/test/asan/TestCases/Posix/coverage-reset.cpp
@@ -1,7 +1,6 @@
-// RUN: rm -rf %t.dir && mkdir -p %t.dir && cd %t.dir
// RUN: %clangxx_asan -fsanitize-coverage=func,trace-pc-guard -DSHARED %s -shared -o %dynamiclib -fPIC %ld_flags_rpath_so
-// RUN: %clangxx_asan -fsanitize-coverage=func,trace-pc-guard %s %ld_flags_rpath_exe -o %t.dir/EXE
-// RUN: %env_asan_opts=coverage=1:verbosity=1 %run %t.dir/EXE 2>&1 | tee /tmp/test
+// RUN: %clangxx_asan -fsanitize-coverage=func,trace-pc-guard %s %ld_flags_rpath_exe -o %t-EXE
+// RUN: %env_asan_opts=coverage=1:verbosity=1 %run %t-EXE 2>&1 | tee /tmp/test
//
// UNSUPPORTED: ios
diff --git a/compiler-rt/test/asan/TestCases/Posix/interception-in-shared-lib-test.cpp b/compiler-rt/test/asan/TestCases/Posix/interception-in-shared-lib-test.cpp
index cfdc47c13e208..12c6a61a38a71 100644
--- a/compiler-rt/test/asan/TestCases/Posix/interception-in-shared-lib-test.cpp
+++ b/compiler-rt/test/asan/TestCases/Posix/interception-in-shared-lib-test.cpp
@@ -1,9 +1,8 @@
// Check that memset() call from a shared library gets intercepted.
-// RUN: mkdir -p %t.dir && cd %t.dir
// RUN: %clangxx_asan -O0 %s -DSHARED_LIB \
// RUN: -shared -o %dynamiclib -fPIC %ld_flags_rpath_so
-// RUN: %clangxx_asan -O0 %s -o %t.dir/EXE %ld_flags_rpath_exe && \
-// RUN: not %run %t.dir/EXE 2>&1 | FileCheck %s
+// RUN: %clangxx_asan -O0 %s -o %t-EXE %ld_flags_rpath_exe && \
+// RUN: not %run %t-EXE 2>&1 | FileCheck %s
#include <stdio.h>
#include <string.h>
diff --git a/compiler-rt/test/cfi/cross-dso-diagnostic.cpp b/compiler-rt/test/cfi/cross-dso-diagnostic.cpp
index ed2cab04c9180..6278a33407528 100644
--- a/compiler-rt/test/cfi/cross-dso-diagnostic.cpp
+++ b/compiler-rt/test/cfi/cross-dso-diagnostic.cpp
@@ -1,9 +1,8 @@
// Check that cross-DSO diagnostics print the names of both modules
-// RUN: mkdir -p %t.dir && cd %t.dir
// RUN: %clangxx_cfi_diag -g -DSHARED_LIB -fPIC -shared -o %dynamiclib %s %ld_flags_rpath_so
-// RUN: %clangxx_cfi_diag -g -o %t.dir/file_exe_suffix %s %ld_flags_rpath_exe
-// RUN: %t.dir/file_exe_suffix 2>&1 | FileCheck -DDSONAME=%xdynamiclib_namespec %s
+// RUN: %clangxx_cfi_diag -g -o %t-file_exe_suffix %s %ld_flags_rpath_exe
+// RUN: %t-file_exe_suffix 2>&1 | FileCheck -DDSONAME=%xdynamiclib_namespec %s
// UNSUPPORTED: target={{.*windows-msvc.*}}
// REQUIRES: cxxabi
diff --git a/compiler-rt/test/cfi/cross-dso/icall/diag.cpp b/compiler-rt/test/cfi/cross-dso/icall/diag.cpp
index 4df0a3858b418..40e69715e5699 100644
--- a/compiler-rt/test/cfi/cross-dso/icall/diag.cpp
+++ b/compiler-rt/test/cfi/cross-dso/icall/diag.cpp
@@ -6,35 +6,34 @@
// * otherwise, the callee decides between trap/recover/norecover.
// Full-recover.
-// RUN: mkdir -p %t.dir && cd %t.dir
// RUN: %clangxx_cfi_dso_diag -g -DSHARED_LIB %s -fPIC -shared -o %dynamiclib %ld_flags_rpath_so
-// RUN: %clangxx_cfi_dso_diag -g %s -o %t.dir/exe %ld_flags_rpath_exe
+// RUN: %clangxx_cfi_dso_diag -g %s -o %t-exe %ld_flags_rpath_exe
-// RUN: %t.dir/exe icv 2>&1 | FileCheck %s --check-prefix=ICALL-DIAG --check-prefix=CAST-DIAG \
+// RUN: %t-exe icv 2>&1 | FileCheck %s --check-prefix=ICALL-DIAG --check-prefix=CAST-DIAG \
// RUN: --check-prefix=VCALL-DIAG --check-prefix=ALL-RECOVER
-// RUN: %t.dir/exe i_v 2>&1 | FileCheck %s --check-prefix=ICALL-DIAG --check-prefix=CAST-NODIAG \
+// RUN: %t-exe i_v 2>&1 | FileCheck %s --check-prefix=ICALL-DIAG --check-prefix=CAST-NODIAG \
// RUN: --check-prefix=VCALL-DIAG --check-prefix=ALL-RECOVER
-// RUN: %t.dir/exe _cv 2>&1 | FileCheck %s --check-prefix=ICALL-NODIAG --check-prefix=CAST-DIAG \
+// RUN: %t-exe _cv 2>&1 | FileCheck %s --check-prefix=ICALL-NODIAG --check-prefix=CAST-DIAG \
// RUN: --check-prefix=VCALL-DIAG --check-prefix=ALL-RECOVER
-// RUN: %t.dir/exe ic_ 2>&1 | FileCheck %s --check-prefix=ICALL-DIAG --check-prefix=CAST-DIAG \
+// RUN: %t-exe ic_ 2>&1 | FileCheck %s --check-prefix=ICALL-DIAG --check-prefix=CAST-DIAG \
// RUN: --check-prefix=VCALL-NODIAG --check-prefix=ALL-RECOVER
// Trap on icall, no-recover on cast.
// RUN: %clangxx_cfi_dso_diag -fsanitize-trap=cfi-icall -fno-sanitize-recover=cfi-unrelated-cast \
// RUN: -g -DSHARED_LIB %s -fPIC -shared -o %dynamiclib %ld_flags_rpath_so
// RUN: %clangxx_cfi_dso_diag -fsanitize-trap=cfi-icall -fno-sanitize-recover=cfi-unrelated-cast \
-// RUN: -g %s -o %t.dir/exe %ld_flags_rpath_exe
+// RUN: -g %s -o %t-exe %ld_flags_rpath_exe
-// RUN: %expect_crash %t.dir/exe icv 2>&1 | FileCheck %s --check-prefix=ICALL-NODIAG --check-prefix=CAST-NODIAG \
+// RUN: %expect_crash %t-exe icv 2>&1 | FileCheck %s --check-prefix=ICALL-NODIAG --check-prefix=CAST-NODIAG \
// RUN: --check-prefix=VCALL-NODIAG --check-prefix=ICALL-FATAL
-// RUN: not %t.dir/exe _cv 2>&1 | FileCheck %s --check-prefix=ICALL-NODIAG --check-prefix=CAST-DIAG \
+// RUN: not %t-exe _cv 2>&1 | FileCheck %s --check-prefix=ICALL-NODIAG --check-prefix=CAST-DIAG \
// RUN: --check-prefix=VCALL-NODIAG --check-prefix=CAST-FATAL
-// RUN: %t.dir/exe __v 2>&1 | FileCheck %s --check-prefix=ICALL-NODIAG --check-prefix=CAST-NODIAG \
+// RUN: %t-exe __v 2>&1 | FileCheck %s --check-prefix=ICALL-NODIAG --check-prefix=CAST-NODIAG \
// RUN: --check-prefix=VCALL-DIAG
// Callee: trap on icall, no-recover on cast.
@@ -43,15 +42,15 @@
// RUN: %clangxx_cfi_dso_diag -fsanitize-trap=cfi-icall -fno-sanitize-recover=cfi-unrelated-cast \
// RUN: -g -DSHARED_LIB %s -fPIC -shared -o %dynamiclib %ld_flags_rpath_so
// RUN: %clangxx_cfi_dso_diag \
-// RUN: -g %s -o %t.dir/exe %ld_flags_rpath_exe
+// RUN: -g %s -o %t-exe %ld_flags_rpath_exe
-// RUN: %expect_crash %t.dir/exe icv 2>&1 | FileCheck %s --check-prefix=ICALL-NODIAG --check-prefix=CAST-NODIAG \
+// RUN: %expect_crash %t-exe icv 2>&1 | FileCheck %s --check-prefix=ICALL-NODIAG --check-prefix=CAST-NODIAG \
// RUN: --check-prefix=VCALL-NODIAG --check-prefix=ICALL-FATAL
-// RUN: not %t.dir/exe _cv 2>&1 | FileCheck %s --check-prefix=ICALL-NODIAG --check-prefix=CAST-DIAG \
+// RUN: not %t-exe _cv 2>&1 | FileCheck %s --check-prefix=ICALL-NODIAG --check-prefix=CAST-DIAG \
// RUN: --check-prefix=VCALL-NODIAG --check-prefix=CAST-FATAL
-// RUN: %t.dir/exe __v 2>&1 | FileCheck %s --check-prefix=ICALL-NODIAG --check-prefix=CAST-NODIAG \
+// RUN: %t-exe __v 2>&1 | FileCheck %s --check-prefix=ICALL-NODIAG --check-prefix=CAST-NODIAG \
// RUN: --check-prefix=VCALL-DIAG
// Caller in trapping mode, callee with full diagnostic+recover.
@@ -60,15 +59,15 @@
// RUN: %clangxx_cfi_dso_diag \
// RUN: -g -DSHARED_LIB %s -fPIC -shared -o %dynamiclib %ld_flags_rpath_so
// RUN: %clangxx_cfi_dso -fno-sanitize-trap=cfi-nvcall \
-// RUN: -g %s -o %t.dir/exe %ld_flags_rpath_exe
+// RUN: -g %s -o %t-exe %ld_flags_rpath_exe
-// RUN: %expect_crash %t.dir/exe icv 2>&1 | FileCheck %s --check-prefix=ICALL-NODIAG --check-prefix=CAST-NODIAG \
+// RUN: %expect_crash %t-exe icv 2>&1 | FileCheck %s --check-prefix=ICALL-NODIAG --check-prefix=CAST-NODIAG \
// RUN: --check-prefix=VCALL-NODIAG --check-prefix=ICALL-FATAL
-// RUN: %expect_crash %t.dir/exe _cv 2>&1 | FileCheck %s --check-prefix=ICALL-NODIAG --check-prefix=CAST-NODIAG \
+// RUN: %expect_crash %t-exe _cv 2>&1 | FileCheck %s --check-prefix=ICALL-NODIAG --check-prefix=CAST-NODIAG \
// RUN: --check-prefix=VCALL-NODIAG --check-prefix=CAST-FATAL
-// RUN: %expect_crash %t.dir/exe __v 2>&1 | FileCheck %s --check-prefix=ICALL-NODIAG --check-prefix=CAST-NODIAG \
+// RUN: %expect_crash %t-exe __v 2>&1 | FileCheck %s --check-prefix=ICALL-NODIAG --check-prefix=CAST-NODIAG \
// RUN: --check-prefix=VCALL-NODIAG --check-prefix=VCALL-FATAL
// REQUIRES: cxxabi
diff --git a/compiler-rt/test/cfi/cross-dso/icall/icall-from-dso.cpp b/compiler-rt/test/cfi/cross-dso/icall/icall-from-dso.cpp
index b08135758efcf..a47a7839638a3 100644
--- a/compiler-rt/test/cfi/cross-dso/icall/icall-from-dso.cpp
+++ b/compiler-rt/test/cfi/cross-dso/icall/icall-from-dso.cpp
@@ -1,9 +1,8 @@
-// RUN: mkdir -p %t.dir && cd %t.dir
// RUN: %clangxx_cfi_dso -DSHARED_LIB %s -fPIC -shared -o %dynamiclib %ld_flags_rpath_so
-// RUN: %clangxx_cfi_dso %s -o %t.dir/exe %ld_flags_rpath_exe && %expect_crash %t.dir/exe 2>&1 | FileCheck %s
+// RUN: %clangxx_cfi_dso %s -o %t-exe %ld_flags_rpath_exe && %expect_crash %t-exe 2>&1 | FileCheck %s
// RUN: %clangxx_cfi_dso_diag -g -DSHARED_LIB %s -fPIC -shared -o %dynamiclib %ld_flags_rpath_so
-// 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
+// RUN: %clangxx_cfi_dso_diag -g %s -o %t-exe %ld_flags_rpath_exe && %t-exe 2>&1 | FileCheck %s --check-prefix=CFI-DIAG
#include <stdio.h>
diff --git a/compiler-rt/test/cfi/cross-dso/icall/icall.cpp b/compiler-rt/test/cfi/cross-dso/icall/icall.cpp
index b4ee48d94ea03..2121f9d118c59 100644
--- a/compiler-rt/test/cfi/cross-dso/icall/icall.cpp
+++ b/compiler-rt/test/cfi/cross-dso/icall/icall.cpp
@@ -1,9 +1,8 @@
-// RUN: mkdir -p %t.dir && cd %t.dir
// RUN: %clangxx_cfi_dso -DSHARED_LIB %s -fPIC -shared -o %dynamiclib %ld_flags_rpath_so
-// RUN: %clangxx_cfi_dso %s -o %t.dir/exe %ld_flags_rpath_exe && %expect_crash %t.dir/exe 2>&1 | FileCheck %s
+// RUN: %clangxx_cfi_dso %s -o %t-exe %ld_flags_rpath_exe && %expect_crash %t-exe 2>&1 | FileCheck %s
// RUN: %clangxx_cfi_dso_diag -g -DSHARED_LIB %s -fPIC -shared -o %dynamiclib %ld_flags_rpath_so
-// 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
+// RUN: %clangxx_cfi_dso_diag -g %s -o %t-exe %ld_flags_rpath_exe && %t-exe 2>&1 | FileCheck %s --check-prefix=CFI-DIAG
#include <stdio.h>
diff --git a/compiler-rt/test/cfi/cross-dso/simple-fail.cpp b/compiler-rt/test/cfi/cross-dso/simple-fail.cpp
index 91ce45a6130c4..7c218b56a525d 100644
--- a/compiler-rt/test/cfi/cross-dso/simple-fail.cpp
+++ b/compiler-rt/test/cfi/cross-dso/simple-fail.cpp
@@ -1,38 +1,37 @@
-// RUN: mkdir -p %t.dir && cd %t.dir
// RUN: %clangxx_cfi_dso -DSHARED_LIB %s -fPIC -shared -o %dynamiclib %ld_flags_rpath_so
-// RUN: %clangxx_cfi_dso %s -o %t.dir/exe %ld_flags_rpath_exe
-// RUN: %expect_crash %t.dir/exe 2>&1 | FileCheck --check-prefix=CFI %s
-// RUN: %expect_crash %t.dir/exe x 2>&1 | FileCheck --check-prefix=CFI-CAST %s
+// RUN: %clangxx_cfi_dso %s -o %t-exe %ld_flags_rpath_exe
+// RUN: %expect_crash %t-exe 2>&1 | FileCheck --check-prefix=CFI %s
+// RUN: %expect_crash %t-exe x 2>&1 | FileCheck --check-prefix=CFI-CAST %s
// RUN: %clangxx_cfi_dso -DB32 -DSHARED_LIB %s -fPIC -shared -o %dynamiclib %ld_flags_rpath_so
-// RUN: %clangxx_cfi_dso -DB32 %s -o %t.dir/exe %ld_flags_rpath_exe
-// RUN: %expect_crash %t.dir/exe 2>&1 | FileCheck --check-prefix=CFI %s
-// RUN: %expect_crash %t.dir/exe x 2>&1 | FileCheck --check-prefix=CFI-CAST %s
+// RUN: %clangxx_cfi_dso -DB32 %s -o %t-exe %ld_flags_rpath_exe
+// RUN: %expect_crash %t-exe 2>&1 | FileCheck --check-prefix=CFI %s
+// RUN: %expect_crash %t-exe x 2>&1 | FileCheck --check-prefix=CFI-CAST %s
// RUN: %clangxx_cfi_dso -DB64 -DSHARED_LIB %s -fPIC -shared -o %dynamiclib %ld_flags_rpath_so
-// RUN: %clangxx_cfi_dso -DB64 %s -o %t.dir/exe %ld_flags_rpath_exe
-// RUN: %expect_crash %t.dir/exe 2>&1 | FileCheck --check-prefix=CFI %s
-// RUN: %expect_crash %t.dir/exe x 2>&1 | FileCheck --check-prefix=CFI-CAST %s
+// RUN: %clangxx_cfi_dso -DB64 %s -o %t-exe %ld_flags_rpath_exe
+// RUN: %expect_crash %t-exe 2>&1 | FileCheck --check-prefix=CFI %s
+// RUN: %expect_crash %t-exe x 2>&1 | FileCheck --check-prefix=CFI-CAST %s
// RUN: %clangxx_cfi_dso -DBM -DSHARED_LIB %s -fPIC -shared -o %dynamiclib %ld_flags_rpath_so
-// RUN: %clangxx_cfi_dso -DBM %s -o %t.dir/exe %ld_flags_rpath_exe
-// RUN: %expect_crash %t.dir/exe 2>&1 | FileCheck --check-prefix=CFI %s
-// RUN: %expect_crash %t.dir/exe x 2>&1 | FileCheck --check-prefix=CFI-CAST %s
+// RUN: %clangxx_cfi_dso -DBM %s -o %t-exe %ld_flags_rpath_exe
+// RUN: %expect_crash %t-exe 2>&1 | FileCheck --check-prefix=CFI %s
+// RUN: %expect_crash %t-exe x 2>&1 | FileCheck --check-prefix=CFI-CAST %s
// RUN: %clangxx -DBM -DSHARED_LIB %s -fPIC -shared -o %dynamiclib %ld_flags_rpath_so
-// RUN: %clangxx -DBM %s -o %t.dir/exe %ld_flags_rpath_exe
-// RUN: %t.dir/exe 2>&1 | FileCheck --check-prefix=NCFI %s
-// RUN: %t.dir/exe x 2>&1 | FileCheck --check-prefix=NCFI %s
+// RUN: %clangxx -DBM %s -o %t-exe %ld_flags_rpath_exe
+// RUN: %t-exe 2>&1 | FileCheck --check-prefix=NCFI %s
+// RUN: %t-exe x 2>&1 | FileCheck --check-prefix=NCFI %s
// RUN: %clangxx -DBM -DSHARED_LIB %s -fPIC -shared -o %dynamiclib %ld_flags_rpath_so
-// RUN: %clangxx_cfi_dso -DBM %s -o %t.dir/exe %ld_flags_rpath_exe
-// RUN: %t.dir/exe 2>&1 | FileCheck --check-prefix=NCFI %s
-// RUN: %t.dir/exe x 2>&1 | FileCheck --check-prefix=NCFI %s
+// RUN: %clangxx_cfi_dso -DBM %s -o %t-exe %ld_flags_rpath_exe
+// RUN: %t-exe 2>&1 | FileCheck --check-prefix=NCFI %s
+// RUN: %t-exe x 2>&1 | FileCheck --check-prefix=NCFI %s
// RUN: %clangxx_cfi_dso_diag -DSHARED_LIB %s -fPIC -s...
[truncated]
``````````
</details>
https://github.com/llvm/llvm-project/pull/160335
More information about the llvm-commits
mailing list