From: Patrick Steinhardt <ps@pks.im>
To: Junio C Hamano <gitster@pobox.com>
Cc: Eli Schwartz <eschwartz@gentoo.org>,
Ramsay Jones <ramsay@ramsayjones.plus.com>,
git@vger.kernel.org
Subject: Re: [PATCH 0/4] meson: parse TAP output generated by our tests
Date: Wed, 28 May 2025 14:27:04 +0200 [thread overview]
Message-ID: <aDcBGIW2dxWxZ2l4@pks.im> (raw)
In-Reply-To: <xmqq34cqqbtk.fsf@gitster.g>
On Tue, May 27, 2025 at 09:04:55AM -0700, Junio C Hamano wrote:
> Patrick Steinhardt <ps@pks.im> writes:
>
> >> > I don't think it's inherently a bad thing to fail on unexpected passes.
> >> > After all, it shows that our assumption that the test fails is broken,
> >> > and that we should have a look why that is. But I can see arguments both
> >> > ways.
> >>
> >> As Phillip noted, treating them as ordinary passes undermines the reason
> >> for having them.
> >
> > Yup, and I tend to agree.
>
> OK. So perhaps Make-driven CI jobs also follow suit? In the same
> run that osx-meson job failed, osx-gcc job notices a passed TODO and
> happily declares "All tests successful.".
>
> https://github.com/git/git/actions/runs/15221271947/job/42817168362#step:4:1933
prove itself doesn't treat unexpected passes as errors, and I couldn't
find an option to adapt it. We can do something like the below patch,
which makes us fail in case there are any fixed tests. The only downside
is that prove will report test failures like this:
t1400-update-ref.sh ................................ Dubious, test returned 1 (wstat 256, 0x100)
All 299 subtests passed
(1 TODO test unexpectedly succeeded)
It's not great because prove reports it as dubious. But it isn't all
that bad either because we directly mention the unexpected success for
one of the tests.
Patrick
diff --git a/t/t0000-basic.sh b/t/t0000-basic.sh
index 16b785f3b91..2b63e1c86ca 100755
--- a/t/t0000-basic.sh
+++ b/t/t0000-basic.sh
@@ -130,7 +130,7 @@ test_expect_success 'subtest: a failing TODO test' '
'
test_expect_success 'subtest: a passing TODO test' '
- write_and_run_sub_test_lib_test passing-todo <<-\EOF &&
+ write_and_run_sub_test_lib_test_err passing-todo <<-\EOF &&
test_expect_failure "pretend we have fixed a known breakage" "true"
test_done
EOF
@@ -142,7 +142,7 @@ test_expect_success 'subtest: a passing TODO test' '
'
test_expect_success 'subtest: 2 TODO tests, one passin' '
- write_and_run_sub_test_lib_test partially-passing-todos <<-\EOF &&
+ write_and_run_sub_test_lib_test_err partially-passing-todos <<-\EOF &&
test_expect_failure "pretend we have a known breakage" "false"
test_expect_success "pretend we have a passing test" "true"
test_expect_failure "pretend we have fixed another known breakage" "true"
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 0a124ffad38..5352209d3e4 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -1272,7 +1272,14 @@ test_done () {
check_test_results_san_file_ "$test_failure"
- if test -z "$skip_all" && test -n "$invert_exit_code"
+ if test "$test_fixed" != 0
+ then
+ if test -z "$invert_exit_code"
+ then
+ GIT_EXIT_OK=t
+ exit 1
+ fi
+ elif test -z "$skip_all" && test -n "$invert_exit_code"
then
say_color warn "# faking up non-zero exit with --invert-exit-code"
GIT_EXIT_OK=t
next prev parent reply other threads:[~2025-05-28 12:27 UTC|newest]
Thread overview: 79+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-06 10:59 [PATCH 0/4] meson: parse TAP output generated by our tests Patrick Steinhardt
2025-05-06 10:59 ` [PATCH 1/4] t: fix cases where output breaks TAP format Patrick Steinhardt
2025-05-06 13:17 ` Phillip Wood
2025-05-07 6:52 ` Patrick Steinhardt
2025-05-07 10:12 ` Phillip Wood
2025-05-14 18:51 ` Karthik Nayak
2025-05-06 10:59 ` [PATCH 2/4] t/test-lib: don't print shell traces to stdout Patrick Steinhardt
2025-05-06 10:59 ` [PATCH 3/4] meson: introduce kwargs variable for tests Patrick Steinhardt
2025-05-15 7:39 ` Karthik Nayak
2025-05-06 10:59 ` [PATCH 4/4] meson: parse TAP output generated by our tests Patrick Steinhardt
2025-05-15 7:48 ` Karthik Nayak
2025-05-15 8:20 ` Patrick Steinhardt
2025-05-15 11:35 ` Karthik Nayak
2025-05-06 12:29 ` [PATCH 0/4] " Patrick Steinhardt
2025-05-07 7:06 ` Patrick Steinhardt
2025-05-21 10:57 ` Patrick Steinhardt
2025-05-21 11:56 ` Hridoy Ahmed
2025-05-21 16:06 ` Junio C Hamano
2025-05-21 21:26 ` Junio C Hamano
2025-05-23 10:03 ` Patrick Steinhardt
2025-05-23 15:00 ` Patrick Steinhardt
2025-05-23 15:58 ` Junio C Hamano
2025-05-23 16:40 ` Ramsay Jones
2025-05-23 16:53 ` Ramsay Jones
2025-05-23 19:33 ` Junio C Hamano
2025-05-26 12:44 ` Patrick Steinhardt
2025-05-26 13:31 ` Phillip Wood
2025-05-26 14:23 ` Todd Zullinger
2025-05-26 13:54 ` Eli Schwartz
2025-05-26 13:59 ` Patrick Steinhardt
2025-05-27 16:04 ` Junio C Hamano
2025-05-28 12:27 ` Patrick Steinhardt [this message]
2025-05-27 13:36 ` Junio C Hamano
2025-05-27 14:02 ` [PATCH v2 0/6] " Patrick Steinhardt
2025-05-27 14:02 ` [PATCH v2 1/6] t: fix cases where output breaks TAP format Patrick Steinhardt
2025-05-27 19:47 ` Eric Sunshine
2025-05-28 15:55 ` Patrick Steinhardt
2025-05-28 20:14 ` Eric Sunshine
2025-05-30 7:50 ` Patrick Steinhardt
2025-05-27 14:02 ` [PATCH v2 2/6] t/test-lib: don't print shell traces to stdout Patrick Steinhardt
2025-05-27 19:47 ` Junio C Hamano
2025-05-28 15:55 ` Patrick Steinhardt
2025-05-27 14:02 ` [PATCH v2 3/6] t/test-lib: fix TAP format for BASH_XTRACEFD warning Patrick Steinhardt
2025-05-27 14:02 ` [PATCH v2 4/6] t7815: fix unexpectedly passing test on macOS Patrick Steinhardt
2025-05-27 14:02 ` [PATCH v2 5/6] meson: introduce kwargs variable for tests Patrick Steinhardt
2025-05-27 14:02 ` [PATCH v2 6/6] meson: parse TAP output generated by our tests Patrick Steinhardt
2025-05-30 13:31 ` [PATCH v3 00/10] " Patrick Steinhardt
2025-05-30 13:31 ` [PATCH v3 01/10] t: stop announcing prereqs Patrick Steinhardt
2025-05-31 21:00 ` Karthik Nayak
2025-05-30 13:31 ` [PATCH v3 02/10] t: silence output from `test_create_repo()` Patrick Steinhardt
2025-05-30 21:16 ` Eric Sunshine
2025-05-30 13:31 ` [PATCH v3 03/10] t9822: use prereq to check for ISO-8859-1 support Patrick Steinhardt
2025-05-30 13:31 ` [PATCH v3 04/10] t983*: use prereq to check for Python-specific git-b4(1) support Patrick Steinhardt
2025-05-30 14:08 ` Todd Zullinger
2025-05-30 14:21 ` Patrick Steinhardt
2025-05-30 13:31 ` [PATCH v3 05/10] t/test-lib: don't print shell traces to stdout Patrick Steinhardt
2025-05-31 21:21 ` Karthik Nayak
2025-05-30 13:31 ` [PATCH v3 06/10] t/test-lib: fix TAP format for BASH_XTRACEFD warning Patrick Steinhardt
2025-05-31 21:25 ` Karthik Nayak
2025-05-30 13:31 ` [PATCH v3 07/10] t7815: fix unexpectedly passing test on macOS Patrick Steinhardt
2025-05-31 21:28 ` Karthik Nayak
2025-06-01 9:19 ` Kristoffer Haugsbakk
2025-06-02 6:19 ` Patrick Steinhardt
2025-05-30 13:31 ` [PATCH v3 08/10] test-lib: fail on unexpectedly passing tests Patrick Steinhardt
2025-05-30 13:31 ` [PATCH v3 09/10] meson: introduce kwargs variable for tests Patrick Steinhardt
2025-05-30 13:31 ` [PATCH v3 10/10] meson: parse TAP output generated by our tests Patrick Steinhardt
2025-05-31 21:37 ` [PATCH v3 00/10] " Karthik Nayak
2025-06-02 6:44 ` [PATCH v4 " Patrick Steinhardt
2025-06-02 6:44 ` [PATCH v4 01/10] t: stop announcing prereqs Patrick Steinhardt
2025-06-02 6:44 ` [PATCH v4 02/10] t: silence output from `test_create_repo()` Patrick Steinhardt
2025-06-02 6:44 ` [PATCH v4 03/10] t9822: use prereq to check for ISO-8859-1 support Patrick Steinhardt
2025-06-02 6:44 ` [PATCH v4 04/10] t983*: use prereq to check for Python-specific git-p4(1) support Patrick Steinhardt
2025-06-02 6:44 ` [PATCH v4 05/10] t/test-lib: don't print shell traces to stdout Patrick Steinhardt
2025-06-02 6:44 ` [PATCH v4 06/10] t/test-lib: fix TAP format for BASH_XTRACEFD warning Patrick Steinhardt
2025-06-02 6:44 ` [PATCH v4 07/10] t7815: fix unexpectedly passing test on macOS Patrick Steinhardt
2025-06-02 6:44 ` [PATCH v4 08/10] test-lib: fail on unexpectedly passing tests Patrick Steinhardt
2025-06-02 6:44 ` [PATCH v4 09/10] meson: introduce kwargs variable for tests Patrick Steinhardt
2025-06-02 6:44 ` [PATCH v4 10/10] meson: parse TAP output generated by our tests Patrick Steinhardt
2025-06-02 7:40 ` [PATCH v4 00/10] " Karthik Nayak
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=aDcBGIW2dxWxZ2l4@pks.im \
--to=ps@pks.im \
--cc=eschwartz@gentoo.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=ramsay@ramsayjones.plus.com \
/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;
as well as URLs for NNTP newsgroup(s).