Skip to content

Conversation

cmtice
Copy link
Contributor

@cmtice cmtice commented Sep 10, 2025

As part of our work to migrate tests to use the lit internal shell by default, this removes 'REQUIRES: shell' from tests that don't actually require it. In one case the test was updated slightly to pass without requiring shell.

As part of our work to migrate tests to use the lit internal shell
by default, this removes 'REQUIRES: shell' from tests that don't
actually require it. In one case the test was updated slightly to pass
without requiring shell.
@llvmbot
Copy link
Member

llvmbot commented Sep 10, 2025

@llvm/pr-subscribers-compiler-rt-sanitizer

Author: None (cmtice)

Changes

As part of our work to migrate tests to use the lit internal shell by default, this removes 'REQUIRES: shell' from tests that don't actually require it. In one case the test was updated slightly to pass without requiring shell.


Full diff: https://github.com/llvm/llvm-project/pull/157951.diff

8 Files Affected:

  • (modified) compiler-rt/test/asan/TestCases/Darwin/duplicate_os_log_reports.cpp (-1)
  • (modified) compiler-rt/test/asan/TestCases/Linux/read_binary_name_regtest.c (+1-2)
  • (modified) compiler-rt/test/asan/TestCases/suppressions-library.cpp (-2)
  • (modified) compiler-rt/test/asan/TestCases/verbose-log-path_test.cpp (-3)
  • (modified) compiler-rt/test/sanitizer_common/TestCases/external_symbolizer_path.cpp (-2)
  • (modified) compiler-rt/test/sanitizer_common/TestCases/suffix-log-path_test.c (-3)
  • (modified) compiler-rt/test/ubsan/TestCases/Misc/coverage-levels.cpp (-3)
  • (modified) compiler-rt/test/ubsan/TestCases/Misc/log-path_test.cpp (-4)
diff --git a/compiler-rt/test/asan/TestCases/Darwin/duplicate_os_log_reports.cpp b/compiler-rt/test/asan/TestCases/Darwin/duplicate_os_log_reports.cpp
index 43ca027c970cd3..0091ebc09205c2 100644
--- a/compiler-rt/test/asan/TestCases/Darwin/duplicate_os_log_reports.cpp
+++ b/compiler-rt/test/asan/TestCases/Darwin/duplicate_os_log_reports.cpp
@@ -1,5 +1,4 @@
 // UNSUPPORTED: ios
-// REQUIRES: shell
 // REQUIRES: darwin_log_cmd
 // RUN: %clangxx_asan -fsanitize-recover=address %s -o %t
 // RUN: { %env_asan_opts=halt_on_error=0,log_to_syslog=1 %run %t > %t.process_output.txt 2>&1 & } \
diff --git a/compiler-rt/test/asan/TestCases/Linux/read_binary_name_regtest.c b/compiler-rt/test/asan/TestCases/Linux/read_binary_name_regtest.c
index 08bf5e125cf407..5d4a812c80d8ab 100644
--- a/compiler-rt/test/asan/TestCases/Linux/read_binary_name_regtest.c
+++ b/compiler-rt/test/asan/TestCases/Linux/read_binary_name_regtest.c
@@ -6,8 +6,7 @@
 // will be unable to resolve its $ORIGIN due to readlink() restriction and will
 // thus fail to start, causing the test to die with SIGPIPE when attempting to
 // talk to it.
-// RUN: not ls /usr/include/linux/seccomp.h || ( %clang_asan %s -o %t && ( not env ASAN_OPTIONS=symbolize=0 %run %t 2>&1 ) | FileCheck %s )
-// REQUIRES: shell
+// RUN: not ls /usr/include/linux/seccomp.h || %clang_asan %s -o %t || not env ASAN_OPTIONS=symbolize=0 %run %t 2>&1 | FileCheck %s
 // UNSUPPORTED: android
 
 #include <errno.h>
diff --git a/compiler-rt/test/asan/TestCases/suppressions-library.cpp b/compiler-rt/test/asan/TestCases/suppressions-library.cpp
index 5427122eaa92fb..9d1f5d4888e394 100644
--- a/compiler-rt/test/asan/TestCases/suppressions-library.cpp
+++ b/compiler-rt/test/asan/TestCases/suppressions-library.cpp
@@ -4,8 +4,6 @@
 // Check that without suppressions, we catch the issue.
 // RUN: not %run %t 2>&1 | FileCheck --check-prefix=CHECK-CRASH %s
 
-// REQUIRES: shell
-
 // RUN: echo "interceptor_via_lib:"%xdynamiclib_filename > %t.supp
 // RUN: %env_asan_opts=suppressions='"%t.supp"' %run %t 2>&1 | FileCheck --check-prefix=CHECK-IGNORE %s
 
