Re: [PATCH v5 00/12] t: detect errors outside of test cases
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Apr 21, 2026, 05:41 UTC
- Message-ID
- <aecN9A3WFIU2aBpW@pks.im>
- In-Reply-To
- <20260421030045.GA1870557@coredump.intra.peff.net>
On Mon, Apr 20, 2026 at 11:00:45PM -0400, Jeff King wrote:
Show 28 quoted lines
> On Mon, Apr 20, 2026 at 09:19:12AM -0700, Junio C Hamano wrote: > > > Patrick Steinhardt <ps@pks.im> writes: > > > > > I've created an MR with GitLab [2] and a PR with GitHub [3] to verify > > > that these changes work on both platforms. > > > > > > Changes in v5: > > > - Allow opting in via `GIT_TEST_USE_SET_E=yes` and enable this option > > > for Linux CI jobs. > > > - Another fix for a potentially-failing command. > > > - Link to v4: https://patch.msgid.link/20260417-b4-pks-tests-with-set-e-v4-0-44d43efdafb1@pks.im > > > > I agree that the explicit GIT_TEST_USE_SET_E option is a good way to > > go, as it would be clear which ones are (and which ones are not) > > using it. I am not sure why we have check_fsck() thing? Wasn't it > > determined that this would fail only with a broken shells, or is it > > futureproofing just in case the function is used without being > > tested? > > Yes, I think it would only fail on a broken shell. It's not _wrong_ to > protect against it, but it's the tip of the iceberg. There are many > other spots that rely on "set -e" being suppressed inside test snippets, > not the least of which is every single final command in each snippet > (because it's at the end of the &&-chain). > > So I think it is better to draw the line at things that actually trigger > with working shells.
Okay, that's fair enough. Let me drop that part again and then send out another (hopefully final) version. Thanks!
Patrick