Re: [linux-next:master 1016/2825] make[2]: *** kselftest/livepatch/test_modules: No such file or directory. Stop.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue 2024-01-30 11:39:56, Marcos Paulo de Souza wrote:
> On Tue, 2024-01-30 at 07:08 +0800, kernel test robot wrote:
> > tree:  
> > https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git m
> > aster
> > head:   596764183be8ebb13352b281a442a1f1151c9b06
> > commit: c4bbe83d27c2446a033cc0381c3fb6be5e8c41c7 [1016/2825]
> > livepatch: Move tests from lib/livepatch to selftests/livepatch
> > compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
> > reproduce (this is a W=1 build):
> > (https://download.01.org/0day-ci/archive/20240130/202401300736.GkSZoS
> > rA-lkp@xxxxxxxxx/reproduce)
> > 
> When looking at the lib.mk, I just followed the other variables and did
> the same:
> 
> TEST_GEN_MODS_DIR := $(patsubst %,$(OUTPUT)/%,$(TEST_GEN_MODS_DIR))
> 
> But later on, I jump into $(TEST_GEN_MODS_DIR), which is invalid
> because of the O= that is used a prefix for the path:
> /tmp/kselftest/kselftest/livepatch/test_modules. My first idea was to
> just remove the patsubst and take TEST_GEN_MODS_DIR, which should be
> livepatch/test_modules in this case, but it then returns another
> problem:
> 
> 
> make: Entering directory
> '/home/mpdesouza/git/linux/tools/testing/selftests'
> make[1]: Entering directory
> '/home/mpdesouza/git/linux/tools/testing/selftests/livepatch'
> make -C test_modules
> make[2]: Entering directory
> '/home/mpdesouza/git/linux/tools/testing/selftests/livepatch/test_modul
> 
> es'
> make -C /lib/modules/6.5.9-1-default/build modules
> KBUILD_EXTMOD=/home/mpdesouza/git/linux/tools/testing/selftests/livepat
> 
> ch/test_modules

Nit: There are sometimes strange empty lines between split long
     lines. It looks like somehow messed cut&paste.

> make[3]: Entering directory '/usr/src/linux-6.5.9-1-obj/x86_64/default'
> make[4]: Entering directory '/tmp/kselftest'
> /usr/src/linux-6.5.9-1/Makefile:754: include/config/auto.conf: No such
> file or directory

I see the same. It looks to me like a bug in kernel-devel package.

/usr/src/linux-6.5.9-1/Makefile is from the kernel-devel package
for the running kernel. It should try to include auto.conf used
for building the running kernel:

  1. auto.conf should be packaged in kernel-devel.

  2. The Makefile from the kernel-devel packages should be able
     to find/use auto.conf from the kernel-devel package.

IMHO, this actually helped to find a bug that
make -C tools/testing/selftests/livepatch used auto.conf from
the git tree while the modules are built against headers
for the running kernel.

That said, I wonder why this problem does not happen when building
external modules (KMPs). I would expect that they are using
the same Makefile from the kernel-devel package.

Maybe the external modules somehow manage to clear "need-config"
used by /usr/src/linux-6.5.9-1/Makefile. Maybe we do not need
to include it either.

> make[4]: *** [/usr/src/linux-6.5.9-1/Makefile:234: __sub-make] Error 2
> make[4]: Leaving directory '/tmp/kselftest'
> make[3]: *** [../../../linux-6.5.9-1/Makefile:234: __sub-make] Error 2
> make[3]: Leaving directory '/usr/src/linux-6.5.9-1-obj/x86_64/default'
> make[2]: *** [Makefile:16: modules] Error 2
> make[2]: Leaving directory
> '/home/mpdesouza/git/linux/tools/testing/selftests/livepatch/test_modul
> 
> es'
> make[1]: *** [../lib.mk:92: gen_mods_dir] Error 2
> make[1]: Leaving directory
> '/home/mpdesouza/git/linux/tools/testing/selftests/livepatch'
> make: *** [Makefile:180: all] Error 2
> make: Leaving directory
> '/home/mpdesouza/git/linux/tools/testing/selftests'

Best Regards,
Petr




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux