tests/misc/coreutils.sh: Fail with invalid binary name#10258
tests/misc/coreutils.sh: Fail with invalid binary name#10258sylvestre merged 1 commit intouutils:mainfrom
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.
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.
shebang does not work...
572a08f to
a7da462
Compare
657c5e7 to
f7625bd
Compare
9dbb3a0 to
dd70a52
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? |
This comment was marked as resolved.
This comment was marked as resolved.
* 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: |
5cf5534 to
e265fa7
Compare
This comment was marked as resolved.
This comment was marked as resolved.
|
GNU testsuite comparison: |
|
GNU testsuite comparison: |
Fixes #10244
Also covers some (but no all of) use case for symlinking binary to
/bin/false.