mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] kunit: tool: Don't overwrite test status based on subtest counts
@ 2025-12-30 12:26 Thomas Weißschuh
  2025-12-30 12:26 ` [PATCH 1/2] kunit: tool: Add test for nested test result reporting Thomas Weißschuh
  2025-12-30 12:26 ` [PATCH 2/2] kunit: tool: Don't overwrite test status based on subtest counts Thomas Weißschuh
  0 siblings, 2 replies; 5+ messages in thread
From: Thomas Weißschuh @ 2025-12-30 12:26 UTC (permalink / raw)
  To: Brendan Higgins, David Gow, Rae Moar
  Cc: linux-kernel, linux-kselftest, kunit-dev, Thomas Weißschuh,
	Rae Moar

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/20250717-kunit-kselftests-v5-0-442b711cde2e@linutronix.de/

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
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,
-- 
Thomas Weißschuh <thomas.weissschuh@linutronix.de>


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-01-05  8:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-12-30 12:26 [PATCH 0/2] kunit: tool: Don't overwrite test status based on subtest counts Thomas Weißschuh
2025-12-30 12:26 ` [PATCH 1/2] kunit: tool: Add test for nested test result reporting Thomas Weißschuh
2026-01-05  8:55   ` David Gow
2025-12-30 12:26 ` [PATCH 2/2] kunit: tool: Don't overwrite test status based on subtest counts Thomas Weißschuh
2026-01-05  8:55   ` David Gow

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®