]> git.baikalelectronics.ru Git - kernel.git/commit
kunit: tool: print clearer error message when there's no TAP output
authorDaniel Latypov <dlatypov@google.com>
Tue, 29 Mar 2022 21:42:48 +0000 (14:42 -0700)
committerShuah Khan <skhan@linuxfoundation.org>
Thu, 12 May 2022 17:15:58 +0000 (11:15 -0600)
commit580a8f8f2a7a8e4f07238268850a68ecd2b1725a
tree57ad822494fae14bfe479cf9b0350bea6ed84d61
parentf046f309e057055173969debf2e5ae1c3abf9b30
kunit: tool: print clearer error message when there's no TAP output

Before:
$ ./tools/testing/kunit/kunit.py parse /dev/null
...
[ERROR] Test : invalid KTAP input!

After:
$ ./tools/testing/kunit/kunit.py parse /dev/null
...
[ERROR] Test <missing>: could not find any KTAP output!

This error message gets printed out when extract_tap_output() yielded no
lines. So while it could be because of malformed KTAP output from KUnit,
it could also be due to not having any KTAP output at all.

Try and make the error message here more clear.

Signed-off-by: Daniel Latypov <dlatypov@google.com>
Reviewed-by: David Gow <davidgow@google.com>
Reviewed-by: Brendan Higgins <brendanhiggins@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/kunit/kunit_parser.py
tools/testing/kunit/kunit_tool_test.py