From 4f5d866af7fed0de1671a68530d3023e9762b71e Mon Sep 17 00:00:00 2001 From: Harini0924 <79345568+Harini0924@users.noreply.github.com> Date: Tue, 13 Aug 2024 19:58:59 -0700 Subject: [PATCH] [llvm-lit] Add REQUIRES: shell to BOLT permission test for lit internal shell (#103012) This patch adds the `REQUIRES: shell` directive to the BOLT permission test to ensure it only runs in environments with a full-featured Unix-like shell. This change is necessary because the test relies on advanced shell capabilities that are not supported by lit's internal shell. **Reasoning:** The BOLT permission test uses features like running commands in the background with `&`, performing arithmetic operations, and handling special number formats (octal). These features require a more capable shell than what lit's internal shell provides. Without a proper shell, the test could fail or behave unpredictably. This change is relevant for enabling the lit internal shell by default, as outlined in [[RFC] Enabling the Lit Internal Shell by Default](https://discourse.llvm.org/t/rfc-enabling-the-lit-internal-shell-by-default/80179) --- bolt/test/permission.test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bolt/test/permission.test b/bolt/test/permission.test index a5a98599eb83b4..f495e87e8c7da9 100644 --- a/bolt/test/permission.test +++ b/bolt/test/permission.test @@ -4,7 +4,7 @@ # This test performs a logical AND operation on the results of the `stat -c %a # %t.bolt` and `umask` commands (both results are displayed in octal), and # checks whether the result is equal to 0. -REQUIRES: system-linux +REQUIRES: shell, system-linux RUN: %clang %cflags %p/Inputs/hello.c -o %t -Wl,-q RUN: llvm-bolt %t -o %t.bolt