oe-kbuild-all.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Marcos Paulo de Souza <mpdesouza@suse.com>
To: kernel test robot <lkp@intel.com>
Cc: oe-kbuild-all@lists.linux.dev,
	Linux Memory Management List <linux-mm@kvack.org>,
	Shuah Khan <skhan@linuxfoundation.org>,
	Joe Lawrence <joe.lawrence@redhat.com>,
	Petr Mladek <pmladek@suse.com>
Subject: Re: [linux-next:master 1016/2825] make[2]: *** kselftest/livepatch/test_modules: No such file or directory.  Stop.
Date: Tue, 30 Jan 2024 11:39:56 -0300	[thread overview]
Message-ID: <ed54875555c282ad3b09503020a7aa978a80bd60.camel@suse.com> (raw)
In-Reply-To: <202401300736.GkSZoSrA-lkp@intel.com>

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@intel.com/reproduce)
> 
> If you fix the issue in a separate patch/commit (i.e. not just a new
> version of
> the same patch/commit), kindly add following tags
> > Reported-by: kernel test robot <lkp@intel.com>
> > Closes:
> > https://lore.kernel.org/oe-kbuild-all/202401300736.GkSZoSrA-lkp@intel.com/
> 
> All errors (new ones prefixed by >>):
> 
> > > make[2]: *** kselftest/livepatch/test_modules: No such file or
> > > directory.  Stop.
> 

I had problems to compile the bpf tests, usually resulting in errors
like this:

$ make W=1 O=/tmp/kselftest -C tools/testing/selftests/bpf            
make: Entering directory
'/home/mpdesouza/git/linux/tools/testing/selftests/bpf'
  CLNG-BPF [test_maps] connect_unix_prog.bpf.o
progs/connect_unix_prog.c:28:15: error: no member named 'uaddrlen' in
'struct bpf_sock_addr_kern'
        if (sa_kern->uaddrlen != unaddrlen)
            ~~~~~~~  ^
1 error generated.
make: *** [Makefile:619: /tmp/kselftest//connect_unix_prog.bpf.o] Error
1

But, if I simply feed the livepatch selftests as target I'm able to
trigger the problem:


$ make W=1 O=/tmp/kselftest -C tools/testing/selftests/
TARGETS=livepatch                 
make: Entering directory
'/home/mpdesouza/git/linux/tools/testing/selftests'
make[1]: Entering directory
'/home/mpdesouza/git/linux/tools/testing/selftests/livepatch'
make -C /tmp/kselftest/kselftest/livepatch/test_modules
make[2]: Entering directory
'/home/mpdesouza/git/linux/tools/testing/selftests/livepatch'
make[2]: *** /tmp/kselftest/kselftest/livepatch/test_modules: No such
file or directory.  Stop.
make[2]: Leaving directory
'/home/mpdesouza/git/linux/tools/testing/selftests/livepatch'
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'

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
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
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'

Joe, Petr, Shuah,

Any ideas? I don't understand why we have that

make[4]: Entering directory '/tmp/kselftest'

I would expected that Kbuild would just spill the resulting module and
object files into the O= dir, instead of "jumping there". What am I
missing?

Thanks in advance for the help,
  Marcos



  reply	other threads:[~2024-01-30 14:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-29 23:08 [linux-next:master 1016/2825] make[2]: *** kselftest/livepatch/test_modules: No such file or directory. Stop kernel test robot
2024-01-30 14:39 ` Marcos Paulo de Souza [this message]
2024-01-31 15:34   ` Petr Mladek
2024-01-31 18:39     ` Marcos Paulo de Souza
2024-01-31 18:40       ` Marcos Paulo de Souza
2024-02-05 18:05         ` Marcos Paulo de Souza
2024-02-14 14:27           ` Marcos Paulo de Souza

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ed54875555c282ad3b09503020a7aa978a80bd60.camel@suse.com \
    --to=mpdesouza@suse.com \
    --cc=joe.lawrence@redhat.com \
    --cc=linux-mm@kvack.org \
    --cc=lkp@intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=pmladek@suse.com \
    --cc=skhan@linuxfoundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).