diff options
| author | David Gow <david@davidgow.net> | 2026-02-27 18:56:49 +0800 |
|---|---|---|
| committer | Shuah Khan <skhan@linuxfoundation.org> | 2026-04-06 13:47:52 -0600 |
| commit | b73f50ffd4bddcd42b312a6c2b3d990f2cde7bf7 (patch) | |
| tree | c3ee0dfb332f6c4dd31427476e57697fb0477507 /tools/testing | |
| parent | b5f92fc4a7ac57c88a4ac600cf401171b3ea3b5f (diff) | |
| download | linux-b73f50ffd4bddcd42b312a6c2b3d990f2cde7bf7.tar.gz linux-b73f50ffd4bddcd42b312a6c2b3d990f2cde7bf7.zip | |
kunit: tool: Recommend --raw_output=all if no KTAP found
If no KTAP header is found in the kernel output (e.g., because the kernel
crashed before the KUnit executor was run), it's very useful to re-run the
test with --raw_output=all, as that will show any error output (such as a
stacktrace, log message, BUG, etc). This is not particularly intuitive,
however, as --raw_output=all is not well known.
Add an extra log line to advertise --raw_output=all in this case, as it's
a terrible user experience to just get "Did any KUnit tests run?"
Signed-off-by: David Gow <david@davidgow.net>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'tools/testing')
| -rw-r--r-- | tools/testing/kunit/kunit_parser.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/testing/kunit/kunit_parser.py b/tools/testing/kunit/kunit_parser.py index 5338489dcbe4..1c61a0ed740d 100644 --- a/tools/testing/kunit/kunit_parser.py +++ b/tools/testing/kunit/kunit_parser.py @@ -857,7 +857,8 @@ def parse_run_tests(kernel_output: Iterable[str], printer: Printer) -> Test: test = Test() if not lines: test.name = '<missing>' - test.add_error(printer, 'Could not find any KTAP output. Did any KUnit tests run?') + test.add_error(printer, 'Could not find any KTAP output. Did any KUnit tests run?\n' + + 'Try running with the --raw_output=all option to see any log messages.') test.status = TestStatus.FAILURE_TO_PARSE_TESTS else: test = parse_test(lines, 0, [], False, printer) |
