Re: [PATCH v2] Fix false positives in t3404 due to SHELL=/bin/false
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Dec 28, 2010, 19:58 UTC
- Message-ID
- <7vmxnpwtyn.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <20101227080343.GA15026@orbis-terrarum.net>
"Robin H. Johnson" <robbat2@gentoo.org> writes:
> If the user's shell in NSS passwd is /bin/false (eg as found during Gentoo's > package building), the git-rebase exec tests will fail, because they call > $SHELL around the command, and in the existing testcase, $SHELL was not being > cleared sufficently.
Show 16 quoted lines
> --- > t/t3404-rebase-interactive.sh | 3 ++- > 1 files changed, 2 insertions(+), 1 deletions(-) > > diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh > index d3a3bd2..7d8147b 100755 > --- a/t/t3404-rebase-interactive.sh > +++ b/t/t3404-rebase-interactive.sh > @@ -71,8 +71,9 @@ test_expect_success 'setup' ' > # "exec" commands are ran with the user shell by default, but this may > # be non-POSIX. For example, if SHELL=zsh then ">file" doesn't work > # to create a file. Unseting SHELL avoids such non-portable behavior > -# in tests. > +# in tests. It must be exported for it to take effect where needed. > SHELL= > +export SHELL
Thanks; will queue this version to 'maint'.
I have this nagging suspicion that we may want to revisit this to assign $SHELL_PATH to it before exporting, and that this might be better done in t/test-lib.sh at the beginning. Note that unlike my earlier "your v1 might be less portable than desired", these two points are only speculations and RFCs.