On 2024/11/15 0:02, Mark Brown wrote: > On Mon, Oct 28, 2024 at 07:53:36PM +0800, Yunsheng Lin wrote: >> The testing is done by ensuring that the fragment allocated >> from a frag_frag_cache instance is pushed into a ptr_ring >> instance in a kthread binded to a specified cpu, and a kthread >> binded to a specified cpu will pop the fragment from the >> ptr_ring and free the fragment. Hi, Thanks for reporting. > > This is breaking the build in -next on at least arm64 and x86_64 since > it's trying to build an out of tree kernel module which is included in > the selftests directory, the kselftest build system just isn't set up to > do that in a sensible and robust fashion. The module should probably be I tried the below kernel modules in the testing directory, they seemed to have the similar problem if the kernel is not compiled yet. make -C tools/testing/nvdimm make -C tools/testing/selftests/bpf/bpf_testmod/ make -C tools/testing/selftests/livepatch/test_modules/ > in the main kernel tree and enabled by the config file for the mm tests. As discussed in [1], this module is not really a vaild kernel module by returning '-EAGAIN', which is the main reason that it is setup in the selftests instead of the main kernel tree. 1. https://lore.kernel.org/all/CAKgT0UdL77J4reY0JRaQfCJAxww3R=jOkHfDmkuJHSkd1uE55A@xxxxxxxxxxxxxx/ > > KernelCI sees: > > *** > *** Configuration file ".config" not found! > *** > *** Please run some configurator (e.g. "make oldconfig" or > *** "make menuconfig" or "make xconfig"). > *** > Makefile:810: include/config/auto.conf.cmd: No such file or directory > > (see https://storage.kernelci.org/next/master/next-20241114/x86_64/x86_64_defconfig%2Bkselftest/gcc-12/logs/kselftest.log) > > and I've seen: > > ERROR: Kernel configuration is invalid. > include/generated/autoconf.h or include/config/auto.conf are missing. > Run 'make oldconfig && make prepare' on kernel src to fix it. > > make[3]: *** [Makefile:788: include/config/auto.conf] Error 1 As above, I am not sure if there is some elegant way to avoid the above error in the selftest core, one possible way to avoid the above error is to skip compiling like below as tools/testing/selftests/mm/test_page_frag.sh already skip the testing for page_frag if the test module is not compiled: diff --git a/tools/testing/selftests/mm/page_frag/Makefile b/tools/testing/selftests/mm/page_frag/Makefile index 58dda74d50a3..ab5f457bd39e 100644 --- a/tools/testing/selftests/mm/page_frag/Makefile +++ b/tools/testing/selftests/mm/page_frag/Makefile @@ -7,6 +7,8 @@ else Q = @ endif +ifneq (,$(wildcard $(KDIR)/Module.symvers)) + MODULES = page_frag_test.ko obj-m += page_frag_test.o @@ -16,3 +18,10 @@ all: clean: +$(Q)make -C $(KDIR) M=$(PAGE_FRAG_TEST_DIR) clean + +else + +all: + $(warning Please build the kernel before building the test ko) + +endif