Thread (7 messages) 7 messages, 4 authors, 2021-10-08

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

From: brian m. carlson <hidden>
Date: 2021-10-02 21:03:30

On 2021-10-02 at 09:40:02, René Scharfe wrote:
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

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help