Skip to content

Conversation

@DanBlackwell
Copy link
Contributor

This test has begun failing on iossim with 'sh: sort: command not found' in the stderr. I believe this may be due to the change to the lit internal shell not having 'sort' in it's path.

This patch adds the full path /usr/bin/sort to work around this.

…n popen.cpp test

This test has begun failing with 'sh: sort: command not found' in the stderr. I believe this may be due to the change to the lit internal shell not having 'sort' in it's path.

This patch adds the full path /usr/bin/sort to work around this.
@llvmbot
Copy link
Member

llvmbot commented Dec 10, 2025

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

Author: Dan Blackwell (DanBlackwell)

Changes

This test has begun failing on iossim with 'sh: sort: command not found' in the stderr. I believe this may be due to the change to the lit internal shell not having 'sort' in it's path.

This patch adds the full path /usr/bin/sort to work around this.


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

1 Files Affected:

  • (modified) compiler-rt/test/sanitizer_common/TestCases/Posix/popen.cpp (+1-1)
diff --git a/compiler-rt/test/sanitizer_common/TestCases/Posix/popen.cpp b/compiler-rt/test/sanitizer_common/TestCases/Posix/popen.cpp
index 6bf6255a697a1..fdbdb2f788b04 100644
--- a/compiler-rt/test/sanitizer_common/TestCases/Posix/popen.cpp
+++ b/compiler-rt/test/sanitizer_common/TestCases/Posix/popen.cpp
@@ -8,7 +8,7 @@
 int main(void) {
   // use a tool that produces different output than input to verify
   // that everything worked correctly
-  FILE *fp = popen("sort", "w");
+  FILE *fp = popen("/usr/bin/sort", "w");
   assert(fp);
 
   // verify that fileno() returns a meaningful descriptor (needed

@ndrewh ndrewh self-requested a review December 10, 2025 17:57
Copy link
Contributor

@ndrewh ndrewh left a comment

Choose a reason for hiding this comment

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

I think there's a decent chance this works. I guess maybe the simulator on green dragon runs with a PATH that doesn't have sort lol. But sim can see host paths and run some host executables, so, maybe?

@DanBlackwell DanBlackwell merged commit c5995e2 into llvm:main Dec 10, 2025
13 checks passed
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.

I would expect portability problems with this. I believe there are systems (especially Linux) that put system binaries in places other than /usr/bin.

@DanBlackwell
Copy link
Contributor Author

Indeed, this has broken Android I will revert now.

DanBlackwell added a commit that referenced this pull request Dec 10, 2025
…utable in popen.cpp" (#171706)

Reverts #171622

Co-authored-by: Andrew Haberlandt <ndrewh@users.noreply.github.com>
llvm-sync bot pushed a commit to arm/arm-toolchain that referenced this pull request Dec 10, 2025
…r sort executable in popen.cpp" (#171706)

Reverts llvm/llvm-project#171622

Co-authored-by: Andrew Haberlandt <ndrewh@users.noreply.github.com>
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