[LTP] [PATCH] build: run make check on test sources in kernel module directories
Cyril Hrubis
chrubis@suse.cz
Mon Jun 15 14:36:34 CEST 2026
Hi!
> In directories that build a kernel module, module.mk set CHECK_TARGETS
> with ':=' before env_post.mk could populate it via '?=', leaving it empty
> so 'make check' never ran sparse/checkpatch on the test sources. The filter
> also used a '%.ko' pattern that never matched any 'check-<name>' entry.
>
> Drop the broken assignment from module.mk and instead exclude the kernel
> module sources (MODULE_SOURCES) in env_post.mk once CHECK_TARGETS has been
> populated, so test sources are checked while kernel module code is skipped.
Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
Also I guess that we may want to run vanilla checkpatch for the module
sources, but that would require a bigger changes I suppose.
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list