Skip to content

Commit 7f37932

Browse files
authored
[BOLT][test] Removed the use of parentheses in BOLT tests with lit internal shell (#105720)
This patch addresses compatibility issues with the lit internal shell by removing the use of subshell execution (parentheses and subshell syntax) in the `BOLT` tests. The lit internal shell does not support parentheses, so the tests have been refactored to use separate command invocations, with outputs redirected to temporary files where necessary. 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) fixes: #102401
1 parent 3faf5b9 commit 7f37932

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

bolt/test/X86/end-symbol.test

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
# RUN: yaml2obj %p/Inputs/plt-sec.yaml &> %t.exe
22
# RUN: llvm-bolt %t.exe -o %t.out
3-
# RUN: (llvm-readelf --program-headers %t.out | grep LOAD | tail -n 1 ; llvm-nm %t.out) \
4-
# RUN: | FileCheck %s
3+
4+
# RUN: llvm-readelf --program-headers %t.out | grep LOAD | tail -n 1 > %t.load
5+
# RUN: llvm-nm %t.out >> %t.load
6+
# RUN: FileCheck %s < %t.load
57

68
## Check that llvm-bolt correctly updates _end symbol to match the end of the
79
## last loadable segment.

bolt/test/X86/instrumentation-eh_frame_hdr.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66
// RUN: %clangxx %cxxflags -static -Wl,-q %s -o %t.exe -Wl,--entry=_start
77
// RUN: llvm-bolt %t.exe -o %t.instr -instrument \
88
// RUN: --instrumentation-file=%t.fdata -instrumentation-sleep-time=1
9-
// RUN: (llvm-readelf -SW %t.instr | grep -v bolt; llvm-readelf -lW %t.instr | \
10-
// RUN: grep LOAD | tail -n 1) | FileCheck %s
9+
// RUN: llvm-readelf -SW %t.instr | grep -v bolt > %t.sections
10+
// RUN: llvm-readelf -lW %t.instr | grep LOAD | tail -n 1 >> %t.sections
11+
// RUN: FileCheck %s < %t.sections
1112

1213
// CHECK: {{.*}} .eh_frame_hdr PROGBITS [[#%x, EH_ADDR:]]
1314
// CHECK: LOAD 0x[[#%x, LD_OFFSET:]] 0x[[#%x, LD_VADDR:]] 0x[[#%x, LD_FSIZE:]]

0 commit comments

Comments
 (0)