Re: [PATCH 1/2] t/test-lib.sh: support Korn shell by converting GIT_EXIT_OK to GIT_EXIT_CODE
- From
Ben Walton <bwalton@artsci.utoronto.ca>
- Date
- Oct 10, 2009, 12:53 UTC
- Message-ID
- <1255178966-sup-5813@ntdws12.chass.utoronto.ca>
- In-Reply-To
- <m2eipbphbr.fsf@igel.home>
Excerpts from Andreas Schwab's message of Sat Oct 10 08:24:40 -0400 2009:
> According to the autoconf docs this bug is also present in the Solaris > /bin/sh (and autoconf generated scripts use some elaborated workaround).
Solaris' /bin/sh shouldn't be used for anything but forking a decent shell, imo. It was brought to my attention recently that the test suite for mercurial on solaris was failing the git tests. The mercurial folks initially thought this was a git on solaris bug.
After looking into it, I discovered that ^ is still treated[1] as a pipe symbol[2] in some cases. So, test suite programs run under /bin/sh on solaris with commands like `git reset --hard HEAD^` were misbehaving due to the shell setting up a pipeline under the right circumstances.
-Ben
[1] http://cvs.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/cmd/sh/cmd.c
line 184[2] This dates back to the Thomson shell:
http://en.wikipedia.org/wiki/Thompson_shell-- Ben Walton Systems Programmer - CHASS University of Toronto C:416.407.5610 | W:416.978.4302 GPG Key Id: 8E89F6D2; Key Server: pgp.mit.edu Contact me to arrange for a CAcert assurance meeting.