[Buildroot] [PATCH v3] linux: Build and install kernel selftests

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Sun Mar 20 21:09:03 UTC 2016


Hello,

On Wed, 16 Mar 2016 14:26:33 +1100, Cyril Bur wrote:
> +config BR2_LINUX_KERNEL_TOOL_SELFTESTS
> +	bool"selftests"
> +	depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS # bash
> +	depends on BR2_USE_MMU  # bash
> +	select BR2_PACKAGE_BASH
> +	select BR2_PACKAGE_POPT
> +	select BR2_PACKAGE_LIBCAP_NG
> +	help
> +	  Build and install (to /usr/lib/kselftests) kernel selftests.
> +
> +	  Use of this option implies you know the process using and compiling

There was a typo here, a missing word between "process" and "using".

> +	  the kernel selftests. The Makefile to build and install these is very
> +	  noisy and may appear to cause your build to fail for strange reasons.
> +
> +	  This is very much a use at your risk option and may not work for
> +	  every setup or every architecture.

Those lines were slightly too long.

> +
> +comment "selftests needs BR2_PACKAGE_BUSYBOX_SHOW_OTHERS"
> +	depends on !BR2_PACKAGE_BUSYBOX_SHOW_OTHERS

You should have replicated the BR2_USE_MMU dependency here.

> +SELFTESTS_DEPENDENCIES = bash libcap-ng popt

bash is not needed at build time, it's only a runtime dependency, so
I've removed it from this variable (but kept it as a select in
Config.in, and added a comment that indicates it's a runtime
dependency).

It's worth noting that with uClibc, a number of tests fail to build,
but I guess that's expected, and it doesn't abort the build.

I've applied with the fixes I mentioned above.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com



More information about the buildroot mailing list