-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
tests/misc/coreutils.sh: Fail with invalid binary name #10258
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
base: main
Are you sure you want to change the base?
Conversation
|
GNU testsuite comparison: |
e9b9baa to
ddd1f27
Compare
CodSpeed Performance ReportMerging this PR will not alter performanceComparing Summary
Footnotes
|
|
GNU testsuite comparison: |
|
GNU testsuite comparison: |
|
GNU testsuite comparison: |
src/bin/coreutils.rs
Outdated
| Some(OsString::from(util)) | ||
| } else { | ||
| // unmatched binary name => regard as multi-binary container and advance argument list | ||
| } else if binary_as_util.ends_with("coreutils") || binary_as_util.ends_with("box") { |
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 don't like to have .ends_with("box") in the binary just for test suite. Should be covered by shebang wrapper (at different PR).
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.
shebang does not work...
572a08f to
a7da462
Compare
657c5e7 to
f7625bd
Compare
|
GNU testsuite comparison: |
This comment was marked as resolved.
This comment was marked as resolved.
this should be fixed before |
Setup $ ln -nsf src/coreutils foo Before $ ./foo; echo $? foo: unknown program ‘foo’ Try './foo --help' for more information. 1 ./foo --version; echo $? coreutils (GNU coreutils) 9.9.172-01993 0 After $ ./foo; echo $? coreutils: unknown program 'foo' 1 $ ./foo --version; echo $? coreutils: unknown program 'foo' 1 * src/coreutils.c (main): Don't process options if we don't know they're intended for the multi-call binary. Otherwise `foo --version` would return true, even though foo was symlinked to the multi-call binary, but not supported. * tests/misc/coreutils.sh: Add test cases. * NEWS: Mention the change in behavior.
This comment was marked as resolved.
This comment was marked as resolved.
|
GNU testsuite comparison: |
|
are you sure? |
|
No. needs investigation |
* tests/misc/coreutils.sh: Be more flexibile by using `command -v` to identify the binary to be executed, rather than linking directly to the built binary.
|
GNU testsuite comparison: |
Fixes #10244
Also covers some (but no all of) use case for symlinking binary to
/bin/false.