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

Re: [PATCH] perf: fix test_export with SHELL=zsh

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Oct 2, 2021, 21:02 UTC
Message-ID
<YVjI3AgD7SK4zxy+@camp.crustytoothpaste.net>
In-Reply-To
<8b70d04f-0ad1-6e68-f5a2-2d8ec3bb98ea@web.de>
On 2021-10-02 at 09:40:02, René Scharfe wrote:
Show 6 quoted lines
> Unlike other shells, zsh doesn't do word-splitting on variables.  This
> is documented in https://zsh.sourceforge.io/FAQ/zshfaq03.html#31.  That
> breaks the perf function test_export because it uses a space-separated
> variable as a poor man's array, and as a consequence p0000 fails with
> "not ok 3 - test_export works".  Pass the value through an unquoted
> command substitution to force word-splitting even in zsh.

There are a variety of places in our testsuite where zsh is broken in zsh mode. I recently sent a patch to make it do the right thing for subshells in sh mode which has not yet been released, and as far as I'm aware, with that patch, our testsuite is fully functional with zsh when it's run in sh mode.

Note that in sh mode, zsh enables the SH_WORD_SPLIT option, and this should work just fine. The easiest way to do that is to create a symlink to zsh called "sh" and invoke that.

-- 
brian m. carlson (he/him or they/them)
Toronto, Ontario, CA
Previous: Jeff King
Message 7 of 7 in “perf: fix test_export with SHELL=zsh”
  1. perf: fix test_export with SHELL=zshRené Scharfe, Oct 2, 2021
  2. Johannes AltmanningerOct 2, 2021
  3. t/perf: do not run tests in user's $SHELLJohannes Altmanninger, Oct 7, 2021
  4. Jeff KingOct 8, 2021
  5. Johannes AltmanningerOct 8, 2021
  6. Jeff KingOct 8, 2021
  7. brian m. carlsonOct 2, 2021

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.