Skip to content

kunit: tool: Don't overwrite test status based on subtest counts

Thomas Weißschuh linux-kselftest lkml 1 version In review

Get series with b4
b4 am [email protected] change-id 20251230-kunit-nested-failure-a3a56ec999ba

Versions newest first

  1. v1 Latest2 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2kunit: tool: Add test for nested test result reportingtools/testing/kunit/kunit_tool_test.py tools/testing/kunit/test_data/test_is_test_passed-failure-nested.log+17 -01 reply
2/2kunit: tool: Don't overwrite test status based on subtest countstools/testing/kunit/kunit_parser.py tools/testing/kunit/kunit_tool_test.py tools/testing/kunit/test_data/test_is_test_passed-failure-nested.log+7 -01 reply

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchDavid GowRae Moar
1/2R-b R-b R-b
2/2R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] kunit: tool: Don't overwrite test status based on subtest counts

If a subtest itself reports success, but the outer testcase fails, the whole testcase should be reported as a failure. However the status is recalculated based on the test counts, overwriting the outer test result. Synthesize a failed test in this case to make sure the failure is not swallowed.

These patches where previously part of my KUnit UAPI series [0]. I split them out, as they are useful on their own and the KUnit UAPI series does not actually have a hard dependency on them.

[0] https://lore.kernel.org/lkml/[email protected]/

---
Thomas Weißschuh (2):
kunit: tool: Add test for nested test result reporting
kunit: tool: Don't overwrite test status based on subtest counts

 tools/testing/kunit/kunit_parser.py                           |  3 +++
 tools/testing/kunit/kunit_tool_test.py                        | 11 +++++++++++
 .../kunit/test_data/test_is_test_passed-failure-nested.log    | 10 ++++++++++
 3 files changed, 24 insertions(+)

---
base-commit: a77b19b747c8a53ac16289685b0f77085a2ad553
change-id: 20251230-kunit-nested-failure-a3a56ec999ba

Best regards,

Signature · 1 line
Thomas Weißschuh <[email protected]>