From: Jeff King <peff@peff.net>
To: Ben Walton <bwalton@artsci.utoronto.ca>
Cc: git@vger.kernel.org, gitster@pobox.com
Subject: Re: [PATCH] t0300-credentials: Word around a solaris /bin/sh bug
Date: Thu, 2 Feb 2012 15:02:40 -0500 [thread overview]
Message-ID: <20120202200240.GC9246@sigill.intra.peff.net> (raw)
In-Reply-To: <1328211135-25217-1-git-send-email-bwalton@artsci.utoronto.ca>
On Thu, Feb 02, 2012 at 02:32:15PM -0500, Ben Walton wrote:
> Solaris' /bin/sh was making the IFS setting permanent instead of
> temporary when using it to slurp in credentials in the generated
> 'dump' script of the 'setup helper scripts' test in t0300-credentials.
Hmm. Presumably you are setting SHELL_PATH, as Solaris /bin/sh would be
useless for running the rest of the tests. Usually scripts inside the
tests use #!$SHELL_PATH, but I often don't bother if it's a simple "even
Solaris /bin/sh could run this" script. But in this case I either
underestimated the complexity of my script or overestimated the quality
of the Solaris /bin/sh.
I wonder if a better solution is to use a known-good shell instead of
trying to work around problems in a bogus shell. Does the patch below
fix it for you?
diff --git a/t/t0300-credentials.sh b/t/t0300-credentials.sh
index 885af8f..edf6547 100755
--- a/t/t0300-credentials.sh
+++ b/t/t0300-credentials.sh
@@ -14,15 +14,15 @@ test_expect_success 'setup helper scripts' '
done
EOF
- cat >git-credential-useless <<-\EOF &&
- #!/bin/sh
+ cat >git-credential-useless <<-EOF &&
+ #!$SHELL_PATH
. ./dump
exit 0
EOF
chmod +x git-credential-useless &&
- cat >git-credential-verbatim <<-\EOF &&
- #!/bin/sh
+ echo "#!$SHELL_PATH" >git-credential-verbatim &&
+ cat >>git-credential-verbatim <<-\EOF &&
user=$1; shift
pass=$1; shift
. ./dump
next prev parent reply other threads:[~2012-02-02 20:02 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-02 19:32 [PATCH] t0300-credentials: Word around a solaris /bin/sh bug Ben Walton
2012-02-02 19:44 ` Frans Klaver
2012-02-02 19:48 ` Ben Walton
2012-02-02 20:02 ` Jeff King [this message]
2012-02-03 1:02 ` Junio C Hamano
2012-02-03 12:06 ` Jeff King
2012-02-03 13:45 ` Ben Walton
2012-02-03 20:32 ` Junio C Hamano
2012-02-03 21:26 ` Jeff King
2012-02-03 21:50 ` Junio C Hamano
2012-02-03 21:55 ` Jeff King
2012-02-03 22:00 ` Ben Walton
2012-02-03 22:45 ` Junio C Hamano
2012-02-03 23:27 ` Jeff King
2012-02-04 6:27 ` Jeff King
2012-02-04 6:29 ` [PATCH 1/2] tests: add write_script helper function Jeff King
2012-02-04 6:30 ` [PATCH 2/2] t0300: use write_script helper Jeff King
2012-02-04 6:58 ` Junio C Hamano
2012-02-04 7:00 ` Jeff King
2012-02-02 20:16 ` [PATCH] t0300-credentials: Word around a solaris /bin/sh bug Jonathan Nieder
2012-02-02 20:43 ` Matthieu Moy
2012-02-02 21:11 ` Jonathan Nieder
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120202200240.GC9246@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=bwalton@artsci.utoronto.ca \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).