Skip to content

Conversation

@boomanaiden154
Copy link
Contributor

There was one test that set an environment variable without using env
and also used a subshell. These are features the internal shell does not
support. Rewrite the test to use readfile/env.

@llvmbot
Copy link
Member

llvmbot commented Oct 26, 2025

@llvm/pr-subscribers-xray

Author: Aiden Grossman (boomanaiden154)

Changes

There was one test that set an environment variable without using env
and also used a subshell. These are features the internal shell does not
support. Rewrite the test to use readfile/env.


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

1 Files Affected:

  • (modified) compiler-rt/test/xray/TestCases/Posix/fdr-single-thread.cpp (+3-2)
diff --git a/compiler-rt/test/xray/TestCases/Posix/fdr-single-thread.cpp b/compiler-rt/test/xray/TestCases/Posix/fdr-single-thread.cpp
index b8803aedc8851..36a4e65988f9a 100644
--- a/compiler-rt/test/xray/TestCases/Posix/fdr-single-thread.cpp
+++ b/compiler-rt/test/xray/TestCases/Posix/fdr-single-thread.cpp
@@ -1,11 +1,12 @@
 // RUN: %clangxx_xray -g -std=c++11 %s -o %t
 // RUN: rm -f fdr-logging-1thr-*
-// RUN: XRAY_OPTIONS=XRAY_OPTIONS="verbosity=1 patch_premain=true \
+// RUN: env XRAY_OPTIONS=XRAY_OPTIONS="verbosity=1 patch_premain=true \
 // RUN:   xray_fdr_log=true \
 // RUN:   xray_fdr_log_func_duration_threshold_us=0 \
 // RUN:   xray_logfile_base=fdr-logging-1thr-" %run %t 2>&1
+// RUN: ls fdr-logging-1thr-* | head -n1 | tr -d '\n' > %t.xray_input
 // RUN: %llvm_xray convert --output-format=yaml --symbolize --instr_map=%t \
-// RUN:   "`ls fdr-logging-1thr-* | head -n1`" | FileCheck %s
+// RUN:   "%{readfile:%t.xray_input}" | FileCheck %s
 // RUN: rm fdr-logging-1thr-*
 
 // UNSUPPORTED: target=arm{{.*}}

boomanaiden154 added a commit to boomanaiden154/llvm-project that referenced this pull request Oct 26, 2025
There was one test that set an environment variable without using env
and also used a subshell. These are features the internal shell does not
support. Rewrite the test to use readfile/env.

Pull Request: llvm#165143
Created using spr 1.3.7

[skip ci]
Created using spr 1.3.7
Created using spr 1.3.7

[skip ci]
Created using spr 1.3.7
boomanaiden154 added a commit to boomanaiden154/llvm-project that referenced this pull request Oct 30, 2025
There was one test that set an environment variable without using env
and also used a subshell. These are features the internal shell does not
support. Rewrite the test to use readfile/env.

Pull Request: llvm#165143
boomanaiden154 added a commit to boomanaiden154/llvm-project that referenced this pull request Oct 30, 2025
There was one test that set an environment variable without using env
and also used a subshell. These are features the internal shell does not
support. Rewrite the test to use readfile/env.

Pull Request: llvm#165143
boomanaiden154 added a commit to boomanaiden154/llvm-project that referenced this pull request Oct 30, 2025
There was one test that set an environment variable without using env
and also used a subshell. These are features the internal shell does not
support. Rewrite the test to use readfile/env.

Pull Request: llvm#165143
Created using spr 1.3.7

[skip ci]
Created using spr 1.3.7
@boomanaiden154 boomanaiden154 changed the base branch from users/boomanaiden154/main.xray-make-test-work-with-internal-shell to main October 30, 2025 19:30
@boomanaiden154 boomanaiden154 merged commit 291b8ce into main Oct 30, 2025
8 of 16 checks passed
@boomanaiden154 boomanaiden154 deleted the users/boomanaiden154/xray-make-test-work-with-internal-shell branch October 30, 2025 19:30
llvm-sync bot pushed a commit to arm/arm-toolchain that referenced this pull request Oct 30, 2025
There was one test that set an environment variable without using env
and also used a subshell. These are features the internal shell does not
support. Rewrite the test to use readfile/env.

Reviewers: fmayer, MaskRay

Reviewed By: fmayer

Pull Request: llvm/llvm-project#165143
luciechoi pushed a commit to luciechoi/llvm-project that referenced this pull request Nov 1, 2025
There was one test that set an environment variable without using env
and also used a subshell. These are features the internal shell does not
support. Rewrite the test to use readfile/env.

Reviewers: fmayer, MaskRay

Reviewed By: fmayer

Pull Request: llvm#165143
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants