Re: [PATCH 1/1] t7528: fix failure under csh

"brian m. carlson" <[email protected]> Mon, 3 Aug 2026 02:13:56 +0000
Newsgroups org.kernel.vger.git
Message-ID <[email protected]>
--3ozne4nWJMCq+E81
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On 2026-08-03 at 00:41:03, Kenneth Lorber wrote:
> Explicitly set sh mode for ssh-agent (ssh-agent -s) to prevent
> failure when user's login shell is csh-like.  The failure is
> caused by propagation of the $SHELL value from the user's original
> shell despite the test and test harness explictly using sh, which
> makes ssh-agent emit initialization code for the wrong shell:
>=20
> > cd t
> > echo $SHELL
> /bin/tcsh
> > ./t7528-signed-commit-ssh.sh --verbose --debug
> [...]
> expecting success of 7528.2 'sign commits using literal public keys with =
ssh-agent':
> [...]
> ./t7528-signed-commit-ssh.sh: 1: eval: setenv: not found
> ./t7528-signed-commit-ssh.sh: 1: eval: setenv: not found
> [...]
>=20
> Signed-off-by: Kenneth Lorber <[email protected]>
> ---
>  t/t7528-signed-commit-ssh.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>=20
> diff --git a/t/t7528-signed-commit-ssh.sh b/t/t7528-signed-commit-ssh.sh
> index b50306b9b3..7bf4a40de2 100755
> --- a/t/t7528-signed-commit-ssh.sh
> +++ b/t/t7528-signed-commit-ssh.sh
> @@ -82,7 +82,7 @@ test_expect_success GPGSSH 'create signed commits' '
>  test_expect_success GPGSSH 'sign commits using literal public keys with =
ssh-agent' '
>  	test_when_finished "test_unconfig commit.gpgsign" &&
>  	test_config gpg.format ssh &&
> -	eval $(ssh-agent -T || ssh-agent) &&
> +	eval $(ssh-agent -T -s || ssh-agent -s) &&
>  	test_when_finished "kill ${SSH_AGENT_PID}" &&
>  	test_when_finished "test_unconfig user.signingkey" &&
>  	mkdir tmpdir &&

This seems reasonable.  SHELL is defined by POSIX as "a pathname of the
user's preferred command language interpreter."  When we're running the
testsuite, we don't care what that is and always want a POSIX
sh-compatible output, so using `-s` is the right thing.

I also don't see any other instances of `ssh-agent` in the codebase, so
this looks like the only place we need to fix.
--=20
brian m. carlson (they/them)
Toronto, Ontario, CA

--3ozne4nWJMCq+E81
Content-Type: application/pgp-signature; name=signature.asc

-----BEGIN PGP SIGNATURE-----

wr0EABYKAG8Fgmpv+WMJEHwMSWKIh6KBRxQAAAAAAB4AIHNhbHRAbm90YXRpb25z
LnNlcXVvaWEtcGdwLm9yZ5L1P3IX9PrmAMv70kaZfd5UKE1iVnbJfVsGBygNKpID
FiEECCzmip28ZfuD0cORfAxJYoiHooEAACDlAQCdJV1nXwwb2TOhTblz85MvFRLo
NqkKTkR4BKeK/VMLvQD/VRy6xl8AMWC9Ir6Xg/or/2Skt/CAo2fcleKH9tXqiQ8=
=oAPc
-----END PGP SIGNATURE-----

--3ozne4nWJMCq+E81--