]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: env --argv0: fix false failure with symlinked single binary
authorPádraig Brady <P@draigBrady.com>
Wed, 12 Nov 2025 13:25:26 +0000 (13:25 +0000)
committerPádraig Brady <P@draigBrady.com>
Wed, 12 Nov 2025 13:47:55 +0000 (13:47 +0000)
* tests/env/env.sh: Always pass --coreutils-prog=true so that the
program to run can be determined with --enable-single-binary=symlinks.
Also actually verify the expected verbose output.
Reported by the Alpine Linux project.

tests/env/env.sh

index c838a49a271649b482ce0065cc8fae8adac5e42d..a76b4013283588dc1bb4c4caea7e7ac517065ed4 100755 (executable)
@@ -165,12 +165,14 @@ test "$exp" = "$got" || fail=1
 
 # Verify argv0 overriding
 for arg in 'argv0' ''; do
-env -v -a short --argv0=$arg true 2>err || fail=1
+env -v -a short --argv0=$arg true --coreutils-prog=true 2>err || fail=1
 cat <<EOF >err_exp || framework_failure_
 argv0:     '$arg'
 executing: true
    arg[0]= '$arg'
+   arg[1]= '--coreutils-prog=true'
 EOF
+compare err_exp err || fail=1
 done
 
 Exit $fail