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

Re: [PATCH] t/test-lib.sh: do not trust $SHELL

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 21, 2012, 21:59 UTC
Message-ID
<7vlig33umv.fsf@alter.siamese.dyndns.org>
In-Reply-To
<CALkWK0nLLEF7wnUhF0JUAZVP6GG3KHmuYSDZLPS7uGCZPfhV3w@mail.gmail.com>
Ramkumar Ramachandra <artagnon@gmail.com> writes:
Show 17 quoted lines
> Hi Peff,
>
> Jeff King wrote:
>> On Sat, Sep 22, 2012 at 02:37:38AM +0530, Ramkumar Ramachandra wrote:
>>
>>> > I don't think that is the right thing to do. The point of SHELL is to
>>> > point at a bourne-compatible shell. On some systems, the main reason to
>>> > set it is that /bin/sh is _broken_, and we are trying to avoid it.
>>>
>>> But you're only avoiding it in the --tee/ --va* codepath.  In the
>>> normal codepath, you're stuck with /bin/sh anyway.
>>
>> No, the #!-header is only information. When you run "make test" we
>> actually invoke the shell ourselves using $SHELL_PATH.
>
> My SHELL_PATH is not set, and I can see SHELL_PATH ?= $(SHELL) in the
> Makefile.  Which shell is it supposed to point to?

SHELL_PATH is always supposed to point to a Bourne that can be used to run POSIXy shell scripts. I think the fallback you pointed out above assumes that the majority of people who type "make" use Bourne compatibles as their $SHELL and the default is to help the majority.

It may not hurt to add a note to INSTALL for people who use $SHELL that is not Bourne (csh and zsh users, but there may be others) that they need to set SHELL_PATH, of course.

Previous: Ramkumar RamachandraNext: Jeff King
Message 34 of 37 in “How do I run tests under Valgrind?”
  1. Ramkumar RamachandraSep 17, 2012
  2. Jeff KingSep 17, 2012
  3. Ramkumar RamachandraSep 17, 2012
  4. Jeff KingSep 17, 2012
  5. Ramkumar RamachandraSep 17, 2012
  6. Jeff KingSep 17, 2012
  7. Johannes SixtSep 17, 2012
  8. Jeff KingSep 17, 2012
  9. Ramkumar RamachandraSep 17, 2012
  10. Jeff KingSep 17, 2012
  11. Ramkumar RamachandraSep 21, 2012
  12. Ramkumar RamachandraSep 21, 2012
  13. Stefano LattariniSep 21, 2012
  14. Ramkumar RamachandraSep 21, 2012
  15. Ramkumar RamachandraSep 21, 2012
  16. Jeff KingSep 21, 2012
  17. Stefano LattariniSep 22, 2012
  18. Jeff KingSep 22, 2012
  19. Stefano LattariniSep 22, 2012
  20. Junio C HamanoSep 22, 2012
  21. t/test-lib.sh: do not trust $SHELLRamkumar Ramachandra, Sep 21, 2012
  22. Jeff KingSep 21, 2012
  23. Ramkumar RamachandraSep 21, 2012
  24. Jeff KingSep 21, 2012
  25. Ramkumar RamachandraSep 21, 2012
  26. Andreas SchwabSep 21, 2012
  27. Junio C HamanoSep 21, 2012
  28. Ramkumar RamachandraSep 22, 2012
  29. Junio C HamanoSep 22, 2012
  30. Ramkumar RamachandraSep 22, 2012
  31. Ramkumar RamachandraSep 22, 2012
  32. Junio C HamanoSep 22, 2012
  33. Ramkumar RamachandraSep 26, 2012
  34. Junio C HamanoSep 21, 2012
  35. Jeff KingSep 21, 2012
  36. Andreas SchwabSep 21, 2012
  37. Jeff KingSep 21, 2012

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.