From 3adefc42141cbfcf008849ac73fab7b1e61999fc Mon Sep 17 00:00:00 2001 From: Jinsong Ji Date: Sat, 11 Oct 2025 17:49:51 +0200 Subject: [PATCH 1/8] [NFC][E2E] Remove usage of %T in tests %T support is removed in community https://github.com/llvm/llvm-project/commit/7ff6973f1 Use %t.dir instead, create the dir manually. --- .../Compression/compression_multiple_tu.cpp | 7 ++++--- .../NewOffloadDriver/dynamic.cpp | 13 +++++++------ .../NewOffloadDriver/singleDynamicLibrary.cpp | 7 ++++--- .../DeviceImageDependencies/dynamic.cpp | 13 +++++++------ .../dynamic_compress.cpp | 19 ++++++++++--------- .../singleDynamicLibrary.cpp | 7 ++++--- .../bfloat16_conversion_dlopen_test.cpp | 6 +++--- ...loat16_conversion_dlopen_test_compress.cpp | 5 +++-- .../DeviceLib/bfloat16_conversion_test.cpp | 5 +++-- .../bfloat16_conversion_test_compress.cpp | 5 +++-- sycl/test-e2e/ESIMD/mandelbrot/mandelbrot.cpp | 3 ++- .../ESIMD/mandelbrot/mandelbrot_spec.cpp | 3 ++- .../ESIMD/regression/complex-lib-lin.cpp | 4 ++-- .../IntermediateLib/dynamic_app_linux.cpp | 5 +++-- .../IntermediateLib/multi_lib_app.cpp | 17 +++++++++-------- .../KernelCompiler/sycl_device_flags.cpp | 2 +- sycl/test-e2e/SharedLib/use_when_link.cpp | 7 ++++--- .../SharedLib/use_when_link_new_offload.cpp | 7 ++++--- .../SharedLib/use_when_link_verify_cache.cpp | 7 ++++--- sycl/test-e2e/SharedLib/use_with_dlopen.cpp | 5 +++-- .../use_with_dlopen_verify_cache.cpp | 5 +++-- 21 files changed, 85 insertions(+), 67 deletions(-) diff --git a/sycl/test-e2e/Compression/compression_multiple_tu.cpp b/sycl/test-e2e/Compression/compression_multiple_tu.cpp index 72eb3f0904790..f3786c353a27b 100644 --- a/sycl/test-e2e/Compression/compression_multiple_tu.cpp +++ b/sycl/test-e2e/Compression/compression_multiple_tu.cpp @@ -2,10 +2,11 @@ // translation units, one compressed and one not compressed. // REQUIRES: zstd, linux -// RUN: %{build} --offload-compress -DENABLE_KERNEL1 -shared -fPIC -o %T/kernel1.so -// RUN: %{build} -DENABLE_KERNEL2 -shared -fPIC -o %T/kernel2.so +// RUN: mkdir -p %t.dir +// RUN: %{build} --offload-compress -DENABLE_KERNEL1 -shared -fPIC -o %t.dir/kernel1.so +// RUN: %{build} -DENABLE_KERNEL2 -shared -fPIC -o %t.dir/kernel2.so -// RUN: %{build} %T/kernel1.so %T/kernel2.so -o %t_compress.out +// RUN: %{build} %t.dir/kernel1.so %t.dir/kernel2.so -o %t_compress.out // RUN: %{run} %t_compress.out #if defined(ENABLE_KERNEL1) || defined(ENABLE_KERNEL2) #include diff --git a/sycl/test-e2e/DeviceImageDependencies/NewOffloadDriver/dynamic.cpp b/sycl/test-e2e/DeviceImageDependencies/NewOffloadDriver/dynamic.cpp index 81775c4cae132..9edeeff934c5b 100644 --- a/sycl/test-e2e/DeviceImageDependencies/NewOffloadDriver/dynamic.cpp +++ b/sycl/test-e2e/DeviceImageDependencies/NewOffloadDriver/dynamic.cpp @@ -3,16 +3,17 @@ // DEFINE: %{dynamic_lib_options} = -fsycl %fPIC %shared_lib -fsycl-allow-device-image-dependencies -I %S/Inputs %if windows %{-DMAKE_DLL %} // DEFINE: %{dynamic_lib_suffix} = %if windows %{dll%} %else %{so%} -// RUN: %clangxx --offload-new-driver %{dynamic_lib_options} %S/Inputs/d.cpp -o %T/libdevice_d.%{dynamic_lib_suffix} -// RUN: %clangxx --offload-new-driver %{dynamic_lib_options} %S/Inputs/c.cpp %if windows %{%T/libdevice_d.lib%} -o %T/libdevice_c.%{dynamic_lib_suffix} -// RUN: %clangxx --offload-new-driver %{dynamic_lib_options} %S/Inputs/b.cpp %if windows %{%T/libdevice_c.lib%} -o %T/libdevice_b.%{dynamic_lib_suffix} -// RUN: %clangxx --offload-new-driver %{dynamic_lib_options} %S/Inputs/a.cpp %if windows %{%T/libdevice_b.lib%} -o %T/libdevice_a.%{dynamic_lib_suffix} +// RUN: mkdir -p %t.dir +// RUN: %clangxx --offload-new-driver %{dynamic_lib_options} %S/Inputs/d.cpp -o %t.dir/libdevice_d.%{dynamic_lib_suffix} +// RUN: %clangxx --offload-new-driver %{dynamic_lib_options} %S/Inputs/c.cpp %if windows %{%t.dir/libdevice_d.lib%} -o %t.dir/libdevice_c.%{dynamic_lib_suffix} +// RUN: %clangxx --offload-new-driver %{dynamic_lib_options} %S/Inputs/b.cpp %if windows %{%t.dir/libdevice_c.lib%} -o %t.dir/libdevice_b.%{dynamic_lib_suffix} +// RUN: %clangxx --offload-new-driver %{dynamic_lib_options} %S/Inputs/a.cpp %if windows %{%t.dir/libdevice_b.lib%} -o %t.dir/libdevice_a.%{dynamic_lib_suffix} // RUN: %{build} --offload-new-driver -fsycl-allow-device-image-dependencies -I %S/Inputs -o %t.out \ // RUN: %if windows \ -// RUN: %{%T/libdevice_a.lib%} \ +// RUN: %{%t.dir/libdevice_a.lib%} \ // RUN: %else \ -// RUN: %{-L%T -ldevice_a -ldevice_b -ldevice_c -ldevice_d -Wl,-rpath=%T%} +// RUN: %{-L%t.dir -ldevice_a -ldevice_b -ldevice_c -ldevice_d -Wl,-rpath=%t.dir%} // RUN: %{run} %t.out diff --git a/sycl/test-e2e/DeviceImageDependencies/NewOffloadDriver/singleDynamicLibrary.cpp b/sycl/test-e2e/DeviceImageDependencies/NewOffloadDriver/singleDynamicLibrary.cpp index 70aa0a2f27251..891987e08de58 100644 --- a/sycl/test-e2e/DeviceImageDependencies/NewOffloadDriver/singleDynamicLibrary.cpp +++ b/sycl/test-e2e/DeviceImageDependencies/NewOffloadDriver/singleDynamicLibrary.cpp @@ -1,19 +1,20 @@ // Test -fsycl-allow-device-image-dependencies with a single dynamic library on // Windows and Linux. +// RUN: mkdir -p %t.dir // RUN: %clangxx --offload-new-driver -fsycl %fPIC %shared_lib -fsycl-allow-device-image-dependencies -I %S/Inputs \ // RUN: %S/Inputs/a.cpp \ // RUN: %S/Inputs/b.cpp \ // RUN: %S/Inputs/c.cpp \ // RUN: %S/Inputs/d.cpp \ // RUN: %S/Inputs/wrapper.cpp \ -// RUN: -o %if windows %{%T/device_single.dll%} %else %{%T/libdevice_single.so%} +// RUN: -o %if windows %{%t.dir/device_single.dll%} %else %{%t.dir/libdevice_single.so%} // RUN: %{build} --offload-new-driver -I%S/Inputs -o %t.out \ // RUN: %if windows \ -// RUN: %{%T/device_single.lib%} \ +// RUN: %{%t.dir/device_single.lib%} \ // RUN: %else \ -// RUN: %{-L%T -ldevice_single -Wl,-rpath=%T%} +// RUN: %{-L%t.dir -ldevice_single -Wl,-rpath=%t.dir%} // RUN: %{run} %t.out diff --git a/sycl/test-e2e/DeviceImageDependencies/dynamic.cpp b/sycl/test-e2e/DeviceImageDependencies/dynamic.cpp index 3dd217e0f9ea9..fb6801c41fd97 100644 --- a/sycl/test-e2e/DeviceImageDependencies/dynamic.cpp +++ b/sycl/test-e2e/DeviceImageDependencies/dynamic.cpp @@ -3,16 +3,17 @@ // DEFINE: %{dynamic_lib_options} = -fsycl %fPIC %shared_lib -fsycl-allow-device-image-dependencies -I %S/Inputs %if windows %{-DMAKE_DLL %} // DEFINE: %{dynamic_lib_suffix} = %if windows %{dll%} %else %{so%} -// RUN: %clangxx %{dynamic_lib_options} %S/Inputs/d.cpp -o %T/libdevice_d.%{dynamic_lib_suffix} -// RUN: %clangxx %{dynamic_lib_options} %S/Inputs/c.cpp %if windows %{%T/libdevice_d.lib%} -o %T/libdevice_c.%{dynamic_lib_suffix} -// RUN: %clangxx %{dynamic_lib_options} %S/Inputs/b.cpp %if windows %{%T/libdevice_c.lib%} -o %T/libdevice_b.%{dynamic_lib_suffix} -// RUN: %clangxx %{dynamic_lib_options} %S/Inputs/a.cpp %if windows %{%T/libdevice_b.lib%} -o %T/libdevice_a.%{dynamic_lib_suffix} +// RUN: mkdir -p %t.dir +// RUN: %clangxx %{dynamic_lib_options} %S/Inputs/d.cpp -o %t.dir/libdevice_d.%{dynamic_lib_suffix} +// RUN: %clangxx %{dynamic_lib_options} %S/Inputs/c.cpp %if windows %{%t.dir/libdevice_d.lib%} -o %t.dir/libdevice_c.%{dynamic_lib_suffix} +// RUN: %clangxx %{dynamic_lib_options} %S/Inputs/b.cpp %if windows %{%t.dir/libdevice_c.lib%} -o %t.dir/libdevice_b.%{dynamic_lib_suffix} +// RUN: %clangxx %{dynamic_lib_options} %S/Inputs/a.cpp %if windows %{%t.dir/libdevice_b.lib%} -o %t.dir/libdevice_a.%{dynamic_lib_suffix} // RUN: %clangxx -fsycl %{sycl_target_opts} -fsycl-allow-device-image-dependencies -fsycl-device-code-split=per_kernel %S/Inputs/basic.cpp -o %t.out \ // RUN: %if windows \ -// RUN: %{%T/libdevice_a.lib%} \ +// RUN: %{%t.dir/libdevice_a.lib%} \ // RUN: %else \ -// RUN: %{-L%T -ldevice_a -ldevice_b -ldevice_c -ldevice_d -Wl,-rpath=%T%} +// RUN: %{-L%t.dir -ldevice_a -ldevice_b -ldevice_c -ldevice_d -Wl,-rpath=%t.dir%} // RUN: %{run} %t.out diff --git a/sycl/test-e2e/DeviceImageDependencies/dynamic_compress.cpp b/sycl/test-e2e/DeviceImageDependencies/dynamic_compress.cpp index eb2e92b0e5826..9dcda1097813f 100644 --- a/sycl/test-e2e/DeviceImageDependencies/dynamic_compress.cpp +++ b/sycl/test-e2e/DeviceImageDependencies/dynamic_compress.cpp @@ -6,20 +6,21 @@ // DEFINE: %{dynamic_lib_options} = -fsycl %fPIC %shared_lib -fsycl-allow-device-image-dependencies -I %S/Inputs %if windows %{-DMAKE_DLL %} // DEFINE: %{dynamic_lib_suffix} = %if windows %{dll%} %else %{so%} +// RUN: mkdir -p %t.dir // RUN: %clangxx %{dynamic_lib_options} %S/Inputs/d.cpp \ -// RUN: -o %T/libdevicecompress_d.%{dynamic_lib_suffix} +// RUN: -o %t.dir/libdevicecompress_d.%{dynamic_lib_suffix} // RUN: %clangxx %{dynamic_lib_options} %S/Inputs/c.cpp \ -// RUN: %if windows %{%T/libdevicecompress_d.lib%} \ -// RUN: -o %T/libdevicecompress_c.%{dynamic_lib_suffix} +// RUN: %if windows %{%t.dir/libdevicecompress_d.lib%} \ +// RUN: -o %t.dir/libdevicecompress_c.%{dynamic_lib_suffix} // RUN: %clangxx %{dynamic_lib_options} %S/Inputs/b.cpp \ -// RUN: %if windows %{%T/libdevicecompress_c.lib%} \ -// RUN: -o %T/libdevicecompress_b.%{dynamic_lib_suffix} +// RUN: %if windows %{%t.dir/libdevicecompress_c.lib%} \ +// RUN: -o %t.dir/libdevicecompress_b.%{dynamic_lib_suffix} // RUN: %clangxx %{dynamic_lib_options} %S/Inputs/a.cpp \ -// RUN: %if windows %{%T/libdevicecompress_b.lib%} \ -// RUN: -o %T/libdevicecompress_a.%{dynamic_lib_suffix} +// RUN: %if windows %{%t.dir/libdevicecompress_b.lib%} \ +// RUN: -o %t.dir/libdevicecompress_a.%{dynamic_lib_suffix} // Compressed main executable, while dependencies are not compressed. @@ -27,8 +28,8 @@ // RUN: -fsycl-allow-device-image-dependencies -fsycl-device-code-split=per_kernel \ // RUN: %S/Inputs/basic.cpp -o %t.out \ // RUN: %if windows \ -// RUN: %{%T/libdevicecompress_a.lib%} \ +// RUN: %{%t.dir/libdevicecompress_a.lib%} \ // RUN: %else \ -// RUN: %{-L%T -ldevicecompress_a -ldevicecompress_b -ldevicecompress_c -ldevicecompress_d -Wl,-rpath=%T%} +// RUN: %{-L%t.dir -ldevicecompress_a -ldevicecompress_b -ldevicecompress_c -ldevicecompress_d -Wl,-rpath=%t.dir%} // RUN: %{run} %t.out diff --git a/sycl/test-e2e/DeviceImageDependencies/singleDynamicLibrary.cpp b/sycl/test-e2e/DeviceImageDependencies/singleDynamicLibrary.cpp index 608189b83b3dd..33035317305b1 100644 --- a/sycl/test-e2e/DeviceImageDependencies/singleDynamicLibrary.cpp +++ b/sycl/test-e2e/DeviceImageDependencies/singleDynamicLibrary.cpp @@ -1,19 +1,20 @@ // Test -fsycl-allow-device-image-dependencies with a single dynamic library on Windows // and Linux. +// RUN: mkdir -p %t.dir // RUN: %clangxx -fsycl %fPIC %shared_lib -fsycl-allow-device-image-dependencies -I %S/Inputs \ // RUN: %S/Inputs/a.cpp \ // RUN: %S/Inputs/b.cpp \ // RUN: %S/Inputs/c.cpp \ // RUN: %S/Inputs/d.cpp \ // RUN: %S/Inputs/wrapper.cpp \ -// RUN: -o %if windows %{%T/device_single.dll%} %else %{%T/libdevice_single.so%} +// RUN: -o %if windows %{%t.dir/device_single.dll%} %else %{%t.dir/libdevice_single.so%} // RUN: %{build} -I%S/Inputs -o %t.out \ // RUN: %if windows \ -// RUN: %{%T/device_single.lib%} \ +// RUN: %{%t.dir/device_single.lib%} \ // RUN: %else \ -// RUN: %{-L%T -ldevice_single -Wl,-rpath=%T%} +// RUN: %{-L%t.dir -ldevice_single -Wl,-rpath=%t.dir%} // RUN: %{run} %t.out diff --git a/sycl/test-e2e/DeviceLib/bfloat16_conversion_dlopen_test.cpp b/sycl/test-e2e/DeviceLib/bfloat16_conversion_dlopen_test.cpp index 3fb5731bebe22..82dbc17460492 100644 --- a/sycl/test-e2e/DeviceLib/bfloat16_conversion_dlopen_test.cpp +++ b/sycl/test-e2e/DeviceLib/bfloat16_conversion_dlopen_test.cpp @@ -14,10 +14,10 @@ // library is dlclosed and the device images are removed. // REQUIRES: linux +// RUN: mkdir -p %t.dir +// RUN: %{build} -DBUILD_LIB -fPIC -shared -o %t.dir/lib%basename_t.so -// RUN: %{build} -DBUILD_LIB -fPIC -shared -o %T/lib%basename_t.so - -// RUN: %{build} -DFNAME=%basename_t -ldl -Wl,-rpath=%T -o %t1.out +// RUN: %{build} -DFNAME=%basename_t -ldl -Wl,-rpath=%t.dir -o %t1.out // RUN: %{run} %t1.out diff --git a/sycl/test-e2e/DeviceLib/bfloat16_conversion_dlopen_test_compress.cpp b/sycl/test-e2e/DeviceLib/bfloat16_conversion_dlopen_test_compress.cpp index b3ce5957963ca..4eb3c71f07e9d 100644 --- a/sycl/test-e2e/DeviceLib/bfloat16_conversion_dlopen_test_compress.cpp +++ b/sycl/test-e2e/DeviceLib/bfloat16_conversion_dlopen_test_compress.cpp @@ -9,8 +9,9 @@ // Check bfloat16 devicelib device image compression. // REQUIRES: linux, zstd -// RUN: %{build} --offload-compress -DBUILD_LIB -fPIC -shared -o %T/lib%basename_t_compress.so -// RUN: %{build} --offload-compress -DFNAME=%basename_t_compress -ldl -o %t1.out -Wl,-rpath=%T +// RUN: mkdir -p %t.dir +// RUN: %{build} --offload-compress -DBUILD_LIB -fPIC -shared -o %t.dir/lib%basename_t_compress.so +// RUN: %{build} --offload-compress -DFNAME=%basename_t_compress -ldl -o %t1.out -Wl,-rpath=%t.dir // RUN: %{run} %t1.out // UNSUPPORTED: target-nvidia || target-amd diff --git a/sycl/test-e2e/DeviceLib/bfloat16_conversion_test.cpp b/sycl/test-e2e/DeviceLib/bfloat16_conversion_test.cpp index 154abe72a74e7..1b81428292e2a 100644 --- a/sycl/test-e2e/DeviceLib/bfloat16_conversion_test.cpp +++ b/sycl/test-e2e/DeviceLib/bfloat16_conversion_test.cpp @@ -7,8 +7,9 @@ //===----------------------------------------------------------------------===// // REQUIRES: linux -// RUN: %{build} -DBUILD_LIB -fPIC -shared -o %T/lib%basename_t.so -// RUN: %{build} -DBUILD_EXE -L%T -o %t1.out -l%basename_t -Wl,-rpath=%T +// RUN: mkdir -p %t.dir +// RUN: %{build} -DBUILD_LIB -fPIC -shared -o %t.dir/lib%basename_t.so +// RUN: %{build} -DBUILD_EXE -L%t.dir -o %t1.out -l%basename_t -Wl,-rpath=%t.dir // RUN: %{run} %t1.out // UNSUPPORTED: target-nvidia || target-amd diff --git a/sycl/test-e2e/DeviceLib/bfloat16_conversion_test_compress.cpp b/sycl/test-e2e/DeviceLib/bfloat16_conversion_test_compress.cpp index b5a883e8df97b..8bec3196391ba 100644 --- a/sycl/test-e2e/DeviceLib/bfloat16_conversion_test_compress.cpp +++ b/sycl/test-e2e/DeviceLib/bfloat16_conversion_test_compress.cpp @@ -9,8 +9,9 @@ // Check bfloat16 devicelib device image compression. // REQUIRES: linux, zstd -// RUN: %{build} --offload-compress -DBUILD_LIB -fPIC -shared -o %T/lib%basename_t_compress.so -// RUN: %{build} --offload-compress -DBUILD_EXE -L%T -o %t1.out -l%basename_t_compress -Wl,-rpath=%T +// RUN: mkdir -p %t.dir +// RUN: %{build} --offload-compress -DBUILD_LIB -fPIC -shared -o %t.dir/lib%basename_t_compress.so +// RUN: %{build} --offload-compress -DBUILD_EXE -L%t.dir -o %t1.out -l%basename_t_compress -Wl,-rpath=%t.dir // RUN: %{run} %t1.out // UNSUPPORTED: target-nvidia || target-amd diff --git a/sycl/test-e2e/ESIMD/mandelbrot/mandelbrot.cpp b/sycl/test-e2e/ESIMD/mandelbrot/mandelbrot.cpp index 041226b108538..f1d992c59fa5a 100644 --- a/sycl/test-e2e/ESIMD/mandelbrot/mandelbrot.cpp +++ b/sycl/test-e2e/ESIMD/mandelbrot/mandelbrot.cpp @@ -8,7 +8,8 @@ // REQUIRES: aspect-ext_intel_legacy_image // DEFINE: %{mathflags} = %if cl_options %{/clang:-fno-fast-math%} %else %{-fno-fast-math%} // RUN: %{build} %{mathflags} -o %t.out -// RUN: %{run} %t.out %T/output.ppm %S/golden_hw.ppm +// RUN: mkdir -p %t.dir +// RUN: %{run} %t.out %t.dir/output.ppm %S/golden_hw.ppm #include "../esimd_test_utils.hpp" diff --git a/sycl/test-e2e/ESIMD/mandelbrot/mandelbrot_spec.cpp b/sycl/test-e2e/ESIMD/mandelbrot/mandelbrot_spec.cpp index 07acb447f7dad..164faea2cccd6 100644 --- a/sycl/test-e2e/ESIMD/mandelbrot/mandelbrot_spec.cpp +++ b/sycl/test-e2e/ESIMD/mandelbrot/mandelbrot_spec.cpp @@ -11,7 +11,8 @@ // REQUIRES: aspect-ext_intel_legacy_image // DEFINE: %{mathflags} = %if cl_options %{/clang:-fno-fast-math%} %else %{-fno-fast-math%} // RUN: %{build} %{mathflags} -o %t.out -// RUN: %{run} %t.out %T/output_spec.ppm %S/golden_hw.ppm 512 -2.09798 -1.19798 0.004 4.0 +// RUN: mkdir -p %t.dir +// RUN: %{run} %t.out %t.dir/output_spec.ppm %S/golden_hw.ppm 512 -2.09798 -1.19798 0.004 4.0 #include "../esimd_test_utils.hpp" diff --git a/sycl/test-e2e/ESIMD/regression/complex-lib-lin.cpp b/sycl/test-e2e/ESIMD/regression/complex-lib-lin.cpp index c036d68a0a3d1..ed7a4f87453fc 100644 --- a/sycl/test-e2e/ESIMD/regression/complex-lib-lin.cpp +++ b/sycl/test-e2e/ESIMD/regression/complex-lib-lin.cpp @@ -30,7 +30,7 @@ // // FIXME: is there better way to handle libraries loading than LD_PRELOAD? // There is no LIT substitution, which would point to a directory, where -// temporary files are located. There is %T, but it is marked as "deprecated, -// do not use" +// temporary files are located. + // RUN: env LD_PRELOAD=%t-lib-a.so %{run} %t-a.run // RUN: env LD_PRELOAD=%t-lib-o.so %{run} %t-o.run diff --git a/sycl/test-e2e/IntermediateLib/dynamic_app_linux.cpp b/sycl/test-e2e/IntermediateLib/dynamic_app_linux.cpp index 18f8b3c596dc5..2dea8f6023023 100644 --- a/sycl/test-e2e/IntermediateLib/dynamic_app_linux.cpp +++ b/sycl/test-e2e/IntermediateLib/dynamic_app_linux.cpp @@ -1,10 +1,11 @@ // REQUIRES: level_zero && linux // build shared library -// RUN: %clangxx -fsycl -fPIC -shared -o %T/simple_lib.so %S/Inputs/simple_lib.cpp +// RUN: mkdir -p %t.dir +// RUN: %clangxx -fsycl -fPIC -shared -o %t.dir/simple_lib.so %S/Inputs/simple_lib.cpp // build app -// RUN: %clangxx -DSO_PATH="%T/simple_lib.so" -o %t.out %s %if preview-mode %{-Wno-unused-command-line-argument%} +// RUN: %clangxx -DSO_PATH="%t.dir/simple_lib.so" -o %t.out %s %if preview-mode %{-Wno-unused-command-line-argument%} // RUN: %{run} %t.out // RUN: env UR_L0_LEAKS_DEBUG=1 %{run} %t.out diff --git a/sycl/test-e2e/IntermediateLib/multi_lib_app.cpp b/sycl/test-e2e/IntermediateLib/multi_lib_app.cpp index c5a91b2ffb766..19b2483654abd 100644 --- a/sycl/test-e2e/IntermediateLib/multi_lib_app.cpp +++ b/sycl/test-e2e/IntermediateLib/multi_lib_app.cpp @@ -5,8 +5,8 @@ // DEFINE: %{shared_lib_ext} = %if windows %{dll%} %else %{so%} // clang-format off -// IMPORTANT -DSO_PATH='R"(%T)"' -// We need to capture %T, the build directory, in a string +// IMPORTANT -DSO_PATH='R"(%t.dir)"' +// We need to capture %t.dir, the build directory, in a string // and the normal STRINGIFY() macros hack won't work. // Because on Windows, the path delimiters are \, // which C++ preprocessor converts to escape sequences, @@ -16,15 +16,16 @@ // clang-format on // On Windows, the CI sometimes builds on one machine and runs on another. -// This means that %T might not be consistent between build and run. +// This means that %t.dir might not be consistent between build and run. // So we use %{run-aux} to perform ALL actions on the run machine // like we do for the AoT tests. - -// RUN: %{run-aux} %clangxx -fsycl %{fPIC_flag} -DSO_PATH='R"(%T)"' -o %t.out %s -// RUN: %{run-aux} %clangxx -fsycl %{fPIC_flag} -shared -DINC=1 -o %T/lib_a.%{shared_lib_ext} %S/Inputs/incrementing_lib.cpp -// RUN: %{run-aux} %clangxx -fsycl %{fPIC_flag} -shared -DINC=2 -o %T/lib_b.%{shared_lib_ext} %S/Inputs/incrementing_lib.cpp -// RUN: %{run-aux} %clangxx -fsycl %{fPIC_flag} -shared -DINC=4 -o %T/lib_c.%{shared_lib_ext} %S/Inputs/incrementing_lib.cpp +// RUN: mkdir -p %t.dir +// RUN: %{run-aux} %clangxx -fsycl %{fPIC_flag} -DSO_PATH='R"(%t.dir)"' -o %t.out %s + +// RUN: %{run-aux} %clangxx -fsycl %{fPIC_flag} -shared -DINC=1 -o %t.dir/lib_a.%{shared_lib_ext} %S/Inputs/incrementing_lib.cpp +// RUN: %{run-aux} %clangxx -fsycl %{fPIC_flag} -shared -DINC=2 -o %t.dir/lib_b.%{shared_lib_ext} %S/Inputs/incrementing_lib.cpp +// RUN: %{run-aux} %clangxx -fsycl %{fPIC_flag} -shared -DINC=4 -o %t.dir/lib_c.%{shared_lib_ext} %S/Inputs/incrementing_lib.cpp // RUN: env UR_L0_LEAKS_DEBUG=1 %{run} %t.out diff --git a/sycl/test-e2e/KernelCompiler/sycl_device_flags.cpp b/sycl/test-e2e/KernelCompiler/sycl_device_flags.cpp index 93aa4eb9712c6..5c0804c738bda 100644 --- a/sycl/test-e2e/KernelCompiler/sycl_device_flags.cpp +++ b/sycl/test-e2e/KernelCompiler/sycl_device_flags.cpp @@ -13,7 +13,7 @@ // UNSUPPORTED-INTENDED: IGC shader dump not available on Windows. // RUN: %{build} -o %t.out -// RUN: env IGC_DumpToCustomDir=%T.dump IGC_ShaderDumpEnable=1 NEO_CACHE_PERSISTENT=0 %{run} %t.out %T.dump/ +// RUN: env IGC_DumpToCustomDir=%t.dump IGC_ShaderDumpEnable=1 NEO_CACHE_PERSISTENT=0 %{run} %t.out %t.dump/ // clang-format off /* diff --git a/sycl/test-e2e/SharedLib/use_when_link.cpp b/sycl/test-e2e/SharedLib/use_when_link.cpp index e28ed008f02ea..bcabd2d5027e8 100644 --- a/sycl/test-e2e/SharedLib/use_when_link.cpp +++ b/sycl/test-e2e/SharedLib/use_when_link.cpp @@ -1,11 +1,12 @@ // REQUIRES: linux // -// RUN: %{build} -DBUILD_LIB -fPIC -shared -o %T/lib%basename_t.so +// RUN: mkdir -p %t.dir +// RUN: %{build} -DBUILD_LIB -fPIC -shared -o %t.dir/lib%basename_t.so -// RUN: %{build} -DFOO_FIRST -L%T -o %t1.out -l%basename_t -Wl,-rpath=%T +// RUN: %{build} -DFOO_FIRST -L%t.dir -o %t1.out -l%basename_t -Wl,-rpath=%t.dir // RUN: %{run} %t1.out -// RUN: %{build} -L%T -o %t2.out -l%basename_t -Wl,-rpath=%T +// RUN: %{build} -L%t.dir -o %t2.out -l%basename_t -Wl,-rpath=%t.dir // RUN: %{run} %t2.out #include diff --git a/sycl/test-e2e/SharedLib/use_when_link_new_offload.cpp b/sycl/test-e2e/SharedLib/use_when_link_new_offload.cpp index 3e13e9774e210..0c3526191c29a 100644 --- a/sycl/test-e2e/SharedLib/use_when_link_new_offload.cpp +++ b/sycl/test-e2e/SharedLib/use_when_link_new_offload.cpp @@ -3,12 +3,13 @@ // offload driver is enabled. Currently, new offload model supports only JIT. // TODO: Expand the test once AOT support for new offload model is ready. // -// RUN: %clangxx -fsycl -fsycl-targets=spir64 --offload-new-driver -DBUILD_LIB -fPIC -shared %s -o %T/lib%basename_t.so +// RUN: mkdir -p %t.dir +// RUN: %clangxx -fsycl -fsycl-targets=spir64 --offload-new-driver -DBUILD_LIB -fPIC -shared %s -o %t.dir/lib%basename_t.so -// RUN: %clangxx -fsycl -fsycl-targets=spir64 --offload-new-driver -DFOO_FIRST -L%T %s -o %t.out -l%basename_t -Wl,-rpath=%T +// RUN: %clangxx -fsycl -fsycl-targets=spir64 --offload-new-driver -DFOO_FIRST -L%t.dir %s -o %t.out -l%basename_t -Wl,-rpath=%t.dir // RUN: %{run} %t.out -// RUN: %clangxx -fsycl -fsycl-targets=spir64 --offload-new-driver -L%T %s -o %t.out -l%basename_t -Wl,-rpath=%T +// RUN: %clangxx -fsycl -fsycl-targets=spir64 --offload-new-driver -L%t.dir %s -o %t.out -l%basename_t -Wl,-rpath=%t.dir // RUN: %{run} %t.out #include "use_when_link.cpp" diff --git a/sycl/test-e2e/SharedLib/use_when_link_verify_cache.cpp b/sycl/test-e2e/SharedLib/use_when_link_verify_cache.cpp index cac0c124d66a3..dc17843275ff0 100644 --- a/sycl/test-e2e/SharedLib/use_when_link_verify_cache.cpp +++ b/sycl/test-e2e/SharedLib/use_when_link_verify_cache.cpp @@ -1,11 +1,12 @@ // REQUIRES: linux // -// RUN: %{build} -DBUILD_LIB -fPIC -shared -o %T/lib%basename_t.so +// RUN: mkdir -p %t.dir +// RUN: %{build} -DBUILD_LIB -fPIC -shared -o %t.dir/lib%basename_t.so -// RUN: %{build} -DFOO_FIRST -L%T -o %t1.out -l%basename_t -Wl,-rpath=%T +// RUN: %{build} -DFOO_FIRST -L%t.dir -o %t1.out -l%basename_t -Wl,-rpath=%t.dir // RUN: env SYCL_UR_TRACE=2 %{run} %t1.out 2>&1 | FileCheck %s --check-prefixes=CHECK-FIRST,CHECK --implicit-check-not=piProgramBuild -// RUN: %{build} -L%T -o %t2.out -l%basename_t -Wl,-rpath=%T +// RUN: %{build} -L%t.dir -o %t2.out -l%basename_t -Wl,-rpath=%t.dir // RUN: env SYCL_UR_TRACE=2 %{run} %t2.out 2>&1 | FileCheck %s --check-prefixes=CHECK-LAST,CHECK --implicit-check-not=piProgramBuild #include diff --git a/sycl/test-e2e/SharedLib/use_with_dlopen.cpp b/sycl/test-e2e/SharedLib/use_with_dlopen.cpp index 4d4910efa78e3..fd5534a688344 100644 --- a/sycl/test-e2e/SharedLib/use_with_dlopen.cpp +++ b/sycl/test-e2e/SharedLib/use_with_dlopen.cpp @@ -1,8 +1,9 @@ // REQUIRES: linux // -// RUN: %{build} -DBUILD_LIB -fPIC -shared -o %T/lib%basename_t.so +// RUN: mkdir -p %t.dir +// RUN: %{build} -DBUILD_LIB -fPIC -shared -o %t.dir/lib%basename_t.so -// DEFINE: %{compile} = %{build} -DFNAME=%basename_t -ldl -Wl,-rpath=%T +// DEFINE: %{compile} = %{build} -DFNAME=%basename_t -ldl -Wl,-rpath=%t.dir // RUN: %{compile} -o %t1.out -DRUN_FIRST // RUN: %{run} %t1.out diff --git a/sycl/test-e2e/SharedLib/use_with_dlopen_verify_cache.cpp b/sycl/test-e2e/SharedLib/use_with_dlopen_verify_cache.cpp index bab8130bbab68..026747c05c1c8 100644 --- a/sycl/test-e2e/SharedLib/use_with_dlopen_verify_cache.cpp +++ b/sycl/test-e2e/SharedLib/use_with_dlopen_verify_cache.cpp @@ -1,8 +1,9 @@ // REQUIRES: linux // -// RUN: %{build} -DBUILD_LIB -fPIC -shared -o %T/lib%basename_t.so +// RUN: mkdir -p %t.dir +// RUN: %{build} -DBUILD_LIB -fPIC -shared -o %t.dir/lib%basename_t.so -// DEFINE: %{compile} = %{build} -DFNAME=%basename_t -ldl -Wl,-rpath=%T +// DEFINE: %{compile} = %{build} -DFNAME=%basename_t -ldl -Wl,-rpath=%t.dir // RUN: %{compile} -o %t1.out -DRUN_FIRST // RUN: env SYCL_UR_TRACE=2 %{run} %t1.out 2>&1 | FileCheck %s --check-prefixes=CHECK-FIRST,CHECK --implicit-check-not=piProgramBuild From 6edd15f248618fed685a9ea0ea326519869d0cd7 Mon Sep 17 00:00:00 2001 From: Jinsong Ji Date: Sat, 11 Oct 2025 20:25:49 +0200 Subject: [PATCH 2/8] clangformat --- sycl/test-e2e/ESIMD/regression/complex-lib-lin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sycl/test-e2e/ESIMD/regression/complex-lib-lin.cpp b/sycl/test-e2e/ESIMD/regression/complex-lib-lin.cpp index ed7a4f87453fc..697b449805784 100644 --- a/sycl/test-e2e/ESIMD/regression/complex-lib-lin.cpp +++ b/sycl/test-e2e/ESIMD/regression/complex-lib-lin.cpp @@ -30,7 +30,7 @@ // // FIXME: is there better way to handle libraries loading than LD_PRELOAD? // There is no LIT substitution, which would point to a directory, where -// temporary files are located. +// temporary files are located. // RUN: env LD_PRELOAD=%t-lib-a.so %{run} %t-a.run // RUN: env LD_PRELOAD=%t-lib-o.so %{run} %t-o.run From 51bbb34c80c50d2121e3b7faac872f8f9a0a244e Mon Sep 17 00:00:00 2001 From: Jinsong Ji Date: Sun, 12 Oct 2025 02:09:16 +0200 Subject: [PATCH 3/8] fix --- .../NewOffloadDriver/dynamic.cpp | 15 ++++++++------- .../NewOffloadDriver/singleDynamicLibrary.cpp | 9 +++++---- sycl/test-e2e/DeviceImageDependencies/dynamic.cpp | 15 ++++++++------- .../singleDynamicLibrary.cpp | 9 +++++---- 4 files changed, 26 insertions(+), 22 deletions(-) diff --git a/sycl/test-e2e/DeviceImageDependencies/NewOffloadDriver/dynamic.cpp b/sycl/test-e2e/DeviceImageDependencies/NewOffloadDriver/dynamic.cpp index 9edeeff934c5b..c3aecb7c782df 100644 --- a/sycl/test-e2e/DeviceImageDependencies/NewOffloadDriver/dynamic.cpp +++ b/sycl/test-e2e/DeviceImageDependencies/NewOffloadDriver/dynamic.cpp @@ -3,17 +3,18 @@ // DEFINE: %{dynamic_lib_options} = -fsycl %fPIC %shared_lib -fsycl-allow-device-image-dependencies -I %S/Inputs %if windows %{-DMAKE_DLL %} // DEFINE: %{dynamic_lib_suffix} = %if windows %{dll%} %else %{so%} -// RUN: mkdir -p %t.dir -// RUN: %clangxx --offload-new-driver %{dynamic_lib_options} %S/Inputs/d.cpp -o %t.dir/libdevice_d.%{dynamic_lib_suffix} -// RUN: %clangxx --offload-new-driver %{dynamic_lib_options} %S/Inputs/c.cpp %if windows %{%t.dir/libdevice_d.lib%} -o %t.dir/libdevice_c.%{dynamic_lib_suffix} -// RUN: %clangxx --offload-new-driver %{dynamic_lib_options} %S/Inputs/b.cpp %if windows %{%t.dir/libdevice_c.lib%} -o %t.dir/libdevice_b.%{dynamic_lib_suffix} -// RUN: %clangxx --offload-new-driver %{dynamic_lib_options} %S/Inputs/a.cpp %if windows %{%t.dir/libdevice_b.lib%} -o %t.dir/libdevice_a.%{dynamic_lib_suffix} +// DEFINE: %{tdir} = %t/.. +// RUN: mkdir -p %{tdir} +// RUN: %clangxx --offload-new-driver %{dynamic_lib_options} %S/Inputs/d.cpp -o %{tdir}/libdevice_d.%{dynamic_lib_suffix} +// RUN: %clangxx --offload-new-driver %{dynamic_lib_options} %S/Inputs/c.cpp %if windows %{%{tdir}/libdevice_d.lib%} -o %{tdir}/libdevice_c.%{dynamic_lib_suffix} +// RUN: %clangxx --offload-new-driver %{dynamic_lib_options} %S/Inputs/b.cpp %if windows %{%{tdir}/libdevice_c.lib%} -o %{tdir}/libdevice_b.%{dynamic_lib_suffix} +// RUN: %clangxx --offload-new-driver %{dynamic_lib_options} %S/Inputs/a.cpp %if windows %{%{tdir}/libdevice_b.lib%} -o %{tdir}/libdevice_a.%{dynamic_lib_suffix} // RUN: %{build} --offload-new-driver -fsycl-allow-device-image-dependencies -I %S/Inputs -o %t.out \ // RUN: %if windows \ -// RUN: %{%t.dir/libdevice_a.lib%} \ +// RUN: %{%{tdir}/libdevice_a.lib%} \ // RUN: %else \ -// RUN: %{-L%t.dir -ldevice_a -ldevice_b -ldevice_c -ldevice_d -Wl,-rpath=%t.dir%} +// RUN: %{-L%{tdir} -ldevice_a -ldevice_b -ldevice_c -ldevice_d -Wl,-rpath=%{tdir}%} // RUN: %{run} %t.out diff --git a/sycl/test-e2e/DeviceImageDependencies/NewOffloadDriver/singleDynamicLibrary.cpp b/sycl/test-e2e/DeviceImageDependencies/NewOffloadDriver/singleDynamicLibrary.cpp index 891987e08de58..356af2c2bf97f 100644 --- a/sycl/test-e2e/DeviceImageDependencies/NewOffloadDriver/singleDynamicLibrary.cpp +++ b/sycl/test-e2e/DeviceImageDependencies/NewOffloadDriver/singleDynamicLibrary.cpp @@ -1,20 +1,21 @@ // Test -fsycl-allow-device-image-dependencies with a single dynamic library on // Windows and Linux. -// RUN: mkdir -p %t.dir +// DEFINE: %{tdir} = %t/.. +// RUN: mkdir -p %{tdir} // RUN: %clangxx --offload-new-driver -fsycl %fPIC %shared_lib -fsycl-allow-device-image-dependencies -I %S/Inputs \ // RUN: %S/Inputs/a.cpp \ // RUN: %S/Inputs/b.cpp \ // RUN: %S/Inputs/c.cpp \ // RUN: %S/Inputs/d.cpp \ // RUN: %S/Inputs/wrapper.cpp \ -// RUN: -o %if windows %{%t.dir/device_single.dll%} %else %{%t.dir/libdevice_single.so%} +// RUN: -o %if windows %{%{tdir}/device_single.dll%} %else %{%{tdir}/libdevice_single.so%} // RUN: %{build} --offload-new-driver -I%S/Inputs -o %t.out \ // RUN: %if windows \ -// RUN: %{%t.dir/device_single.lib%} \ +// RUN: %{%{tdir}/device_single.lib%} \ // RUN: %else \ -// RUN: %{-L%t.dir -ldevice_single -Wl,-rpath=%t.dir%} +// RUN: %{-L%{tdir} -ldevice_single -Wl,-rpath=%{tdir}%} // RUN: %{run} %t.out diff --git a/sycl/test-e2e/DeviceImageDependencies/dynamic.cpp b/sycl/test-e2e/DeviceImageDependencies/dynamic.cpp index fb6801c41fd97..1a260b47dca62 100644 --- a/sycl/test-e2e/DeviceImageDependencies/dynamic.cpp +++ b/sycl/test-e2e/DeviceImageDependencies/dynamic.cpp @@ -3,17 +3,18 @@ // DEFINE: %{dynamic_lib_options} = -fsycl %fPIC %shared_lib -fsycl-allow-device-image-dependencies -I %S/Inputs %if windows %{-DMAKE_DLL %} // DEFINE: %{dynamic_lib_suffix} = %if windows %{dll%} %else %{so%} -// RUN: mkdir -p %t.dir -// RUN: %clangxx %{dynamic_lib_options} %S/Inputs/d.cpp -o %t.dir/libdevice_d.%{dynamic_lib_suffix} -// RUN: %clangxx %{dynamic_lib_options} %S/Inputs/c.cpp %if windows %{%t.dir/libdevice_d.lib%} -o %t.dir/libdevice_c.%{dynamic_lib_suffix} -// RUN: %clangxx %{dynamic_lib_options} %S/Inputs/b.cpp %if windows %{%t.dir/libdevice_c.lib%} -o %t.dir/libdevice_b.%{dynamic_lib_suffix} -// RUN: %clangxx %{dynamic_lib_options} %S/Inputs/a.cpp %if windows %{%t.dir/libdevice_b.lib%} -o %t.dir/libdevice_a.%{dynamic_lib_suffix} +// DEFINE: %{tdir} = %t/.. +// RUN: mkdir -p %{tdir} +// RUN: %clangxx %{dynamic_lib_options} %S/Inputs/d.cpp -o %{tdir}/libdevice_d.%{dynamic_lib_suffix} +// RUN: %clangxx %{dynamic_lib_options} %S/Inputs/c.cpp %if windows %{%{tdir}/libdevice_d.lib%} -o %{tdir}/libdevice_c.%{dynamic_lib_suffix} +// RUN: %clangxx %{dynamic_lib_options} %S/Inputs/b.cpp %if windows %{%{tdir}/libdevice_c.lib%} -o %{tdir}/libdevice_b.%{dynamic_lib_suffix} +// RUN: %clangxx %{dynamic_lib_options} %S/Inputs/a.cpp %if windows %{%{tdir}/libdevice_b.lib%} -o %{tdir}/libdevice_a.%{dynamic_lib_suffix} // RUN: %clangxx -fsycl %{sycl_target_opts} -fsycl-allow-device-image-dependencies -fsycl-device-code-split=per_kernel %S/Inputs/basic.cpp -o %t.out \ // RUN: %if windows \ -// RUN: %{%t.dir/libdevice_a.lib%} \ +// RUN: %{%{tdir}/libdevice_a.lib%} \ // RUN: %else \ -// RUN: %{-L%t.dir -ldevice_a -ldevice_b -ldevice_c -ldevice_d -Wl,-rpath=%t.dir%} +// RUN: %{-L%{tdir} -ldevice_a -ldevice_b -ldevice_c -ldevice_d -Wl,-rpath=%{tdir}%} // RUN: %{run} %t.out diff --git a/sycl/test-e2e/DeviceImageDependencies/singleDynamicLibrary.cpp b/sycl/test-e2e/DeviceImageDependencies/singleDynamicLibrary.cpp index 33035317305b1..ca5a9e0bcfa9e 100644 --- a/sycl/test-e2e/DeviceImageDependencies/singleDynamicLibrary.cpp +++ b/sycl/test-e2e/DeviceImageDependencies/singleDynamicLibrary.cpp @@ -1,20 +1,21 @@ // Test -fsycl-allow-device-image-dependencies with a single dynamic library on Windows // and Linux. -// RUN: mkdir -p %t.dir +// DEFINE: %{tdir} = %t/.. +// RUN: mkdir -p %{tdir} // RUN: %clangxx -fsycl %fPIC %shared_lib -fsycl-allow-device-image-dependencies -I %S/Inputs \ // RUN: %S/Inputs/a.cpp \ // RUN: %S/Inputs/b.cpp \ // RUN: %S/Inputs/c.cpp \ // RUN: %S/Inputs/d.cpp \ // RUN: %S/Inputs/wrapper.cpp \ -// RUN: -o %if windows %{%t.dir/device_single.dll%} %else %{%t.dir/libdevice_single.so%} +// RUN: -o %if windows %{%{tdir}/device_single.dll%} %else %{%{tdir}/libdevice_single.so%} // RUN: %{build} -I%S/Inputs -o %t.out \ // RUN: %if windows \ -// RUN: %{%t.dir/device_single.lib%} \ +// RUN: %{%{tdir}/device_single.lib%} \ // RUN: %else \ -// RUN: %{-L%t.dir -ldevice_single -Wl,-rpath=%t.dir%} +// RUN: %{-L%{tdir} -ldevice_single -Wl,-rpath=%{tdir}%} // RUN: %{run} %t.out From eab54ebd417db7292ad3bae7c9b7829f17044cf0 Mon Sep 17 00:00:00 2001 From: Jinsong Ji Date: Mon, 13 Oct 2025 16:38:26 +0200 Subject: [PATCH 4/8] remove folder --- sycl/test-e2e/Compression/compression_multiple_tu.cpp | 2 +- .../DeviceImageDependencies/NewOffloadDriver/dynamic.cpp | 2 +- .../NewOffloadDriver/singleDynamicLibrary.cpp | 2 +- sycl/test-e2e/DeviceImageDependencies/dynamic.cpp | 2 +- sycl/test-e2e/DeviceImageDependencies/dynamic_compress.cpp | 2 +- sycl/test-e2e/DeviceImageDependencies/singleDynamicLibrary.cpp | 2 +- sycl/test-e2e/DeviceLib/bfloat16_conversion_dlopen_test.cpp | 2 +- .../DeviceLib/bfloat16_conversion_dlopen_test_compress.cpp | 2 +- sycl/test-e2e/DeviceLib/bfloat16_conversion_test.cpp | 2 +- sycl/test-e2e/DeviceLib/bfloat16_conversion_test_compress.cpp | 2 +- sycl/test-e2e/ESIMD/mandelbrot/mandelbrot.cpp | 2 +- sycl/test-e2e/ESIMD/mandelbrot/mandelbrot_spec.cpp | 2 +- sycl/test-e2e/IntermediateLib/dynamic_app_linux.cpp | 2 +- sycl/test-e2e/IntermediateLib/multi_lib_app.cpp | 2 +- sycl/test-e2e/SharedLib/use_when_link.cpp | 2 +- sycl/test-e2e/SharedLib/use_when_link_new_offload.cpp | 2 +- sycl/test-e2e/SharedLib/use_when_link_verify_cache.cpp | 2 +- sycl/test-e2e/SharedLib/use_with_dlopen.cpp | 2 +- sycl/test-e2e/SharedLib/use_with_dlopen_verify_cache.cpp | 2 +- 19 files changed, 19 insertions(+), 19 deletions(-) diff --git a/sycl/test-e2e/Compression/compression_multiple_tu.cpp b/sycl/test-e2e/Compression/compression_multiple_tu.cpp index f3786c353a27b..0290c3771d6b7 100644 --- a/sycl/test-e2e/Compression/compression_multiple_tu.cpp +++ b/sycl/test-e2e/Compression/compression_multiple_tu.cpp @@ -2,7 +2,7 @@ // translation units, one compressed and one not compressed. // REQUIRES: zstd, linux -// RUN: mkdir -p %t.dir +// RUN: rm -rf %t.dir; mkdir -p %t.dir // RUN: %{build} --offload-compress -DENABLE_KERNEL1 -shared -fPIC -o %t.dir/kernel1.so // RUN: %{build} -DENABLE_KERNEL2 -shared -fPIC -o %t.dir/kernel2.so diff --git a/sycl/test-e2e/DeviceImageDependencies/NewOffloadDriver/dynamic.cpp b/sycl/test-e2e/DeviceImageDependencies/NewOffloadDriver/dynamic.cpp index c3aecb7c782df..8d9d62053e04a 100644 --- a/sycl/test-e2e/DeviceImageDependencies/NewOffloadDriver/dynamic.cpp +++ b/sycl/test-e2e/DeviceImageDependencies/NewOffloadDriver/dynamic.cpp @@ -4,7 +4,7 @@ // DEFINE: %{dynamic_lib_suffix} = %if windows %{dll%} %else %{so%} // DEFINE: %{tdir} = %t/.. -// RUN: mkdir -p %{tdir} +// RUN: rm -rf %{tdir}; mkdir -p %{tdir} // RUN: %clangxx --offload-new-driver %{dynamic_lib_options} %S/Inputs/d.cpp -o %{tdir}/libdevice_d.%{dynamic_lib_suffix} // RUN: %clangxx --offload-new-driver %{dynamic_lib_options} %S/Inputs/c.cpp %if windows %{%{tdir}/libdevice_d.lib%} -o %{tdir}/libdevice_c.%{dynamic_lib_suffix} // RUN: %clangxx --offload-new-driver %{dynamic_lib_options} %S/Inputs/b.cpp %if windows %{%{tdir}/libdevice_c.lib%} -o %{tdir}/libdevice_b.%{dynamic_lib_suffix} diff --git a/sycl/test-e2e/DeviceImageDependencies/NewOffloadDriver/singleDynamicLibrary.cpp b/sycl/test-e2e/DeviceImageDependencies/NewOffloadDriver/singleDynamicLibrary.cpp index 356af2c2bf97f..50be3b40f6d7c 100644 --- a/sycl/test-e2e/DeviceImageDependencies/NewOffloadDriver/singleDynamicLibrary.cpp +++ b/sycl/test-e2e/DeviceImageDependencies/NewOffloadDriver/singleDynamicLibrary.cpp @@ -2,7 +2,7 @@ // Windows and Linux. // DEFINE: %{tdir} = %t/.. -// RUN: mkdir -p %{tdir} +// RUN: rm -rf %{tdir}; mkdir -p %{tdir} // RUN: %clangxx --offload-new-driver -fsycl %fPIC %shared_lib -fsycl-allow-device-image-dependencies -I %S/Inputs \ // RUN: %S/Inputs/a.cpp \ // RUN: %S/Inputs/b.cpp \ diff --git a/sycl/test-e2e/DeviceImageDependencies/dynamic.cpp b/sycl/test-e2e/DeviceImageDependencies/dynamic.cpp index 1a260b47dca62..ba700c4b696d2 100644 --- a/sycl/test-e2e/DeviceImageDependencies/dynamic.cpp +++ b/sycl/test-e2e/DeviceImageDependencies/dynamic.cpp @@ -4,7 +4,7 @@ // DEFINE: %{dynamic_lib_suffix} = %if windows %{dll%} %else %{so%} // DEFINE: %{tdir} = %t/.. -// RUN: mkdir -p %{tdir} +// RUN: rm -rf %{tdir}; mkdir -p %{tdir} // RUN: %clangxx %{dynamic_lib_options} %S/Inputs/d.cpp -o %{tdir}/libdevice_d.%{dynamic_lib_suffix} // RUN: %clangxx %{dynamic_lib_options} %S/Inputs/c.cpp %if windows %{%{tdir}/libdevice_d.lib%} -o %{tdir}/libdevice_c.%{dynamic_lib_suffix} // RUN: %clangxx %{dynamic_lib_options} %S/Inputs/b.cpp %if windows %{%{tdir}/libdevice_c.lib%} -o %{tdir}/libdevice_b.%{dynamic_lib_suffix} diff --git a/sycl/test-e2e/DeviceImageDependencies/dynamic_compress.cpp b/sycl/test-e2e/DeviceImageDependencies/dynamic_compress.cpp index 9dcda1097813f..e4efcee778496 100644 --- a/sycl/test-e2e/DeviceImageDependencies/dynamic_compress.cpp +++ b/sycl/test-e2e/DeviceImageDependencies/dynamic_compress.cpp @@ -6,7 +6,7 @@ // DEFINE: %{dynamic_lib_options} = -fsycl %fPIC %shared_lib -fsycl-allow-device-image-dependencies -I %S/Inputs %if windows %{-DMAKE_DLL %} // DEFINE: %{dynamic_lib_suffix} = %if windows %{dll%} %else %{so%} -// RUN: mkdir -p %t.dir +// RUN: rm -rf %t.dir; mkdir -p %t.dir // RUN: %clangxx %{dynamic_lib_options} %S/Inputs/d.cpp \ // RUN: -o %t.dir/libdevicecompress_d.%{dynamic_lib_suffix} diff --git a/sycl/test-e2e/DeviceImageDependencies/singleDynamicLibrary.cpp b/sycl/test-e2e/DeviceImageDependencies/singleDynamicLibrary.cpp index ca5a9e0bcfa9e..2178d68e17110 100644 --- a/sycl/test-e2e/DeviceImageDependencies/singleDynamicLibrary.cpp +++ b/sycl/test-e2e/DeviceImageDependencies/singleDynamicLibrary.cpp @@ -2,7 +2,7 @@ // and Linux. // DEFINE: %{tdir} = %t/.. -// RUN: mkdir -p %{tdir} +// RUN: rm -rf %{tdir}; mkdir -p %{tdir} // RUN: %clangxx -fsycl %fPIC %shared_lib -fsycl-allow-device-image-dependencies -I %S/Inputs \ // RUN: %S/Inputs/a.cpp \ // RUN: %S/Inputs/b.cpp \ diff --git a/sycl/test-e2e/DeviceLib/bfloat16_conversion_dlopen_test.cpp b/sycl/test-e2e/DeviceLib/bfloat16_conversion_dlopen_test.cpp index 82dbc17460492..5c1fa78152a5b 100644 --- a/sycl/test-e2e/DeviceLib/bfloat16_conversion_dlopen_test.cpp +++ b/sycl/test-e2e/DeviceLib/bfloat16_conversion_dlopen_test.cpp @@ -14,7 +14,7 @@ // library is dlclosed and the device images are removed. // REQUIRES: linux -// RUN: mkdir -p %t.dir +// RUN: rm -rf %t.dir; mkdir -p %t.dir // RUN: %{build} -DBUILD_LIB -fPIC -shared -o %t.dir/lib%basename_t.so // RUN: %{build} -DFNAME=%basename_t -ldl -Wl,-rpath=%t.dir -o %t1.out diff --git a/sycl/test-e2e/DeviceLib/bfloat16_conversion_dlopen_test_compress.cpp b/sycl/test-e2e/DeviceLib/bfloat16_conversion_dlopen_test_compress.cpp index 4eb3c71f07e9d..fda61125c933f 100644 --- a/sycl/test-e2e/DeviceLib/bfloat16_conversion_dlopen_test_compress.cpp +++ b/sycl/test-e2e/DeviceLib/bfloat16_conversion_dlopen_test_compress.cpp @@ -9,7 +9,7 @@ // Check bfloat16 devicelib device image compression. // REQUIRES: linux, zstd -// RUN: mkdir -p %t.dir +// RUN: rm -rf %t.dir; mkdir -p %t.dir // RUN: %{build} --offload-compress -DBUILD_LIB -fPIC -shared -o %t.dir/lib%basename_t_compress.so // RUN: %{build} --offload-compress -DFNAME=%basename_t_compress -ldl -o %t1.out -Wl,-rpath=%t.dir // RUN: %{run} %t1.out diff --git a/sycl/test-e2e/DeviceLib/bfloat16_conversion_test.cpp b/sycl/test-e2e/DeviceLib/bfloat16_conversion_test.cpp index 1b81428292e2a..3c7a522c2ac72 100644 --- a/sycl/test-e2e/DeviceLib/bfloat16_conversion_test.cpp +++ b/sycl/test-e2e/DeviceLib/bfloat16_conversion_test.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // REQUIRES: linux -// RUN: mkdir -p %t.dir +// RUN: rm -rf %t.dir; mkdir -p %t.dir // RUN: %{build} -DBUILD_LIB -fPIC -shared -o %t.dir/lib%basename_t.so // RUN: %{build} -DBUILD_EXE -L%t.dir -o %t1.out -l%basename_t -Wl,-rpath=%t.dir // RUN: %{run} %t1.out diff --git a/sycl/test-e2e/DeviceLib/bfloat16_conversion_test_compress.cpp b/sycl/test-e2e/DeviceLib/bfloat16_conversion_test_compress.cpp index 8bec3196391ba..ff7d764992ed7 100644 --- a/sycl/test-e2e/DeviceLib/bfloat16_conversion_test_compress.cpp +++ b/sycl/test-e2e/DeviceLib/bfloat16_conversion_test_compress.cpp @@ -9,7 +9,7 @@ // Check bfloat16 devicelib device image compression. // REQUIRES: linux, zstd -// RUN: mkdir -p %t.dir +// RUN: rm -rf %t.dir; mkdir -p %t.dir // RUN: %{build} --offload-compress -DBUILD_LIB -fPIC -shared -o %t.dir/lib%basename_t_compress.so // RUN: %{build} --offload-compress -DBUILD_EXE -L%t.dir -o %t1.out -l%basename_t_compress -Wl,-rpath=%t.dir // RUN: %{run} %t1.out diff --git a/sycl/test-e2e/ESIMD/mandelbrot/mandelbrot.cpp b/sycl/test-e2e/ESIMD/mandelbrot/mandelbrot.cpp index f1d992c59fa5a..665e9ff2a6c91 100644 --- a/sycl/test-e2e/ESIMD/mandelbrot/mandelbrot.cpp +++ b/sycl/test-e2e/ESIMD/mandelbrot/mandelbrot.cpp @@ -8,7 +8,7 @@ // REQUIRES: aspect-ext_intel_legacy_image // DEFINE: %{mathflags} = %if cl_options %{/clang:-fno-fast-math%} %else %{-fno-fast-math%} // RUN: %{build} %{mathflags} -o %t.out -// RUN: mkdir -p %t.dir +// RUN: rm -rf %t.dir; mkdir -p %t.dir // RUN: %{run} %t.out %t.dir/output.ppm %S/golden_hw.ppm #include "../esimd_test_utils.hpp" diff --git a/sycl/test-e2e/ESIMD/mandelbrot/mandelbrot_spec.cpp b/sycl/test-e2e/ESIMD/mandelbrot/mandelbrot_spec.cpp index 164faea2cccd6..81e96903c1696 100644 --- a/sycl/test-e2e/ESIMD/mandelbrot/mandelbrot_spec.cpp +++ b/sycl/test-e2e/ESIMD/mandelbrot/mandelbrot_spec.cpp @@ -11,7 +11,7 @@ // REQUIRES: aspect-ext_intel_legacy_image // DEFINE: %{mathflags} = %if cl_options %{/clang:-fno-fast-math%} %else %{-fno-fast-math%} // RUN: %{build} %{mathflags} -o %t.out -// RUN: mkdir -p %t.dir +// RUN: rm -rf %t.dir; mkdir -p %t.dir // RUN: %{run} %t.out %t.dir/output_spec.ppm %S/golden_hw.ppm 512 -2.09798 -1.19798 0.004 4.0 #include "../esimd_test_utils.hpp" diff --git a/sycl/test-e2e/IntermediateLib/dynamic_app_linux.cpp b/sycl/test-e2e/IntermediateLib/dynamic_app_linux.cpp index 2dea8f6023023..b9285ca681b22 100644 --- a/sycl/test-e2e/IntermediateLib/dynamic_app_linux.cpp +++ b/sycl/test-e2e/IntermediateLib/dynamic_app_linux.cpp @@ -1,7 +1,7 @@ // REQUIRES: level_zero && linux // build shared library -// RUN: mkdir -p %t.dir +// RUN: rm -rf %t.dir; mkdir -p %t.dir // RUN: %clangxx -fsycl -fPIC -shared -o %t.dir/simple_lib.so %S/Inputs/simple_lib.cpp // build app diff --git a/sycl/test-e2e/IntermediateLib/multi_lib_app.cpp b/sycl/test-e2e/IntermediateLib/multi_lib_app.cpp index 19b2483654abd..ab2aa14adfc8a 100644 --- a/sycl/test-e2e/IntermediateLib/multi_lib_app.cpp +++ b/sycl/test-e2e/IntermediateLib/multi_lib_app.cpp @@ -20,7 +20,7 @@ // So we use %{run-aux} to perform ALL actions on the run machine // like we do for the AoT tests. -// RUN: mkdir -p %t.dir +// RUN: rm -rf %t.dir ; mkdir -p %t.dir // RUN: %{run-aux} %clangxx -fsycl %{fPIC_flag} -DSO_PATH='R"(%t.dir)"' -o %t.out %s // RUN: %{run-aux} %clangxx -fsycl %{fPIC_flag} -shared -DINC=1 -o %t.dir/lib_a.%{shared_lib_ext} %S/Inputs/incrementing_lib.cpp diff --git a/sycl/test-e2e/SharedLib/use_when_link.cpp b/sycl/test-e2e/SharedLib/use_when_link.cpp index bcabd2d5027e8..9a09c50e31831 100644 --- a/sycl/test-e2e/SharedLib/use_when_link.cpp +++ b/sycl/test-e2e/SharedLib/use_when_link.cpp @@ -1,6 +1,6 @@ // REQUIRES: linux // -// RUN: mkdir -p %t.dir +// RUN: rm -rf %t.dir; mkdir -p %t.dir // RUN: %{build} -DBUILD_LIB -fPIC -shared -o %t.dir/lib%basename_t.so // RUN: %{build} -DFOO_FIRST -L%t.dir -o %t1.out -l%basename_t -Wl,-rpath=%t.dir diff --git a/sycl/test-e2e/SharedLib/use_when_link_new_offload.cpp b/sycl/test-e2e/SharedLib/use_when_link_new_offload.cpp index 0c3526191c29a..56af4fce3892c 100644 --- a/sycl/test-e2e/SharedLib/use_when_link_new_offload.cpp +++ b/sycl/test-e2e/SharedLib/use_when_link_new_offload.cpp @@ -3,7 +3,7 @@ // offload driver is enabled. Currently, new offload model supports only JIT. // TODO: Expand the test once AOT support for new offload model is ready. // -// RUN: mkdir -p %t.dir +// RUN: rm -rf %t.dir; mkdir -p %t.dir // RUN: %clangxx -fsycl -fsycl-targets=spir64 --offload-new-driver -DBUILD_LIB -fPIC -shared %s -o %t.dir/lib%basename_t.so // RUN: %clangxx -fsycl -fsycl-targets=spir64 --offload-new-driver -DFOO_FIRST -L%t.dir %s -o %t.out -l%basename_t -Wl,-rpath=%t.dir diff --git a/sycl/test-e2e/SharedLib/use_when_link_verify_cache.cpp b/sycl/test-e2e/SharedLib/use_when_link_verify_cache.cpp index dc17843275ff0..9f39e00913f6a 100644 --- a/sycl/test-e2e/SharedLib/use_when_link_verify_cache.cpp +++ b/sycl/test-e2e/SharedLib/use_when_link_verify_cache.cpp @@ -1,6 +1,6 @@ // REQUIRES: linux // -// RUN: mkdir -p %t.dir +// RUN: rm -rf %t.dir; mkdir -p %t.dir // RUN: %{build} -DBUILD_LIB -fPIC -shared -o %t.dir/lib%basename_t.so // RUN: %{build} -DFOO_FIRST -L%t.dir -o %t1.out -l%basename_t -Wl,-rpath=%t.dir diff --git a/sycl/test-e2e/SharedLib/use_with_dlopen.cpp b/sycl/test-e2e/SharedLib/use_with_dlopen.cpp index fd5534a688344..c64776f939e9f 100644 --- a/sycl/test-e2e/SharedLib/use_with_dlopen.cpp +++ b/sycl/test-e2e/SharedLib/use_with_dlopen.cpp @@ -1,6 +1,6 @@ // REQUIRES: linux // -// RUN: mkdir -p %t.dir +// RUN: rm -rf %t.dir; mkdir -p %t.dir // RUN: %{build} -DBUILD_LIB -fPIC -shared -o %t.dir/lib%basename_t.so // DEFINE: %{compile} = %{build} -DFNAME=%basename_t -ldl -Wl,-rpath=%t.dir diff --git a/sycl/test-e2e/SharedLib/use_with_dlopen_verify_cache.cpp b/sycl/test-e2e/SharedLib/use_with_dlopen_verify_cache.cpp index 026747c05c1c8..d0cfee7abe62e 100644 --- a/sycl/test-e2e/SharedLib/use_with_dlopen_verify_cache.cpp +++ b/sycl/test-e2e/SharedLib/use_with_dlopen_verify_cache.cpp @@ -1,6 +1,6 @@ // REQUIRES: linux // -// RUN: mkdir -p %t.dir +// RUN: rm -rf %t.dir; mkdir -p %t.dir // RUN: %{build} -DBUILD_LIB -fPIC -shared -o %t.dir/lib%basename_t.so // DEFINE: %{compile} = %{build} -DFNAME=%basename_t -ldl -Wl,-rpath=%t.dir From 4356d1a10ec013b8961c261693c185a928eb9eeb Mon Sep 17 00:00:00 2001 From: Jinsong Ji Date: Mon, 13 Oct 2025 12:41:47 -0400 Subject: [PATCH 5/8] Update singleDynamicLibrary.cpp --- .../NewOffloadDriver/singleDynamicLibrary.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sycl/test-e2e/DeviceImageDependencies/NewOffloadDriver/singleDynamicLibrary.cpp b/sycl/test-e2e/DeviceImageDependencies/NewOffloadDriver/singleDynamicLibrary.cpp index 50be3b40f6d7c..356af2c2bf97f 100644 --- a/sycl/test-e2e/DeviceImageDependencies/NewOffloadDriver/singleDynamicLibrary.cpp +++ b/sycl/test-e2e/DeviceImageDependencies/NewOffloadDriver/singleDynamicLibrary.cpp @@ -2,7 +2,7 @@ // Windows and Linux. // DEFINE: %{tdir} = %t/.. -// RUN: rm -rf %{tdir}; mkdir -p %{tdir} +// RUN: mkdir -p %{tdir} // RUN: %clangxx --offload-new-driver -fsycl %fPIC %shared_lib -fsycl-allow-device-image-dependencies -I %S/Inputs \ // RUN: %S/Inputs/a.cpp \ // RUN: %S/Inputs/b.cpp \ From 80857f124717ad16b1f37502d1853e5c9e1adb59 Mon Sep 17 00:00:00 2001 From: Jinsong Ji Date: Mon, 13 Oct 2025 12:42:22 -0400 Subject: [PATCH 6/8] Update dynamic.cpp --- .../DeviceImageDependencies/NewOffloadDriver/dynamic.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sycl/test-e2e/DeviceImageDependencies/NewOffloadDriver/dynamic.cpp b/sycl/test-e2e/DeviceImageDependencies/NewOffloadDriver/dynamic.cpp index 8d9d62053e04a..c3aecb7c782df 100644 --- a/sycl/test-e2e/DeviceImageDependencies/NewOffloadDriver/dynamic.cpp +++ b/sycl/test-e2e/DeviceImageDependencies/NewOffloadDriver/dynamic.cpp @@ -4,7 +4,7 @@ // DEFINE: %{dynamic_lib_suffix} = %if windows %{dll%} %else %{so%} // DEFINE: %{tdir} = %t/.. -// RUN: rm -rf %{tdir}; mkdir -p %{tdir} +// RUN: mkdir -p %{tdir} // RUN: %clangxx --offload-new-driver %{dynamic_lib_options} %S/Inputs/d.cpp -o %{tdir}/libdevice_d.%{dynamic_lib_suffix} // RUN: %clangxx --offload-new-driver %{dynamic_lib_options} %S/Inputs/c.cpp %if windows %{%{tdir}/libdevice_d.lib%} -o %{tdir}/libdevice_c.%{dynamic_lib_suffix} // RUN: %clangxx --offload-new-driver %{dynamic_lib_options} %S/Inputs/b.cpp %if windows %{%{tdir}/libdevice_c.lib%} -o %{tdir}/libdevice_b.%{dynamic_lib_suffix} From ff9792b975bd73310bfd7e4870c59b0a5bab145f Mon Sep 17 00:00:00 2001 From: Jinsong Ji Date: Mon, 13 Oct 2025 12:42:57 -0400 Subject: [PATCH 7/8] Update dynamic.cpp --- sycl/test-e2e/DeviceImageDependencies/dynamic.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sycl/test-e2e/DeviceImageDependencies/dynamic.cpp b/sycl/test-e2e/DeviceImageDependencies/dynamic.cpp index ba700c4b696d2..1a260b47dca62 100644 --- a/sycl/test-e2e/DeviceImageDependencies/dynamic.cpp +++ b/sycl/test-e2e/DeviceImageDependencies/dynamic.cpp @@ -4,7 +4,7 @@ // DEFINE: %{dynamic_lib_suffix} = %if windows %{dll%} %else %{so%} // DEFINE: %{tdir} = %t/.. -// RUN: rm -rf %{tdir}; mkdir -p %{tdir} +// RUN: mkdir -p %{tdir} // RUN: %clangxx %{dynamic_lib_options} %S/Inputs/d.cpp -o %{tdir}/libdevice_d.%{dynamic_lib_suffix} // RUN: %clangxx %{dynamic_lib_options} %S/Inputs/c.cpp %if windows %{%{tdir}/libdevice_d.lib%} -o %{tdir}/libdevice_c.%{dynamic_lib_suffix} // RUN: %clangxx %{dynamic_lib_options} %S/Inputs/b.cpp %if windows %{%{tdir}/libdevice_c.lib%} -o %{tdir}/libdevice_b.%{dynamic_lib_suffix} From da4b20ef8d02d9f2b3929271d41527b0ed728aaf Mon Sep 17 00:00:00 2001 From: Jinsong Ji Date: Mon, 13 Oct 2025 12:44:12 -0400 Subject: [PATCH 8/8] Update singleDynamicLibrary.cpp --- sycl/test-e2e/DeviceImageDependencies/singleDynamicLibrary.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sycl/test-e2e/DeviceImageDependencies/singleDynamicLibrary.cpp b/sycl/test-e2e/DeviceImageDependencies/singleDynamicLibrary.cpp index 2178d68e17110..ca5a9e0bcfa9e 100644 --- a/sycl/test-e2e/DeviceImageDependencies/singleDynamicLibrary.cpp +++ b/sycl/test-e2e/DeviceImageDependencies/singleDynamicLibrary.cpp @@ -2,7 +2,7 @@ // and Linux. // DEFINE: %{tdir} = %t/.. -// RUN: rm -rf %{tdir}; mkdir -p %{tdir} +// RUN: mkdir -p %{tdir} // RUN: %clangxx -fsycl %fPIC %shared_lib -fsycl-allow-device-image-dependencies -I %S/Inputs \ // RUN: %S/Inputs/a.cpp \ // RUN: %S/Inputs/b.cpp \