[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a031f13e-a5ee-4db9-89a3-983b962c3c1b@huawei.com>
Date: Fri, 15 Nov 2024 17:03:34 +0800
From: Yunsheng Lin <linyunsheng@...wei.com>
To: Mark Brown <broonie@...nel.org>
CC: <davem@...emloft.net>, <kuba@...nel.org>, <pabeni@...hat.com>,
<netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>, Andrew Morton
<akpm@...ux-foundation.org>, Alexander Duyck <alexander.duyck@...il.com>,
Linux-MM <linux-mm@...ck.org>, Alexander Duyck <alexanderduyck@...com>, Shuah
Khan <shuah@...nel.org>, <linux-kselftest@...r.kernel.org>,
<Aishwarya.TCV@....com>
Subject: Re: [PATCH net-next v23 1/7] mm: page_frag: add a test module for
page_frag
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@mail.gmail.com/
>
> 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
Powered by blists - more mailing lists