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

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


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

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.

>From 80057800ee9b7efcd24b34d6ce05d29733e9316d Mon Sep 17 00:00:00 2001
From: Dan Blackwell <dan_blackwell at apple.com>
Date: Wed, 10 Dec 2025 12:32:57 +0000
Subject: [PATCH] [sanitizer_common][test-only] Specify full path for sort
 executable in 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.
---
 compiler-rt/test/sanitizer_common/TestCases/Posix/popen.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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



More information about the llvm-commits mailing list