[PATCH 0/2] kunit: tool: Preserve failures in parsed KTAP results

From: Louis H. Poulin II

Date: Thu Nov 05 2026 - 14:04:24 EST


The KUnit tool's saved-log parser does not consistently propagate two
failure conditions. A suite reporting not ok with only skipped children
leaves the run SKIPPED. A result with an out-of-sequence number can
still be counted as successful, so kunit.py parse may exit 0 for that
malformed log.

Patch 1 preserves the suite's reported failure in aggregate counts.
Patch 2 marks out-of-sequence result records as failed. It depends on
patch 1 for a malformed parent suite whose child tests are all skipped.

The KTAP specification requires result numbers to start at 1 and
increase by one at each nesting level. The numbering change treats a
malformed result record as failed even when its keyword is ok. It
leaves the status policy for other parse diagnostics unchanged,
including a late TAP plan and truncated logs.

Tested locally: ./kunit_tool_test.py (100 tests), saved-log parsing
tests, Python syntax and strict checkpatch with the sign-off check
excluded. No live kernel run was performed.

Louis H. Poulin II (2):
kunit: tool: Count failed suites with only skipped tests
kunit: tool: Fail on out-of-sequence test numbers

tools/testing/kunit/kunit_parser.py | 15 +++--
tools/testing/kunit/kunit_tool_test.py | 92 +++++++++++++++++++++++++-
2 files changed, 98 insertions(+), 9 deletions(-)


base-commit: 05441d697f7f9a927264f4058cbbc6a03dfcac9d
--
2.53.0