git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Hardcoded #!/bin/sh in t5532 causes problems on Solaris

From
Tom G. Christensen <tgc@jupiterrise.com>
Date
Apr 9, 2016, 22:29 UTC
Message-ID
<57098259.1060608@jupiterrise.com>
In-Reply-To
<20160409210429.GB18989@sigill.intra.peff.net>
On 09/04/16 23:04, Jeff King wrote:
> I did some quick grepping around, and I suspect you may run
> into the same thing in other places (e.g., t3404.40 looks
> like a similar case).

There are only a few tests that fail and just t5532.3 seems affected by this issue.

Show 24 quoted lines
> Subject: [PATCH] t5532: use write_script
>
> The recent cleanup in b7cbbff switched t5532's use of
> backticks to $(). This matches our normal shell style, which
> is good. But it also breaks the test on Solaris, where
> /bin/sh does not understand $().
>
> Our normal shell style assumes a modern-ish shell which
> knows about $(). However, some tests create small helper
> scripts and just write "#!/bin/sh" into them. These scripts
> either need to go back to using backticks, or they need to
> respect $SHELL_PATH. The easiest way to do the latter is to
> use write_script.
>
> While we're at it, let's also stick the script creation
> inside a test_expect block (our usual style), and split the
> perl snippet into its own script (to prevent quoting
> madness).
>
> Signed-off-by: Jeff King <peff@peff.net>
> ---
>   t/t5532-fetch-proxy.sh | 21 ++++++++++++---------
>   1 file changed, 12 insertions(+), 9 deletions(-)
>
I applied this to 2.8.1 and as expected the test now passes on Solaris.
-tgc
Previous: Jeff KingNext: Jeff King
Message 3 of 14 in “Hardcoded #!/bin/sh in t5532 causes problems on Solaris”
  1. Tom G. ChristensenApr 9, 2016
  2. Jeff KingApr 9, 2016
  3. Tom G. ChristensenApr 9, 2016
  4. Jeff KingApr 9, 2016
  5. Junio C HamanoApr 10, 2016
  6. Junio C HamanoApr 10, 2016
  7. Eric SunshineApr 10, 2016
  8. Junio C HamanoApr 11, 2016
  9. Jeff KingApr 11, 2016
  10. Jeff KingApr 11, 2016
  11. Junio C HamanoApr 12, 2016
  12. Junio C HamanoApr 12, 2016
  13. Jeff KingApr 12, 2016
  14. Jeff KingApr 12, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.