◐ Shell
clean mode source ↗

tests/misc/coreutils.sh: Fail with invalid binary name by oech3 · Pull Request #10258 · uutils/coreutils

@oech3 marked this pull request as draft

January 15, 2026 08:31

@oech3 oech3 mentioned this pull request

Jan 15, 2026

@oech3 oech3 marked this pull request as ready for review

January 15, 2026 10:43

oech3

@oech3 oech3 changed the title coreutils: Fail with invalid binary name tests/misc/coreutils.sh: Fail with invalid binary name

Jan 15, 2026

sylvestre

oech3 referenced this pull request in coreutils/coreutils

Jan 18, 2026
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.

@oech3 oech3 marked this pull request as draft

January 18, 2026 11:57

@oech3 oech3 marked this pull request as ready for review

January 18, 2026 14:16

@oech3 oech3 marked this pull request as draft

January 18, 2026 15:46

oech3 referenced this pull request in coreutils/coreutils

Jan 18, 2026
* 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.

@oech3 oech3 mentioned this pull request

Jan 18, 2026

@oech3 oech3 marked this pull request as ready for review

January 19, 2026 04:10

@oech3

@oech3 oech3 mentioned this pull request

Feb 4, 2026