From: Muhammad Usama Anjum <usama.anjum@collabora.com>
To: Andrii Nakryiko <andrii.nakryiko@gmail.com>
Cc: usama.anjum@collabora.com, Shuah Khan <shuah@kernel.org>,
Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Andrii Nakryiko <andrii@kernel.org>,
Martin KaFai Lau <kafai@fb.com>, Song Liu <songliubraving@fb.com>,
Yonghong Song <yhs@fb.com>,
John Fastabend <john.fastabend@gmail.com>,
KP Singh <kpsingh@kernel.org>,
kernel@collabora.com,
"open list:KERNEL SELFTEST FRAMEWORK"
<linux-kselftest@vger.kernel.org>,
open list <linux-kernel@vger.kernel.org>,
Networking <netdev@vger.kernel.org>, bpf <bpf@vger.kernel.org>
Subject: Re: [PATCH] selftests: Fix build when $(O) points to a relative path
Date: Tue, 8 Feb 2022 01:59:58 +0500 [thread overview]
Message-ID: <701fbfac-b548-1f05-7841-e233ef82be15@collabora.com> (raw)
In-Reply-To: <CAEf4Bzbf38F39XHJnCKy19m97JZJnhN0+Sr-TAVzZnSKuqzL4w@mail.gmail.com>
On 2/8/22 12:22 AM, Andrii Nakryiko wrote:
> On Fri, Feb 4, 2022 at 2:59 PM Muhammad Usama Anjum
> <usama.anjum@collabora.com> wrote:
>>
>> Build of bpf and tc-testing selftests fails when the relative path of
>> the build directory is specified.
>>
>> make -C tools/testing/selftests O=build0
>> make[1]: Entering directory '/linux_mainline/tools/testing/selftests/bpf'
>> ../../../scripts/Makefile.include:4: *** O=build0 does not exist. Stop.
>> make[1]: Entering directory '/linux_mainline/tools/testing/selftests/tc-testing'
>> ../../../scripts/Makefile.include:4: *** O=build0 does not exist. Stop.
>>
>> The fix is same as mentioned in commit 150a27328b68 ("bpf, preload: Fix
>> build when $(O) points to a relative path").
>>
>
> I don't think it actually helps building BPF selftest. Even with this
This patch is fixing one type of build error which occurs if output
directory's path is relative.
> patch applied, all the feature detection doesn't work, and I get
> reallocarray redefinition failure when bpftool is being built as part
> of selftest.
There may be more problems in BPF tests. Those needs to be looked at
separately.
>> Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
>> ---
>> tools/testing/selftests/Makefile | 4 +++-
>> 1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile
>> index 4eda7c7c15694..aa0faf132c35a 100644
>> --- a/tools/testing/selftests/Makefile
>> +++ b/tools/testing/selftests/Makefile
>> @@ -178,6 +178,7 @@ all: khdr
>> BUILD_TARGET=$$BUILD/$$TARGET; \
>> mkdir $$BUILD_TARGET -p; \
>> $(MAKE) OUTPUT=$$BUILD_TARGET -C $$TARGET \
>> + O=$(abs_objtree) \
>> $(if $(FORCE_TARGETS),|| exit); \
>> ret=$$((ret * $$?)); \
>> done; exit $$ret;
>> @@ -185,7 +186,8 @@ all: khdr
>> run_tests: all
>> @for TARGET in $(TARGETS); do \
>> BUILD_TARGET=$$BUILD/$$TARGET; \
>> - $(MAKE) OUTPUT=$$BUILD_TARGET -C $$TARGET run_tests;\
>> + $(MAKE) OUTPUT=$$BUILD_TARGET -C $$TARGET run_tests \
>> + O=$(abs_objtree); \
>> done;
>>
>> hotplug:
>> --
>> 2.30.2
>>
prev parent reply other threads:[~2022-02-07 21:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-04 22:58 [PATCH] selftests: Fix build when $(O) points to a relative path Muhammad Usama Anjum
2022-02-07 19:22 ` Andrii Nakryiko
2022-02-07 20:59 ` Muhammad Usama Anjum [this message]
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=701fbfac-b548-1f05-7841-e233ef82be15@collabora.com \
--to=usama.anjum@collabora.com \
--cc=andrii.nakryiko@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=john.fastabend@gmail.com \
--cc=kafai@fb.com \
--cc=kernel@collabora.com \
--cc=kpsingh@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=shuah@kernel.org \
--cc=songliubraving@fb.com \
--cc=yhs@fb.com \
/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