public inbox for git@vger.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] test-lib: catch misspelt 'test_expect_successo'
Date: Tue, 24 Mar 2026 12:48:24 -0700	[thread overview]
Message-ID: <xmqqy0jhxb3r.fsf@gitster.g> (raw)
In-Reply-To: <20260324193514.GA1870130@coredump.intra.peff.net> (Jeff King's message of "Tue, 24 Mar 2026 15:35:14 -0400")

Jeff King <peff@peff.net> writes:

> On Tue, Mar 24, 2026 at 11:13:26AM -0700, Junio C Hamano wrote:
>
>> In order to catch mistakes like misspelling "test_expect_success",
>> we would like to eventually be able to run our test suite with the
>> "-e" option on.
>
> Using "-e" makes me very nervous, given all of its quirks. Granted, most
> of them are related to it _not_ kicking in when you'd want it to, but I
> worry it will create false positive/negative headaches.

After looking at a few scripts, I am not suffering from such
headaches yet; it does not look too bad.  I'll stop this effort for
now, but with a handful of patches I already sent, more than 80-90%
of the entire test scripts that I run are now "set -e" clean, I
think.  Note that I do not run svn, cvs, or p4 tests ;-)

> In the past I've caught errors outside of the test snippet by noticing
> cruft on stderr. This is especially obvious if you use "prove", which
> captures stdout and gives a nice display (which the extra stderr then
> makes uglier).
> I wonder if we could automate / formalize that.

That's a thought.

  reply	other threads:[~2026-03-24 19:48 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-24 14:52 [PATCH] t4014: fix call to `test_expect_success ()` Patrick Steinhardt
2026-03-24 15:18 ` Mirko Faina
2026-03-24 15:38   ` Junio C Hamano
2026-03-24 15:48     ` Mirko Faina
2026-03-24 16:39       ` Junio C Hamano
2026-03-24 17:13         ` Re* " Junio C Hamano
2026-03-24 18:05           ` [PATCH] t6002: make test "set -e" clean Junio C Hamano
2026-03-24 18:13           ` [PATCH] test-lib: catch misspelt 'test_expect_successo' Junio C Hamano
2026-03-24 19:35             ` Jeff King
2026-03-24 19:48               ` Junio C Hamano [this message]
2026-03-25  5:46                 ` Jeff King
2026-03-24 18:20           ` [PATCH] t0008: make test "set -e" clean Junio C Hamano
2026-03-24 18:32           ` [PATCH] t7450: " Junio C Hamano
2026-03-24 18:38             ` Eric Sunshine
2026-03-24 19:03               ` Junio C Hamano
2026-03-25  7:07           ` Re* [PATCH] t4014: fix call to `test_expect_success ()` Patrick Steinhardt

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=xmqqy0jhxb3r.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --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