From: Jeff King Date: Sun, 19 Apr 2026 02:10:27 GMT Subject: Re: [PATCH v4 12/12] t: detect errors outside of test cases Message-ID: <20260419021027.GA1079904@coredump.intra.peff.net> In-Reply-To: On Sat, Apr 18, 2026 at 09:54:58PM +0000, brian m. carlson wrote: > > So we are inside a conditional, and the usual global "set -e" > > suppression should happen. It sounds like it is not happening in your > > version of mksh, but I was unable to get t1410 to fail at all using mksh > > 59c-43 (from Debian unstable) or 59c-41 (from stable). > > It does fail with 59c-43 under `make prove` or if you do `sh ./t1410*.sh > --verbose`, assuming that `sh` points to `mksh`, but since the script > has a `/bin/sh` shebang, you need to invoke it explicitly with the shell > in question, or it will use the system `sh` (dash). (I made this > mistake when reproducing the problem.) Doh. The problem was none of that, but that I was using Patrick's version of the patch that only turns on "set -e" for bash. So yeah, after actually enabling "set -e" I do see the failure. > It does seem like this _is_ a bug in mksh, though, which I've reproduced > with a test script, so I'll report it there. I looked up your report in Debian's system. I think you're right that the eval is the problem. The smallest reproduction I came up with is: $ dash -ec 'eval "false; true" && echo ok' ok $ mksh -ec 'eval "false; true" && echo ok' [no output] So it respects "-e" within the eval, which is wrong, and then doubly weird that "-e" bails from the eval but not the whole script. -Peff