-
Notifications
You must be signed in to change notification settings - Fork 15.5k
[sanitizer_common][test-only] Specify full path for sort executable in popen.cpp #171622
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…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.
|
@llvm/pr-subscribers-compiler-rt-sanitizer Author: Dan Blackwell (DanBlackwell) ChangesThis 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:
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
|
There was a problem hiding this 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?
boomanaiden154
left a comment
There was a problem hiding this 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.
|
Indeed, this has broken Android I will revert now. |
…r sort executable in popen.cpp" (#171706) Reverts llvm/llvm-project#171622 Co-authored-by: Andrew Haberlandt <ndrewh@users.noreply.github.com>
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.