[PATCH 0/2] zsh testsuite fixes
- From
brian m. carlson <sandals@crustytoothpaste.net>
- Date
- Nov 28, 2025, 01:21 UTC
- Message-ID
- <20251128012107.101431-1-sandals@crustytoothpaste.net>
This series contains two small patches to make our testsuite pass under zsh's sh mode with 5.9. This is the mode that is in use when zsh is invoked as `sh` and differs from zsh's default behavior.
Note that no attempt has been made to make the testsuite work under zsh's default or ksh modes, since it is known that many tests will fail in this case (in part, because outside of sh mode, zsh runs the final process in a pipeline in the main shell instead of a subshell).
The first patch fixes a compatibility issue in which we've accidentally requested behavior from POSIX 1003.1-2024, which is too new to be portably supported. It just so happens that most shells happen to support it anyway, but zsh does not at the moment.
The second patch fixes a more mysterious issue with the testsuite hanging. It's unclear why it does so, but it almost certainly has to do with the internals of the testsuite since creating a simple testcase does not reproduce the problem. However, the patch is simple and easy (simply change to a subshell), so we do so.
With these two patches, the testsuite passes in zsh's sh mode. This should offer users whose `/bin/sh` is AT&T ksh93 (which does not support `local` and therefore does not work as our shell) an additional choice of shells to use for portability.
brian m. carlson (2): t0614: use numerical comparison with test_line_count t5564: fix test hang under zsh's sh mode
t/t0614-reftable-fsck.sh | 2 +- t/t5564-http-proxy.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)