[PATCH][Ping] Fix check for whitespace in $PATH or $HOME (in test script regress/ssh-tty.sh)
Jens Rosenboom
Jens.Rosenboom at web.de
Thu Nov 19 01:30:33 AEDT 2026
Hello maintainers,
Currently (at least under Linux with bash) the regression tests in
ssh-tty.sh are not executed when the GIT repo path or $HOME of the user
contain a 't'.
(For most, this is probably already true, just because they checked-out
to "/home/user/openssh-portable" .)
The issue is the \t here:
> case "${PATH}${HOME}" in
> *\ *|*\t*) skip "...";;
It does not work as expected.
This change was suggested by an LLM (as being POSIX compliant) and works
fine for me (tested under Fedora 45 and Ubuntu 26.04.1 LTS):
> case "${PATH}${HOME}" in
> *[[:space:]]*) skip "...";;
Would be great if you could consider below small patch for this one.
Best,
Jens
Am 24.09.26 um 16:24 schrieb Jens Rosenboom via openssh-unix-dev:
> This fixes the test for whitespace in $PATH or $HOME in regress/ssh-tty.sh.
> *\t* seems to test for character 't', not for tab. In my case the check
> was always true and the tests were always skipped.
> [[:space:]] should do better and (according to chatgpt and claude) is
> defined by POSIX.
>
> ---
> regress/ssh-tty.sh | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/regress/ssh-tty.sh b/regress/ssh-tty.sh
> index 07053d13b..fcfa27e44 100644
> --- a/regress/ssh-tty.sh
> +++ b/regress/ssh-tty.sh
> @@ -10,8 +10,11 @@ FAKEHOME="$OBJ/.fakehome"
> rm -rf "$FAKEHOME"
> mkdir -m 0700 -p "$FAKEHOME"
>
> -case "${PATH}${HOME}" in
> -*\ *|*\t*) skip "\$PATH or \$HOME has whitespace, not supported in this
> test";;
> +case "${PATH}" in
> +*[[:space:]]*) skip "\$PATH ($PATH) has whitespace, not supported in
> this test";;
> +esac
> +case "${HOME}" in
> +*[[:space:]]*) skip "\$HOME ($HOME) has whitespace, not supported in
> this test";;
> esac
>
> # tmux stuff
More information about the openssh-unix-dev
mailing list