Speaker
Description
Today the kernel's UAPIs are tested through userspace testcases using the kselftests framework, which provides a uniform build system and output formatting infrastructure. However it does currently not provide an out-of-the-box solution to run the tests against the current in-development kernel tree.
I am proposing a framework which allows to build the test applications as part of the kernel build ("userprogs") and then to run them as part of regular KUnit, reusing the existing tooling. The structured TAP output from the selftests are preserved and seamlessly nested within the regular KUnit output. For developers and CI systems these testcases behave exactly the same as regular kernel-only KUnit tests.
In addition the tests can make use of the nolibc library which enables the compilation of simple test programs even with only a kernel toolchain.
The idea is to share testcases between the new framework and regular kselftests.
Discussion topics:
* What is preventing the merge to mainline?
(In case it is not merged yet by then)
* Which features are missing?
* How exactly to coexist with tools/testing/selftests/?
* How to handle libgcc dependencies?
* How to handle different UAPI ABIs per architecture?
* How to handle complex test programs?
Patch series: https://lore.kernel.org/lkml/20250717-kunit-kselftests-v5-5-442b711cde2e@linutronix.de/
LWN article: https://lwn.net/Articles/1029077/