diff --git a/compiler-rt/test/asan/TestCases/verbose-log-path_test.cpp b/compiler-rt/test/asan/TestCases/verbose-log-path_test.cpp
index 37c1dab6db8ecf..2c094c484371b1 100644
--- a/compiler-rt/test/asan/TestCases/verbose-log-path_test.cpp
+++ b/compiler-rt/test/asan/TestCases/verbose-log-path_test.cpp
@@ -1,9 +1,6 @@
 // RUN: rm -rf %t-dir && mkdir -p %t-dir
 // RUN: %clangxx_asan %s -o %t-dir/verbose-log-path_test-binary
 
-// The glob below requires bash.
-// REQUIRES: shell
-
 // Good log_path.
 // RUN: rm -f %t-dir/asan.log.*
 // RUN: %env_asan_opts=log_path=%t-dir/asan.log:log_exe_name=1 not %run %t-dir/verbose-log-path_test-binary 2> %t.out
diff --git a/compiler-rt/test/sanitizer_common/TestCases/external_symbolizer_path.cpp b/compiler-rt/test/sanitizer_common/TestCases/external_symbolizer_path.cpp
index 9416da2940be3f..45e8eaddb024c9 100644
--- a/compiler-rt/test/sanitizer_common/TestCases/external_symbolizer_path.cpp
+++ b/compiler-rt/test/sanitizer_common/TestCases/external_symbolizer_path.cpp
@@ -19,8 +19,6 @@
 // RUN: %env_tool_opts=external_symbolizer_path=%d/external_symbolizer_path.cpp.tmp.bin/llvm-symbolizer \
 // RUN:   %run %t 2>&1 | FileCheck %s --check-prefix=NOT-FOUND
 
-// REQUIRES: shell
-
 // Mobile device will not have symbolizer in provided path.
 // UNSUPPORTED: ios, android
 
diff --git a/compiler-rt/test/sanitizer_common/TestCases/suffix-log-path_test.c b/compiler-rt/test/sanitizer_common/TestCases/suffix-log-path_test.c
index bf0e4e1bc3763d..b8ca5c739f4283 100644
--- a/compiler-rt/test/sanitizer_common/TestCases/suffix-log-path_test.c
+++ b/compiler-rt/test/sanitizer_common/TestCases/suffix-log-path_test.c
@@ -2,9 +2,6 @@
 // RUN: mkdir -p %t.dir
 // RUN: %clang %s -o %t.dir/suffix-log-path_test-binary
 
-// The glob below requires bash.
-// REQUIRES: shell
-
 // Good log_path with suffix.
 // 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
 // RUN: FileCheck %s < %t.dir/sanitizer.log.suffix-log-path_test-binary.*.txt
diff --git a/compiler-rt/test/ubsan/TestCases/Misc/coverage-levels.cpp b/compiler-rt/test/ubsan/TestCases/Misc/coverage-levels.cpp
index 527bd8552c8194..e1191b5f6bb9c8 100644
--- a/compiler-rt/test/ubsan/TestCases/Misc/coverage-levels.cpp
+++ b/compiler-rt/test/ubsan/TestCases/Misc/coverage-levels.cpp
@@ -1,8 +1,5 @@
 // Test various levels of coverage
 //
-// FIXME: Port the environment variable logic below for the lit shell.
-// REQUIRES: shell
-//
 // RUN: rm -rf %t-dir && mkdir %t-dir
 // RUN: %clangxx -fsanitize=shift                        -DGOOD_SHIFT=1 -O1 -fsanitize-coverage=func,trace-pc-guard  %s -o %t
 // RUN: %env_ubsan_opts=coverage=1:verbosity=1:coverage_dir='"%t-dir"' %run %t 2>&1 | FileCheck %s --check-prefix=CHECK1 --check-prefix=CHECK_NOWARN
diff --git a/compiler-rt/test/ubsan/TestCases/Misc/log-path_test.cpp b/compiler-rt/test/ubsan/TestCases/Misc/log-path_test.cpp
index ffd95a5f9c0bb4..f1618afba248e0 100644
--- a/compiler-rt/test/ubsan/TestCases/Misc/log-path_test.cpp
+++ b/compiler-rt/test/ubsan/TestCases/Misc/log-path_test.cpp
@@ -1,9 +1,6 @@
 // FIXME: https://code.google.com/p/address-sanitizer/issues/detail?id=316
 // XFAIL: android
 
-// The globs below do not work in the lit shell.
-// REQUIRES: shell
-
 // RUN: %clangxx -fsanitize=undefined %s -O1 -o %t
 
 // Regular run.
@@ -38,4 +35,3 @@ int main(int argc, char *argv[]) {
 }
 
 // CHECK-ERROR: runtime error: -4 is outside the range of representable values of type 'unsigned int'
-

Copy link
Contributor

@boomanaiden154 boomanaiden154 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, assuming the tests pass in CI on Linux+Windows.

@cmtice cmtice merged commit 0c07efd into llvm:main Sep 10, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants