]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
kunit: tool: Fix bug in parsing test plan
authorRae Moar <rmoar@google.com>
Thu, 13 Mar 2025 19:27:13 +0000 (19:27 +0000)
committerShuah Khan <shuah@kernel.org>
Sun, 16 Mar 2025 00:13:38 +0000 (18:13 -0600)
commit1d4c06d51963f89f67c7b75d5c0c34e9d1bb2ae6
tree13deb28c00abeaf093f2e7d11b65112e21ccae6a
parentc104c16073b7fdb3e4eae18f66f4009f6b073d6f
kunit: tool: Fix bug in parsing test plan

A bug was identified where the KTAP below caused an infinite loop:

 TAP version 13
 ok 4 test_case
 1..4

The infinite loop was caused by the parser not parsing a test plan
if following a test result line.

Fix this bug by parsing test plan line to avoid the infinite loop.

Link: https://lore.kernel.org/r/20250313192714.1380005-1-rmoar@google.com
Signed-off-by: Rae Moar <rmoar@google.com>
Reviewed-by: David Gow <davidgow@google.com>
Signed-off-by: Shuah Khan <shuah@kernel.org>
tools/testing/kunit/kunit_parser.py