Re: [PATCH RESEND v2] kunit: tool: Preserve suite ancestry in JUnit test identities
From: David Gow
Date: Thu Nov 26 2026 - 21:21:35 EST
> JUnit testcases currently carry only a name. A parameterized KUnit test
> becomes a nested testsuite named after the test function. Reusing that
> function in several outer suites therefore produces the same immediate
> suite name and parameter name in each of them.
>
> For example, cs_dsp_test_run_stop_callbacks is registered in four cs_dsp
> callback suites with the same "all ops" parameter. GitLab identifies cases
> by suite name, classname and testcase name. Without a classname, these
> distinct cases have identical keys in the imported report.
>
> Set classname to the dot-separated ancestor suite names, including the
> parser's main root. Preserve the existing suite hierarchy, testcase names,
> statuses and logs. Add a regression using the existing nested log fixture,
> whose seven testcases otherwise have only five distinct identity tuples.
>
> Validation: all 92 kunit_tool_test.py tests pass. The new regression fails
> on the unmodified generator. Comparing all 24 log fixtures shows no XML
> changes other than the added classname attributes.
>
> Fixes: e9e05c72752f ("kunit: tool: Add (primitive) support for outputting JUnit XML")
> Signed-off-by: Daniil Matus <matus.daniil@xxxxxxx>
Thanks very much: glad to see this working with something other than Jenkins, too.
Reviewed-by: David Gow <david@xxxxxxxxxxxx>
-- David
--
David Gow <david@xxxxxxxxxxxx>