mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daniel Borkmann <daniel@iogearbox.net>
To: Li Zhijian <lizhijian@fujitsu.com>, bpf@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
	Shuah Khan <shuah@kernel.org>,
	Alexei Starovoitov <ast@kernel.org>,
	Andrii Nakryiko <andrii@kernel.org>,
	Andrii Nakryiko <andrii.nakryiko@gmail.com>,
	Quentin Monnet <qmo@kernel.org>,
	Masahiro Yamada <masahiroy@kernel.org>
Subject: Re: [PATCH bpf-next v3] selftests/Makefile: override the srctree for out-of-tree builds
Date: Wed, 15 Jan 2025 16:06:31 +0100	[thread overview]
Message-ID: <af9c413d-136a-413a-ad99-8aaf98f1e31c@iogearbox.net> (raw)
In-Reply-To: <20250115014734.438225-1-lizhijian@fujitsu.com>

On 1/15/25 2:47 AM, Li Zhijian wrote:
> Fixes an issue where out-of-tree kselftest builds fail when building
> the BPF and bpftools components. The failure occurs because the top-level
> Makefile passes a relative srctree path to its sub-Makefiles, which
> leads to errors in locating necessary files.
> 
> For example, the following error is encountered:
> 
> ```
> $ make V=1 O=$build/ TARGETS=hid kselftest-all
> ...
> make -C ../tools/testing/selftests all
> make[4]: Entering directory '/path/to/linux/tools/testing/selftests/hid'
> make  -C /path/to/linux/tools/testing/selftests/../../../tools/lib/bpf OUTPUT=/path/to/linux/O/kselftest/hid/tools/build/libbpf/ \
>              EXTRA_CFLAGS='-g -O0'                                      \
>              DESTDIR=/path/to/linux/O/kselftest/hid/tools prefix= all install_headers
> make[5]: Entering directory '/path/to/linux/tools/lib/bpf'
> ...
> make[5]: Entering directory '/path/to/linux/tools/bpf/bpftool'
> Makefile:127: ../tools/build/Makefile.feature: No such file or directory
> make[5]: *** No rule to make target '../tools/build/Makefile.feature'.  Stop.
> ```
> 
> To resolve this, override the srctree in the kselftests's top Makefile
> when performing an out-of-tree build. This ensures that all sub-Makefiles
> have the correct path to the source tree, preventing directory resolution
> errors.
> 
> Cc: Andrii Nakryiko <andrii.nakryiko@gmail.com>
> Signed-off-by: Li Zhijian <lizhijian@fujitsu.com>
> Tested-by: Quentin Monnet <qmo@kernel.org>

[...]
>   tools/testing/selftests/Makefile | 8 ++++++--
>   1 file changed, 6 insertions(+), 2 deletions(-)

Shuah, want to pick this up given its the top-level Makefile or want us to
route it via bpf-next with your Ack? Fwiw, BPF CI went through fine.

  reply	other threads:[~2025-01-15 15:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-15  1:47 Li Zhijian
2025-01-15 15:06 ` Daniel Borkmann [this message]
2025-03-06  1:03   ` Zhijian Li (Fujitsu)

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=af9c413d-136a-413a-ad99-8aaf98f1e31c@iogearbox.net \
    --to=daniel@iogearbox.net \
    --cc=andrii.nakryiko@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=lizhijian@fujitsu.com \
    --cc=masahiroy@kernel.org \
    --cc=qmo@kernel.org \
    --cc=shuah@kernel.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

all inboxes | Powered by JetHome®