Re: [KTAP V2 PATCH] ktap_v2: add recognized test name line

From: Rae Moar
Date: Tue Mar 28 2023 - 17:09:00 EST


On Mon, Mar 20, 2023 at 3:21 PM 'Daniel Latypov' via KUnit Development
<kunit-dev@xxxxxxxxxxxxxxxx> wrote:
>
> On Thu, Mar 16, 2023 at 3:59 PM Rae Moar <rmoar@xxxxxxxxxx> wrote:
> >
> > Add recognition of the test name line ("# Subtest: <name>") to the KTAP v2
> > spec.
> >
> > The purpose of this line is to declare the name of a test before its
> > results. This functionality is especially useful when trying to parse test
> > results incrementally and when interpretting results after a crash.
> >
> > This line is already compliant with KTAP v1 as it is interpretted as a
>
> minor nit for if there's a v2, s/interprett/interpret (here and above)
>

Oops. Thanks for catching this. I will change this for a v2. Unsure
why I repeated the typo twice.

> Also, I want to elaborate on the previous paragraph a bit more, in
> case the motivation isn't clear.
> The problem with TAP and KTAP as-is is that the name of a test case is
> only known *after* it completes.
>
> So the scenario being referred to is
>
> KTAP version 1
> 1..1
> <lots of output>
> <kernel crash, no more output>
>
> It would be nice if parsers could report "test FOO caused a crash" as
> opposed to "the first test case caused a crash, good luck figuring out
> which one that was"
>

Yes, this is exactly what I think is the largest benefit of a line to
define the test name pre-results. Thanks for expanding. I will likely
add in some of this explanation into the commit message for v2.

Thanks,

Rae

> Daniel
>
> --
> You received this message because you are subscribed to the Google Groups "KUnit Development" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to kunit-dev+unsubscribe@xxxxxxxxxxxxxxxx.
> To view this discussion on the web visit https://groups.google.com/d/msgid/kunit-dev/CAGS_qxp2u3F4abmYgN%2BXwCG8CJN37NSqWSC%3D%3D%3DSWLCjZG8HYBw%40mail.gmail.com.