Add a few module test options to the Morello transitional defconfig, to enable kernel module loading to be tested. These are the modules used by the tests in tools/testing/selftests/lib/.
Signed-off-by: Kristina Martsenko kristina.martsenko@arm.com ---
LTP has more comprehensive module tests than kselftest but the LTP module tests are a bit limited at the moment: - they don't work with out-of-tree LTP builds (which Morello LTP uses) - they can't cross-build modules - they can't build modules with LLVM
From what I understand, there would also be problems with integrating the LTP module builds in the Morello CI. So using kselftest seems simpler for now. FWIW, I did manage to hack LTP enough to manually build and run the module tests and they all pass with this series.
To use kselftest, the steps are: make ARCH=arm64 LLVM=1 modules make INSTALL_MOD_PATH=/path/to/rootfs/ modules_install make -C tools/testing/selftests TARGETS="arm64 lib" ARM64_SUBTARGETS=morello ARCH=arm64 CC=clang install
Note, /sbin/modprobe needs to be present in the rootfs.
Also note, we don't really need to build all 6 modules, for example CONFIG_TEST_PRINTF alone would be enough, in that case run_kselftest.sh will just report SKIP for the others. Building them all may be simpler for the CI to handle, I'm not sure.
arch/arm64/configs/morello_transitional_pcuabi_defconfig | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/arch/arm64/configs/morello_transitional_pcuabi_defconfig b/arch/arm64/configs/morello_transitional_pcuabi_defconfig index 856806652bac..725360446392 100644 --- a/arch/arm64/configs/morello_transitional_pcuabi_defconfig +++ b/arch/arm64/configs/morello_transitional_pcuabi_defconfig @@ -153,6 +153,7 @@ CONFIG_KEYS=y CONFIG_SECURITY=y CONFIG_SECURITY_NETWORK=y CONFIG_SECURITY_SELINUX=y +CONFIG_PRIME_NUMBERS=m CONFIG_PRINTK_TIME=y CONFIG_DEBUG_KERNEL=y CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y @@ -162,4 +163,9 @@ CONFIG_DEBUG_FS=y # CONFIG_DEBUG_PREEMPT is not set # CONFIG_FTRACE is not set CONFIG_CORESIGHT=y +CONFIG_TEST_STRSCPY=m +CONFIG_TEST_PRINTF=m +CONFIG_TEST_SCANF=m +CONFIG_TEST_BITMAP=m +CONFIG_TEST_BITOPS=m CONFIG_MEMTEST=y