[compiler-rt] [sanitizer_common][test-only] Specify full path for sort executable in popen.cpp (PR #171622)

via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 10 06:11:44 PST 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

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

Author: Dan Blackwell (DanBlackwell)

<details>
<summary>Changes</summary>

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
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

``````````

</details>


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


More information about the llvm-commits mailing list