Bug 205761

Summary: kunit_tool: add TAP extraction support for non-UML kernels
Product: Tools Reporter: Brendan Higgins (brendanhiggins)
Component: KUnitAssignee: Tools/KUnit virtual default assignee (tools_kunit)
Status: NEW ---    
Severity: normal CC: brendanhiggins
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: kselftest/test (5.4) Tree: Mainline
Regression: No

Description Brendan Higgins 2019-12-04 00:51:15 UTC
We should split out the tools/testing/kunit/kunit_parser.py as a standalone KUnit TAP parser so it can be used with arbitrary dmesg output.

For context: Quoting Ted Ts'o:

For people who aren't using UML to run Kunit tests, and are either running the kunit tests during boot, or when the module is loaded, is there the test framework to automatically extract the test reports out of dmesg?

I can boot a kernel with kunit tests enabled using kvm, and I see it splatted intermixed with the rest of the kernel boot messages.  This is how I tested the 32-bit ext4 inode test fix.  But I had to manually find the test output.  Is that the expected way people are supposed to be using Kunit tests w/o using UML and the python runner?

For full email thread, see: https://lore.kernel.org/linux-kselftest/CAAXuY3rYZHac4o1bqqnbR_1g12dtqmJHVp8Taky00J4-+2hwZA@mail.gmail.com/T/#m956d6a2a2af79437ddb558d6eee7adc1db56b9d2