From: "SZEDER Gábor" <szeder.dev@gmail.com>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org, Denton Liu <liu.denton@gmail.com>
Subject: Re: [PATCH 2/2] test-lib-functions: use BUG() in 'test_must_fail'
Date: Tue, 14 Apr 2026 22:52:33 +0200 [thread overview]
Message-ID: <ad6pEbnSKzUOkS2k@szeder.dev> (raw)
In-Reply-To: <YDLXf+OoJabrJTWu@coredump.intra.peff.net>
On Sun, Feb 21, 2021 at 04:58:23PM -0500, Jeff King wrote:
> On Sun, Feb 21, 2021 at 08:25:12PM +0100, SZEDER Gábor wrote:
>
> > In many test helper functions we verify that they were invoked with
> > sensible parameters, and call BUG() to abort the test script when the
> > parameters are buggy. 6a67c75948 (test-lib-functions: restrict
> > test_must_fail usage, 2020-07-07) added such a parameter verification
> > to 'test_must_fail', but it didn't report the error with BUG(), like
> > we usually do.
>
> OK. I do not care all that much between BUG() and not-BUG here, since we
> are unlikely to have a test where test_must_fail returning 0 yields
> success. I guess the most interesting outcome is that we would notice a
> bug in a test_expect_failure block.
If I had managed to send a new version of this patch series in the
last 5 years :), then this would have caught the issue noted in:
https://public-inbox.org/git/ad6hovxCkwMTG11U@szeder.dev/
next parent reply other threads:[~2026-04-14 20:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20210221192512.3096291-1-szeder.dev@gmail.com>
[not found] ` <20210221192512.3096291-2-szeder.dev@gmail.com>
[not found] ` <YDLXf+OoJabrJTWu@coredump.intra.peff.net>
2026-04-14 20:52 ` SZEDER Gábor [this message]
2026-04-14 21:11 ` [PATCH 2/2] test-lib-functions: use BUG() in 'test_must_fail' Junio C Hamano
2026-04-14 22:18 ` Jeff King
2026-04-15 15:25 ` Junio C Hamano
2026-04-14 22:14 ` Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ad6pEbnSKzUOkS2k@szeder.dev \
--to=szeder.dev@gmail.com \
--cc=git@vger.kernel.org \
--cc=liu.denton@gmail.com \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox