On 10/16/26 08:31, Sasha Levin wrote:
Add a "Kernel selftests" sub-menu with one entry per selftests directory
that builds with only a C library and does not write into the source
tree. Each is built as "make kselftest-all" builds it, with KHDR_INCLUDES
pointing at the UAPI headers installed in the object tree, but by its own
make, so the selected ones build in parallel. Selftests whose Makefile
does not use KHDR_INCLUDES still build against the C library's copy of
the UAPI headers.

As with "make kselftest-all", a selftest that fails to build does not
fail the build unless FORCE_TARGETS is set. kselftest_deps.sh then lists
the libraries the selftest needs that the compiler cannot link with.

The selftests do not track header dependencies, so a selftest is built
again from scratch when its own directory, a header or makefile any
selftest may share, or the kernel sources and headers it includes (the
vDSO test includes the architecture's vDSO code) are newer than its last
build.

Selftests that need libraries beyond the C library, a vmlinux with BTF,
or a sanitizer runtime are left out for now.

Assisted-by: LLM
Signed-off-by: Sasha Levin <[email protected]>

Thank you.

Reviewed-by: Shuah Khan <[email protected]>

thanks,
-- Shuah

Reply via email to