Skip to content

Conversation

@boomanaiden154
Copy link
Contributor

There was one test that used subshells to read a file. Replace those
subshells with the readfile substitution.

@llvmbot llvmbot added compiler-rt PGO Profile Guided Optimizations labels Oct 26, 2025
@llvmbot
Copy link
Member

llvmbot commented Oct 26, 2025

@llvm/pr-subscribers-pgo

Author: Aiden Grossman (boomanaiden154)

Changes

There was one test that used subshells to read a file. Replace those
subshells with the readfile substitution.


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

1 Files Affected:

  • (modified) compiler-rt/test/profile/instrprof-hostname.c (+2-2)
diff --git a/compiler-rt/test/profile/instrprof-hostname.c b/compiler-rt/test/profile/instrprof-hostname.c
index b77cf8df158bd..c0b3426eeaa84 100644
--- a/compiler-rt/test/profile/instrprof-hostname.c
+++ b/compiler-rt/test/profile/instrprof-hostname.c
@@ -1,7 +1,7 @@
 // RUN: %clang_profgen -o %t -O3 %s
 // RUN: env LLVM_PROFILE_FILE=%h.%t-%h.profraw_%h %run %t
-// RUN: %run uname -n > %t.n
-// RUN: llvm-profdata merge -o %t.profdata `cat %t.n`.%t-`cat %t.n`.profraw_`cat %t.n`
+// 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
 

boomanaiden154 added a commit to boomanaiden154/llvm-project that referenced this pull request Oct 26, 2025
There was one test that used subshells to read a file. Replace those
subshells with the readfile substitution.

Pull Request: llvm#165145
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 used subshells to read a file. Replace those
subshells with the readfile substitution.

Pull Request: llvm#165145
boomanaiden154 added a commit to boomanaiden154/llvm-project that referenced this pull request Oct 30, 2025
There was one test that used subshells to read a file. Replace those
subshells with the readfile substitution.

Pull Request: llvm#165145
boomanaiden154 added a commit to boomanaiden154/llvm-project that referenced this pull request Oct 30, 2025
There was one test that used subshells to read a file. Replace those
subshells with the readfile substitution.

Pull Request: llvm#165145
@boomanaiden154 boomanaiden154 changed the base branch from users/boomanaiden154/main.profile-rewrite-test-to-work-with-internal-shell to main October 30, 2025 19:45
Created using spr 1.3.7
@boomanaiden154 boomanaiden154 merged commit 841d85f into main Oct 30, 2025
5 of 9 checks passed
@boomanaiden154 boomanaiden154 deleted the users/boomanaiden154/profile-rewrite-test-to-work-with-internal-shell branch October 30, 2025 19:46
llvm-sync bot pushed a commit to arm/arm-toolchain that referenced this pull request Oct 30, 2025
There was one test that used subshells to read a file. Replace those
subshells with the readfile substitution.

Reviewers: fmayer, mingmingl-llvm

Reviewed By: mingmingl-llvm, fmayer

Pull Request: llvm/llvm-project#165145
luciechoi pushed a commit to luciechoi/llvm-project that referenced this pull request Nov 1, 2025
There was one test that used subshells to read a file. Replace those
subshells with the readfile substitution.

Reviewers: fmayer, mingmingl-llvm

Reviewed By: mingmingl-llvm, fmayer

Pull Request: llvm#165145
DEBADRIBASAK pushed a commit to DEBADRIBASAK/llvm-project that referenced this pull request Nov 3, 2025
There was one test that used subshells to read a file. Replace those
subshells with the readfile substitution.

Reviewers: fmayer, mingmingl-llvm

Reviewed By: mingmingl-llvm, fmayer

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

Labels

compiler-rt PGO Profile Guided Optimizations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants