Re: Readd use of TAP subtests

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Daniel Gustafsson <daniel(at)yesql(dot)se>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Dagfinn Ilmari Mannsåker <ilmari(at)ilmari(dot)org>
Subject: Re: Readd use of TAP subtests
Date: 2022-02-25 17:28:36
Message-ID: eed01589-5af6-e6a0-38d0-72949b9bc5a1@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On 2/25/22 11:41, Andres Freund wrote:
> Hi,
>
> On 2022-02-25 09:43:20 -0500, Andrew Dunstan wrote:
>> AIUI TAP consumers are supposed to ignore lines they don't understand.
> Are they?
>
> In http://testanything.org/tap-version-13-specification.html there's:
>
> "Lines written to standard output matching /^(not )?ok\b/ must be interpreted
> as test lines. [...]All other lines must not be considered test output."
>
> That says that all other lines aren't "test ouput". But what does that mean?
> It certainly doesn't mean they can just be ignored, because obviously
> ^(TAP version|#|1..|Bail out) isn't to be ignored.

I don't think we're following spec 13.

>
> And then there's:
>
>
> "
> Anything else
>
> Any output that is not a version, a plan, a test line, a YAML block, a
> diagnostic or a bail out is incorrect. How a harness handles the incorrect
> line is undefined. Test::Harness silently ignores incorrect lines, but will
> become more stringent in the future. TAP::Harness reports TAP syntax errors at
> the end of a test run.
> "
>
> If I were to to implement a tap parser this wouldn't make me ignore lines.
>
>
> Contrasting to that:
> http://testanything.org/tap-specification.html
>
> "
> Anything else
>
> A TAP parser is required to not consider an unknown line as an error but may
> optionally choose to capture said line and hand it to the test harness,
> which may have custom behavior attached. This is to allow for forward
> compatability. Test::Harness silently ignores incorrect lines, but will
> become more stringent in the future. TAP::Harness reports TAP syntax errors
> at the end of a test run.
> "
>
> I honestly don't know what to make of that. Parsers are supposed to ignore
> unknown lines, Test::Harness silently ignores, but also "TAP::Harness reports
> TAP syntax errors"? This seems like a self contradictory mess.
>

I agree it's a mess. Both of these "specs" are incredibly loose. I guess
that happens when the spec comes after the implementation.

cheers

andrew

--
Andrew Dunstan
EDB: https://www.enterprisedb.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Davis 2022-02-25 17:29:24 Re: Proposal: Support custom authentication methods using hooks
Previous Message Tom Lane 2022-02-25 17:15:25 Re: Frontend error logging style