Subject: Re: [PATCH 00/12] t: detect errors outside of test cases

From: Junio C Hamano <[email-masked]>
Date: Mon, 13 Apr 2026 14:46:37 -0700

Junio C Hamano <[email-masked]> writes:

> Patrick Steinhardt <[email-masked]> writes:
>
>> this is a follow-up to the recent discussion we had around `set -e` to
>> make our tests more robust and basically supersedes Junio's [1].
>>
>> I've tested the patches with both Bash and Dash, and all tests are
>> passing on my machine with both of them. CI seems to be happy, as
>> well. But I would expect that this change probably has some fallout,
>> even though I hope that it's generally going to be small and contained.
>>
>> This series is based on 8c9303b1ff (Merge branch
>> 'jc/no-writev-does-not-work', 2026-04-10).
>
> This unfortunately breaks svn related tests big time for me, as I
> deliberately do not install Perl modules that are needed for git-svn.
>
>
>     $ cd t && sh t9152-svn-empty-dirs-after-gc.sh -i -v
>     Initialized empty Git repository in /home/gitster/git/t/trash directory.t9152-svn-empty-dirs-after-gc/.git/
>     Can't locate SVN/Core.pm in @INC (you may need to install the SVN::Core module) (@INC entries checked: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.40.1 /usr/local/share/perl/5.40.1 /usr/lib/x86_64-linux-gnu/perl5/5.40 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl-base /usr/lib/x86_64-linux-gnu/perl/5.40 /usr/share/perl/5.40 /usr/local/lib/site_perl) at -e line 2.
>     BEGIN failed--compilation aborted at -e line 2.
>     FATAL: Unexpected exit with code 2

With the merge of this topic reverted out of 'seen', here is how it
used to end:

    $ cd t && sh t9152-svn-empty-dirs-after-gc.sh -i -v; echo $?
    Initialized empty Git repository in /home/gitster/git/t/trash directory.t9152-svn-empty-dirs-after-gc/.git/
    Can't locate SVN/Core.pm in @INC (you may need to install the SVN::Core module) (@INC entries checked: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.40.1 /usr/local/share/perl/5.40.1 /usr/lib/x86_64-linux-gnu/perl5/5.40 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl-base /usr/lib/x86_64-linux-gnu/perl/5.40 /usr/share/perl/5.40 /usr/local/lib/site_perl) at -e line 2.
    BEGIN failed--compilation aborted at -e line 2.
    1..0 # SKIP Perl SVN libraries not found or unusable
    0

The largest difference being that we used to exit with 0 so the
overall "make test" passed, but it no longer is the case.