From 8108dd60427f55d402f66f1c9b90c928acdda9e8 Mon Sep 17 00:00:00 2001 From: Aiden Grossman Date: Tue, 23 Dec 2025 06:41:51 +0000 Subject: [PATCH 1/4] [compiler-rt] Remove REQUIRES: shell lines The shell feature only implies that we are not running on Windows now that the internal shell is enabled by default everywhere. Remove where we can and rewrite to the more intentional UNSUPPORTED: system-windows when we still need to prevent tests from running on Windows. --- compiler-rt/test/asan/TestCases/Linux/allocator_oom_test.cpp | 4 ++-- compiler-rt/test/asan/TestCases/Posix/deep_call_stack.cpp | 3 ++- compiler-rt/test/asan/TestCases/log-path_test.cpp | 3 --- compiler-rt/test/asan/TestCases/scariness_score_test.cpp | 1 - compiler-rt/test/fuzzer/features_dir.test | 2 +- compiler-rt/test/fuzzer/fork-sigusr.test | 1 - compiler-rt/test/fuzzer/merge-posix.test | 1 - compiler-rt/test/fuzzer/merge-sigusr.test | 1 - compiler-rt/test/fuzzer/sigint.test | 2 +- compiler-rt/test/fuzzer/sigusr.test | 1 - compiler-rt/test/fuzzer/ulimit.test | 3 ++- compiler-rt/test/hwasan/TestCases/print-memory-usage.c | 3 ++- compiler-rt/test/memprof/TestCases/log_path_test.cpp | 3 --- compiler-rt/test/msan/Linux/reexec_unlimited_stack.cpp | 1 - compiler-rt/test/profile/instrprof-hostname.c | 3 ++- 15 files changed, 12 insertions(+), 20 deletions(-) diff --git a/compiler-rt/test/asan/TestCases/Linux/allocator_oom_test.cpp b/compiler-rt/test/asan/TestCases/Linux/allocator_oom_test.cpp index c51e11fcb348a..e42ebf63f0d70 100644 --- a/compiler-rt/test/asan/TestCases/Linux/allocator_oom_test.cpp +++ b/compiler-rt/test/asan/TestCases/Linux/allocator_oom_test.cpp @@ -43,8 +43,8 @@ // ASan shadow memory on s390 is too large for this test. // AArch64 bots fail on this test. // TODO(alekseys): Android lit do not run ulimit on device. -// REQUIRES: shell, shadow-scale-3 -// UNSUPPORTED: android, target={{(s390|aarch64|powerpc64le).*}} +// REQUIRES: shadow-scale-3 +// UNSUPPORTED: android, target={{(s390|aarch64|powerpc64le).*}}, system-windows #include #include diff --git a/compiler-rt/test/asan/TestCases/Posix/deep_call_stack.cpp b/compiler-rt/test/asan/TestCases/Posix/deep_call_stack.cpp index c4e519fa61830..734c585c02472 100644 --- a/compiler-rt/test/asan/TestCases/Posix/deep_call_stack.cpp +++ b/compiler-rt/test/asan/TestCases/Posix/deep_call_stack.cpp @@ -1,5 +1,6 @@ // Check that UAR mode can handle very deep recursion. -// REQUIRES: shell +// Requires ulimit +// UNSUPPORTED: system-windows // TODO(boomanaiden154): This test currently fails with the internal // shell because python is not able to set RLIMIT_STACK. We should // reenable this when the behavior is fixed. diff --git a/compiler-rt/test/asan/TestCases/log-path_test.cpp b/compiler-rt/test/asan/TestCases/log-path_test.cpp index 22f077fb54680..ee682f8d5fc65 100644 --- a/compiler-rt/test/asan/TestCases/log-path_test.cpp +++ b/compiler-rt/test/asan/TestCases/log-path_test.cpp @@ -1,9 +1,6 @@ // FIXME: https://code.google.com/p/address-sanitizer/issues/detail?id=316 // UNSUPPORTED: ios, android // -// The for loop in the backticks below requires bash. -// REQUIRES: shell -// // RUN: %clangxx_asan %s -o %t // Regular run. diff --git a/compiler-rt/test/asan/TestCases/scariness_score_test.cpp b/compiler-rt/test/asan/TestCases/scariness_score_test.cpp index 51ae040670bf0..bf8bae9e2a088 100644 --- a/compiler-rt/test/asan/TestCases/scariness_score_test.cpp +++ b/compiler-rt/test/asan/TestCases/scariness_score_test.cpp @@ -73,7 +73,6 @@ // RUN: not %run %t 27 2>&1 | FileCheck %s --check-prefix=CHECK27 // Parts of the test are too platform-specific: // REQUIRES: x86_64-target-arch -// REQUIRES: shell // TODO(boomanaiden154): This test currently fails with the internal // shell because python is not able to set RLIMIT_STACK. We should // reenable this when the behavior is fixed. diff --git a/compiler-rt/test/fuzzer/features_dir.test b/compiler-rt/test/fuzzer/features_dir.test index ce63b3920708c..c6beec01bc3ab 100644 --- a/compiler-rt/test/fuzzer/features_dir.test +++ b/compiler-rt/test/fuzzer/features_dir.test @@ -1,5 +1,5 @@ # Tests -features_dir=F -# REQUIRES: linux, shell +# REQUIRES: linux RUN: %cpp_compiler %S/SimpleTest.cpp -o %t-SimpleTest RUN: rm -rf %t-C %t-F RUN: mkdir %t-C %t-F diff --git a/compiler-rt/test/fuzzer/fork-sigusr.test b/compiler-rt/test/fuzzer/fork-sigusr.test index 088e63cae4311..4f796171fbd11 100644 --- a/compiler-rt/test/fuzzer/fork-sigusr.test +++ b/compiler-rt/test/fuzzer/fork-sigusr.test @@ -1,6 +1,5 @@ # Check that libFuzzer honors SIGUSR1/SIGUSR2 # Disabled on Windows which does not have SIGUSR1/SIGUSR2. -REQUIRES: shell UNSUPPORTED: darwin, target={{.*windows.*}}, target=aarch64{{.*}} RUN: rm -rf %t RUN: mkdir -p %t diff --git a/compiler-rt/test/fuzzer/merge-posix.test b/compiler-rt/test/fuzzer/merge-posix.test index 6e37651e6fd29..7df12f45c7431 100644 --- a/compiler-rt/test/fuzzer/merge-posix.test +++ b/compiler-rt/test/fuzzer/merge-posix.test @@ -1,4 +1,3 @@ -REQUIRES: shell XFAIL: ios RUN: %cpp_compiler %S/FullCoverageSetTest.cpp -o %t-FullCoverageSetTest diff --git a/compiler-rt/test/fuzzer/merge-sigusr.test b/compiler-rt/test/fuzzer/merge-sigusr.test index 4e492775400b9..762ae0d106d28 100644 --- a/compiler-rt/test/fuzzer/merge-sigusr.test +++ b/compiler-rt/test/fuzzer/merge-sigusr.test @@ -1,7 +1,6 @@ # Check that libFuzzer honors SIGUSR1/SIGUSR2 # FIXME: Disabled on Windows for now because of reliance on posix only features # (eg: export, "&", pkill). -REQUIRES: shell UNSUPPORTED: darwin, target={{.*windows.*}} RUN: rm -rf %t RUN: mkdir -p %t diff --git a/compiler-rt/test/fuzzer/sigint.test b/compiler-rt/test/fuzzer/sigint.test index ac482d79b8e28..0e239c3ce5385 100644 --- a/compiler-rt/test/fuzzer/sigint.test +++ b/compiler-rt/test/fuzzer/sigint.test @@ -1,4 +1,4 @@ -REQUIRES: shell, msan +REQUIRES: msan UNSUPPORTED: target=arm{{.*}} # Check that libFuzzer exits gracefully under SIGINT with MSan. diff --git a/compiler-rt/test/fuzzer/sigusr.test b/compiler-rt/test/fuzzer/sigusr.test index c8a77ac63a6d7..c3d7adf8ea99b 100644 --- a/compiler-rt/test/fuzzer/sigusr.test +++ b/compiler-rt/test/fuzzer/sigusr.test @@ -1,6 +1,5 @@ # FIXME: Disabled on Windows for now because of reliance on posix only features # (eg: export, "&", pkill). -REQUIRES: shell UNSUPPORTED: darwin, target={{.*windows.*}} # Check that libFuzzer honors SIGUSR1/SIGUSR2 RUN: rm -rf %t diff --git a/compiler-rt/test/fuzzer/ulimit.test b/compiler-rt/test/fuzzer/ulimit.test index e330a97cc07c5..a33af49117f63 100644 --- a/compiler-rt/test/fuzzer/ulimit.test +++ b/compiler-rt/test/fuzzer/ulimit.test @@ -1,4 +1,5 @@ -REQUIRES: shell +# Requires ulimit +UNSUPPORTED: system-windows RUN: %cpp_compiler %S/SimpleTest.cpp -o %t-SimpleTest RUN: ulimit -s 1000 RUN: not %run %t-SimpleTest diff --git a/compiler-rt/test/hwasan/TestCases/print-memory-usage.c b/compiler-rt/test/hwasan/TestCases/print-memory-usage.c index 13652fbd921b0..b7e1e780e37e8 100644 --- a/compiler-rt/test/hwasan/TestCases/print-memory-usage.c +++ b/compiler-rt/test/hwasan/TestCases/print-memory-usage.c @@ -1,5 +1,6 @@ // Tests __hwasan_print_memory_usage. -// REQUIRES: shell +// Requires ulimit +// UNSUPPORTED: system-windows // RUN: %clang_hwasan %s -o %t // RUN: ulimit -s 1000 // RUN: %run %t 2>&1 | FileCheck %s diff --git a/compiler-rt/test/memprof/TestCases/log_path_test.cpp b/compiler-rt/test/memprof/TestCases/log_path_test.cpp index 683ca67122c31..4c38bd56ebb64 100644 --- a/compiler-rt/test/memprof/TestCases/log_path_test.cpp +++ b/compiler-rt/test/memprof/TestCases/log_path_test.cpp @@ -1,6 +1,3 @@ -// The for loop in the backticks below requires bash. -// REQUIRES: shell -// // RUN: %clangxx_memprof %s -o %t // stderr log_path diff --git a/compiler-rt/test/msan/Linux/reexec_unlimited_stack.cpp b/compiler-rt/test/msan/Linux/reexec_unlimited_stack.cpp index 8dee27047470e..61492ec34533f 100644 --- a/compiler-rt/test/msan/Linux/reexec_unlimited_stack.cpp +++ b/compiler-rt/test/msan/Linux/reexec_unlimited_stack.cpp @@ -1,6 +1,5 @@ // MSAN re-execs on unlimited stacks. We use that to verify ReExec() uses the // right path. -// REQUIRES: shell // RUN: %clangxx_msan -O0 %s -o %t && ulimit -s unlimited && %run %t | FileCheck %s #include diff --git a/compiler-rt/test/profile/instrprof-hostname.c b/compiler-rt/test/profile/instrprof-hostname.c index c0b3426eeaa84..b2bc26d26d38b 100644 --- a/compiler-rt/test/profile/instrprof-hostname.c +++ b/compiler-rt/test/profile/instrprof-hostname.c @@ -3,7 +3,8 @@ // RUN: %run uname -n | tr -d '\n' > %t.n // RUN: llvm-profdata merge -o %t.profdata %{readfile:%t.n}.%t-%{readfile:%t.n}.profraw_%{readfile:%t.n} // RUN: %clang_profuse=%t.profdata -o - -S -emit-llvm %s | FileCheck %s -// REQUIRES: shell +// Requires uname +// UNSUPPORTED: system-windows int main(int argc, const char *argv[]) { // CHECK: br i1 %{{.*}}, label %{{.*}}, label %{{.*}}, !prof ![[PD1:[0-9]+]] From 84f253ac693cbf4e8dc10aba2af5f422a78ad9b9 Mon Sep 17 00:00:00 2001 From: Aiden Grossman Date: Tue, 23 Dec 2025 07:22:05 +0000 Subject: [PATCH 2/4] test --- .ci/monolithic-windows.sh | 2 +- compiler-rt/test/asan/TestCases/log-path_test.cpp | 2 +- compiler-rt/test/asan/TestCases/scariness_score_test.cpp | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.ci/monolithic-windows.sh b/.ci/monolithic-windows.sh index 36941644c6a6c..3f43530676b71 100755 --- a/.ci/monolithic-windows.sh +++ b/.ci/monolithic-windows.sh @@ -39,7 +39,7 @@ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \ -D LLVM_ENABLE_ASSERTIONS=ON \ -D LLVM_BUILD_EXAMPLES=ON \ -D COMPILER_RT_BUILD_LIBFUZZER=OFF \ - -D LLVM_LIT_ARGS="-v --xunit-xml-output ${BUILD_DIR}/test-results.xml --use-unique-output-file-name --timeout=1200 --time-tests --succinct" \ + -D LLVM_LIT_ARGS="-vv --xunit-xml-output ${BUILD_DIR}/test-results.xml --use-unique-output-file-name --timeout=60 --time-tests --succinct" \ -D COMPILER_RT_BUILD_ORC=OFF \ -D CMAKE_C_COMPILER_LAUNCHER=sccache \ -D CMAKE_CXX_COMPILER_LAUNCHER=sccache \ diff --git a/compiler-rt/test/asan/TestCases/log-path_test.cpp b/compiler-rt/test/asan/TestCases/log-path_test.cpp index ee682f8d5fc65..410e36ec5fec6 100644 --- a/compiler-rt/test/asan/TestCases/log-path_test.cpp +++ b/compiler-rt/test/asan/TestCases/log-path_test.cpp @@ -32,7 +32,7 @@ // RUN: not cat %t.log.* // FIXME: log_path is not supported on Windows yet. -// XFAIL: target={{.*windows-msvc.*}} +// UNSUPPORTED: system-windows #include #include diff --git a/compiler-rt/test/asan/TestCases/scariness_score_test.cpp b/compiler-rt/test/asan/TestCases/scariness_score_test.cpp index bf8bae9e2a088..8e5ccec4ff265 100644 --- a/compiler-rt/test/asan/TestCases/scariness_score_test.cpp +++ b/compiler-rt/test/asan/TestCases/scariness_score_test.cpp @@ -75,8 +75,9 @@ // REQUIRES: x86_64-target-arch // TODO(boomanaiden154): This test currently fails with the internal // shell because python is not able to set RLIMIT_STACK. We should -// reenable this when the behavior is fixed. -// UNSUPPORTED: system-darwin +// reenable this when the behavior is fixed. Windows does not support +// ulimit. +// UNSUPPORTED: system-darwin, system-windows #include #include #include From 89110804ed82a2d935bc4bac3f978847e6e912d4 Mon Sep 17 00:00:00 2001 From: Aiden Grossman Date: Tue, 23 Dec 2025 19:08:34 +0000 Subject: [PATCH 3/4] fix --- .ci/monolithic-windows.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/monolithic-windows.sh b/.ci/monolithic-windows.sh index 3f43530676b71..36941644c6a6c 100755 --- a/.ci/monolithic-windows.sh +++ b/.ci/monolithic-windows.sh @@ -39,7 +39,7 @@ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \ -D LLVM_ENABLE_ASSERTIONS=ON \ -D LLVM_BUILD_EXAMPLES=ON \ -D COMPILER_RT_BUILD_LIBFUZZER=OFF \ - -D LLVM_LIT_ARGS="-vv --xunit-xml-output ${BUILD_DIR}/test-results.xml --use-unique-output-file-name --timeout=60 --time-tests --succinct" \ + -D LLVM_LIT_ARGS="-v --xunit-xml-output ${BUILD_DIR}/test-results.xml --use-unique-output-file-name --timeout=1200 --time-tests --succinct" \ -D COMPILER_RT_BUILD_ORC=OFF \ -D CMAKE_C_COMPILER_LAUNCHER=sccache \ -D CMAKE_CXX_COMPILER_LAUNCHER=sccache \ From 5489f65e0c95b65aa95645e73139a286ccd6c4e2 Mon Sep 17 00:00:00 2001 From: Aiden Grossman Date: Tue, 23 Dec 2025 19:47:46 +0000 Subject: [PATCH 4/4] feedback --- compiler-rt/test/asan/TestCases/Linux/allocator_oom_test.cpp | 2 +- compiler-rt/test/asan/TestCases/Posix/deep_call_stack.cpp | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/compiler-rt/test/asan/TestCases/Linux/allocator_oom_test.cpp b/compiler-rt/test/asan/TestCases/Linux/allocator_oom_test.cpp index e42ebf63f0d70..c6f516e203c7e 100644 --- a/compiler-rt/test/asan/TestCases/Linux/allocator_oom_test.cpp +++ b/compiler-rt/test/asan/TestCases/Linux/allocator_oom_test.cpp @@ -44,7 +44,7 @@ // AArch64 bots fail on this test. // TODO(alekseys): Android lit do not run ulimit on device. // REQUIRES: shadow-scale-3 -// UNSUPPORTED: android, target={{(s390|aarch64|powerpc64le).*}}, system-windows +// UNSUPPORTED: android, target={{(s390|aarch64|powerpc64le).*}} #include #include diff --git a/compiler-rt/test/asan/TestCases/Posix/deep_call_stack.cpp b/compiler-rt/test/asan/TestCases/Posix/deep_call_stack.cpp index 734c585c02472..991d7fc5f516a 100644 --- a/compiler-rt/test/asan/TestCases/Posix/deep_call_stack.cpp +++ b/compiler-rt/test/asan/TestCases/Posix/deep_call_stack.cpp @@ -1,6 +1,4 @@ // Check that UAR mode can handle very deep recursion. -// Requires ulimit -// UNSUPPORTED: system-windows // TODO(boomanaiden154): This test currently fails with the internal // shell because python is not able to set RLIMIT_STACK. We should // reenable this when the behavior is fixed.