Skip to content

Commit 88c23ad

Browse files
Reapply "[compiler-rt] Remove %T from tests (#151265)"
This reverts commit 3c3523c. Keeping the directory structure the same as before fixes the failures. They trivially reproduced locally and only passed before because I was not cleaning up the temp test directory in between invocations.
1 parent 062b22e commit 88c23ad

File tree

5 files changed

+20
-14
lines changed

5 files changed

+20
-14
lines changed

compiler-rt/test/asan/TestCases/Linux/long-object-path.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
// RUN: mkdir -p %T/a-long-directory-name-to-test-allocations-for-exceptions-in-_dl_lookup_symbol_x-since-glibc-2.27
2-
// RUN: %clangxx_asan -g %s -o %T/long-object-path
3-
// RUN: %run %T/a-*/../a-*/../a-*/../a-*/../a-*/../a-*/../a-*/../a-*/../long-object-path
1+
// RUN: mkdir -p %t.dir/a-long-directory-name-to-test-allocations-for-exceptions-in-_dl_lookup_symbol_x-since-glibc-2.27
2+
// RUN: %clangxx_asan -g %s -o %t.dir/long-object-path
3+
// RUN: %run %t.dir/a-*/../a-*/../a-*/../a-*/../a-*/../a-*/../a-*/../a-*/../long-object-path
44

55
int main(void) {
66
return 0;

compiler-rt/test/fuzzer/afl-driver-stderr.test

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ RUN: %no_fuzzer_cpp_compiler %S/AFLDriverTest.cpp %libfuzzer_src/afl/afl_driver.
77
RUN: env -u AFL_DRIVER_STDERR_DUPLICATE_FILENAME %run %t-AFLDriverTest
88

99
; Test that specifying an invalid file causes a crash.
10-
RUN: env ASAN_OPTIONS= AFL_DRIVER_STDERR_DUPLICATE_FILENAME="%T" not --crash %run %t-AFLDriverTest
10+
RUN: mkdir -p %t.dir
11+
RUN: env ASAN_OPTIONS= AFL_DRIVER_STDERR_DUPLICATE_FILENAME="%t.dir" not --crash %run %t-AFLDriverTest
1112

1213
; Test that a file is created when specified as the duplicate stderr.
1314
RUN: env AFL_DRIVER_STDERR_DUPLICATE_FILENAME=%t %run %t-AFLDriverTest

compiler-rt/test/sanitizer_common/TestCases/suffix-log-path_test.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
// RUN: %clang %s -o %T/suffix-log-path_test-binary
1+
// RUN: rm -rf %t.dir
2+
// RUN: mkdir -p %t.dir
3+
// RUN: %clang %s -o %t.dir/suffix-log-path_test-binary
24

35
// The glob below requires bash.
46
// REQUIRES: shell
57

68
// Good log_path with suffix.
7-
// RUN: rm -f %T/sanitizer.log.*.txt
8-
// RUN: %env_tool_opts=log_path=%T/sanitizer.log:log_exe_name=1:log_suffix=.txt %run %T/suffix-log-path_test-binary 2> %t.out
9-
// RUN: FileCheck %s < %T/sanitizer.log.suffix-log-path_test-binary.*.txt
9+
// RUN: %env_tool_opts=log_path=%t.dir/sanitizer.log:log_exe_name=1:log_suffix=.txt %run %t.dir/suffix-log-path_test-binary 2> %t.out
10+
// RUN: FileCheck %s < %t.dir/sanitizer.log.suffix-log-path_test-binary.*.txt
1011

1112
// UNSUPPORTED: ios, android
1213

compiler-rt/test/xray/TestCases/Posix/fdr-mode-inmemory.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
// RUN: %clangxx_xray -g -std=c++11 %s -o %t -fxray-modes=xray-fdr
2-
// RUN: rm -f fdr-inmemory-test-*
2+
// RUN: rm -rf %t.dir
3+
// RUN: mkdir -p %t.dir
4+
// RUN: cd %t.dir
35
// RUN: XRAY_OPTIONS="patch_premain=false xray_logfile_base=fdr-inmemory-test- \
46
// RUN: verbosity=1" \
57
// RUN: XRAY_FDR_OPTIONS="no_file_flush=true func_duration_threshold_us=0" \
68
// RUN: %run %t 2>&1 | FileCheck %s
7-
// RUN: FILES=`find %T -name 'fdr-inmemory-test-*' | wc -l`
9+
// RUN: FILES=`find %t.dir -name 'fdr-inmemory-test-*' | wc -l`
810
// RUN: [ $FILES -eq 0 ]
9-
// RUN: rm -f fdr-inmemory-test-*
11+
// RUN: rm -rf %t.dir
1012
//
1113
// REQUIRES: built-in-llvm-tree
1214

compiler-rt/test/xray/TestCases/Posix/fdr-mode-multiple.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
// RUN: %clangxx_xray -g -std=c++11 %s -o %t -fxray-modes=xray-fdr
2-
// RUN: rm -f fdr-inmemory-test-*
2+
// RUN: rm -rf %t.dir
3+
// RUN: mkdir -p %t.dir
4+
// RUN: cd %t.dir
35
// RUN: XRAY_OPTIONS="patch_premain=false xray_logfile_base=fdr-inmemory-test- \
46
// RUN: verbosity=1" \
57
// RUN: XRAY_FDR_OPTIONS="no_file_flush=true func_duration_threshold_us=0" \
68
// RUN: %run %t 2>&1 | FileCheck %s
7-
// RUN: FILES=`find %T -name 'fdr-inmemory-test-*' | wc -l`
9+
// RUN: FILES=`find %t.dir -name 'fdr-inmemory-test-*' | wc -l`
810
// RUN: [ $FILES -eq 0 ]
9-
// RUN: rm -f fdr-inmemory-test-*
11+
// RUN: rm -rf %t.dir
1012
//
1113
// REQUIRES: built-in-llvm-tree
1214

0 commit comments

Comments
 (0)