mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2025-09-10 07:59:52 +02:00
tests: avoid side effects of $SHELL environment variable
Since non interactive shells don't generally set $SHELL, its value is propagated through the tests and may cause issues; for example if $SHELL implicitly adjusts $PATH when run. Instead we set $SHELL to that determined by the posix-shell module, and use that consistently for all test sub scripts, including those created thorugh the `split --filter` command. * tests/local.mk: Explicitly set $SHELL to $(PREFERABLY_POSIX_SHELL) which defaults to $CONFIG_SHELL and thus usually /bin/sh. * tests/envvar-check: Remove bash environment variables with side effects, in case /bin/bash was selected for $SHELL. * tests/misc/help-version.sh: Remove redundant initialization of $SHELL. * tests/install/strip-program.sh: Use $SHELL for sub script. * tests/misc/sort-compress-hang.sh: Likewise. * tests/misc/sort-compress-proc.sh: Likewise. * tests/misc/sort-compress.sh: Likewise. * tests/misc/timeout-group.sh: Likewise. * tests/rm/fail-eperm.xpl: Remove redundant elision of bash env vars. * tests/misc/pwd-long.sh: Likewise.
This commit is contained in:
@@ -28,12 +28,14 @@ vars='
|
||||
_STDBUF_E
|
||||
_STDBUF_I
|
||||
_STDBUF_O
|
||||
BASH_ENV
|
||||
BLOCKSIZE
|
||||
BLOCK_SIZE
|
||||
CDPATH
|
||||
COLUMNS
|
||||
DF_BLOCK_SIZE
|
||||
DU_BLOCK_SIZE
|
||||
ENV
|
||||
LANGUAGE
|
||||
LS_BLOCK_SIZE
|
||||
LS_COLORS
|
||||
|
||||
Reference in New Issue
Block a user