]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
kunit: tool: Don't overwrite test status based on subtest counts
authorThomas Weißschuh <thomas.weissschuh@linutronix.de>
Tue, 30 Dec 2025 12:26:36 +0000 (13:26 +0100)
committerShuah Khan <skhan@linuxfoundation.org>
Mon, 5 Jan 2026 22:36:08 +0000 (15:36 -0700)
commit85aff81b0dba7c42d226d9f7c11c4d30a7906878
treefae77a1759fb366fcd740f625cc995eb03ee3fff
parent0c5b86c67fb6898d02c8f92de884186297fd302f
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.

Link: https://lore.kernel.org/r/20251230-kunit-nested-failure-v1-2-98cfbeb87823@linutronix.de
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Reviewed-by: David Gow <davidgow@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/kunit/kunit_parser.py
tools/testing/kunit/kunit_tool_test.py
tools/testing/kunit/test_data/test_is_test_passed-failure-nested.log