git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>, git@vger.kernel.org
Subject: Re: A "why TAP?" manifesto
Date: Mon, 28 Mar 2022 17:50:39 +0200	[thread overview]
Message-ID: <220328.8635j23w61.gmgdl@evledraar.gmail.com> (raw)
In-Reply-To: <xmqqczibjm7v.fsf@gitster.g>


On Thu, Mar 24 2022, Junio C Hamano wrote:

> Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
>
>> == It "can be parsed"
>> == Human readable
>> == It's trivial to produce
>> == It's more flexible
>> == It doesn't matter if nobody else uses it
>> == Everyone uses it
>
> I agree with all of what you said above.
>
> But do non-human readers really want to read output from an
> "--immediate" session?  Don't they rather see the whole thing?

That test run will still take longer, especially if you're expecting
widespread failures.

The immediate use-case I have for this is that I have unsubmitted
patches to implement a "check" mode for SANITIZE=leak, where it runs
with --immediate and "fails" tests that pass under SANITIZE=leak but
aren't marked with "TEST_PASSES_SANITIZE_LEAK=true", and passes (and
runs to completion completely) those tests that do have
"TEST_PASSES_SANITIZE_LEAK=true" but pass with SANITIZE=leak (and fails
those that would fail there, no "fail inversion").

That sort of thing is very useful to for any tests where we mark certain
other tests as being OK under a given mode, and except there to be a 1=1
correspondance.

The reason for the --immediate there is an optimization, it takes a long
time to run with SANITIZE=leak, and if any single failure is enough to
declare the test bad --immediate is useful.

Now, the TAP tooling is quite tolerant of such bad output, another point
in its favor over something like JUnit (I'm assuming most libraries
using it would pass it through a generic XML parser, whose error
handling is either "ok" or "ARGHL!" :).

I.e. it'll give you a full parse, but just have a minor complaint about
the lacking end marker, getting rid of that output & parse nit is nice.

> The only "Huh?" I had with the original patch that started the
> thread was that TAP output currently does not work well with the
> "--verbose" option, and I've never run our tests with the
> "--immediate" option without the "--verbose" option to see where and
> how the first breakage happens and what is left behind in the trash
> directory, i.e. to bootstrap an interactive debugging session.
>
> But not being useful for the use case of human reader running
> interactively to get the leftover state does not mean improvement
> for other use cases is not welcome.

I was sad to see that ability go away, without the patches I referenced
running through a TAP parser with --verbose works for almost all ouf our
test suite, so IMO we were a bit overzelous in adding that early abort
for it.

But I do have patches to make it pass 100% guaranteed, so depending on
your interest ... :)

I was planning to queue that behind some of the outstanding test lib
changes it would conflict with, e.g. this one & the outstanding CI
topics.

  reply	other threads:[~2022-03-28 15:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-23 20:51 [PATCH] test-lib: have --immediate emit valid TAP on failure Ævar Arnfjörð Bjarmason
2022-03-24 13:38 ` Johannes Schindelin
2022-03-24 13:48   ` A "why TAP?" manifesto (was: [PATCH] test-lib: have --immediate emit valid TAP on failure) Ævar Arnfjörð Bjarmason
2022-03-24 17:26     ` A "why TAP?" manifesto Junio C Hamano
2022-03-28 15:50       ` Ævar Arnfjörð Bjarmason [this message]
2022-03-24 21:57     ` A "why TAP?" manifesto (was: [PATCH] test-lib: have --immediate emit valid TAP on failure) Taylor Blau

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=220328.8635j23w61.gmgdl@evledraar.gmail.com \
    --to=avarab@gmail.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).