* [PATCH bpf-next 0/3] BPF selftests fixes
@ 2022-12-05 13:16 Daan De Meyer
2022-12-05 13:16 ` [PATCH bpf-next 1/3] selftests/bpf: Install all required files to run selftests Daan De Meyer
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Daan De Meyer @ 2022-12-05 13:16 UTC (permalink / raw)
To: bpf; +Cc: Daan De Meyer
This patch series fixes a few issues I've found while integrating the
bpf selftests into systemd's mkosi development environment.
Daan De Meyer (3):
selftests/bpf: Install all required files to run selftests
selftests/bpf: Use "is not set" instead of "=n"
selftests/bpf: Use CONFIG_TEST_BPF=m instead of of CONFIG_TEST_BPF=y
tools/testing/selftests/bpf/Makefile | 6 ++++--
tools/testing/selftests/bpf/config | 4 ++--
2 files changed, 6 insertions(+), 4 deletions(-)
--
2.38.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH bpf-next 1/3] selftests/bpf: Install all required files to run selftests
2022-12-05 13:16 [PATCH bpf-next 0/3] BPF selftests fixes Daan De Meyer
@ 2022-12-05 13:16 ` Daan De Meyer
2022-12-07 0:29 ` Andrii Nakryiko
2022-12-05 13:16 ` [PATCH bpf-next 2/3] selftests/bpf: Use "is not set" instead of "=n" Daan De Meyer
` (2 subsequent siblings)
3 siblings, 1 reply; 7+ messages in thread
From: Daan De Meyer @ 2022-12-05 13:16 UTC (permalink / raw)
To: bpf; +Cc: Daan De Meyer
When installing the selftests using
"make -C tools/testing/selftests install", we need to make sure
all the required files to run the selftests are installed. Let's
make sure this is the case.
Signed-off-by: Daan De Meyer <daan.j.demeyer@gmail.com>
---
tools/testing/selftests/bpf/Makefile | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile
index 6a0f043dc410..f6b8ffdde16f 100644
--- a/tools/testing/selftests/bpf/Makefile
+++ b/tools/testing/selftests/bpf/Makefile
@@ -532,8 +532,10 @@ TRUNNER_EXTRA_FILES := $(OUTPUT)/urandom_read $(OUTPUT)/bpf_testmod.ko \
$(OUTPUT)/liburandom_read.so \
$(OUTPUT)/xdp_synproxy \
$(OUTPUT)/sign-file \
- ima_setup.sh verify_sig_setup.sh \
- $(wildcard progs/btf_dump_test_case_*.c)
+ $(realpath ima_setup.sh) \
+ $(realpath verify_sig_setup.sh) \
+ $(wildcard progs/btf_dump_test_case_*.c) \
+ $(wildcard progs/*.bpf.o)
TRUNNER_BPF_BUILD_RULE := CLANG_BPF_BUILD_RULE
TRUNNER_BPF_CFLAGS := $(BPF_CFLAGS) $(CLANG_CFLAGS) -DENABLE_ATOMICS_TESTS
$(eval $(call DEFINE_TEST_RUNNER,test_progs))
--
2.38.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH bpf-next 2/3] selftests/bpf: Use "is not set" instead of "=n"
2022-12-05 13:16 [PATCH bpf-next 0/3] BPF selftests fixes Daan De Meyer
2022-12-05 13:16 ` [PATCH bpf-next 1/3] selftests/bpf: Install all required files to run selftests Daan De Meyer
@ 2022-12-05 13:16 ` Daan De Meyer
2022-12-05 13:16 ` [PATCH bpf-next 3/3] selftests/bpf: Use CONFIG_TEST_BPF=m instead of CONFIG_TEST_BPF=y Daan De Meyer
2022-12-07 0:40 ` [PATCH bpf-next 0/3] BPF selftests fixes patchwork-bot+netdevbpf
3 siblings, 0 replies; 7+ messages in thread
From: Daan De Meyer @ 2022-12-05 13:16 UTC (permalink / raw)
To: bpf; +Cc: Daan De Meyer
"=n" is not valid kconfig syntax. Use "is not set" instead to indicate
the option should be disabled.
Signed-off-by: Daan De Meyer <daan.j.demeyer@gmail.com>
---
tools/testing/selftests/bpf/config | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/bpf/config b/tools/testing/selftests/bpf/config
index f9034ea00bc9..3cbdbf57a403 100644
--- a/tools/testing/selftests/bpf/config
+++ b/tools/testing/selftests/bpf/config
@@ -8,7 +8,7 @@ CONFIG_BPF_LIRC_MODE2=y
CONFIG_BPF_LSM=y
CONFIG_BPF_STREAM_PARSER=y
CONFIG_BPF_SYSCALL=y
-CONFIG_BPF_UNPRIV_DEFAULT_OFF=n
+# CONFIG_BPF_UNPRIV_DEFAULT_OFF is not set
CONFIG_CGROUP_BPF=y
CONFIG_CRYPTO_HMAC=y
CONFIG_CRYPTO_SHA256=y
--
2.38.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH bpf-next 3/3] selftests/bpf: Use CONFIG_TEST_BPF=m instead of CONFIG_TEST_BPF=y
2022-12-05 13:16 [PATCH bpf-next 0/3] BPF selftests fixes Daan De Meyer
2022-12-05 13:16 ` [PATCH bpf-next 1/3] selftests/bpf: Install all required files to run selftests Daan De Meyer
2022-12-05 13:16 ` [PATCH bpf-next 2/3] selftests/bpf: Use "is not set" instead of "=n" Daan De Meyer
@ 2022-12-05 13:16 ` Daan De Meyer
2022-12-07 0:40 ` [PATCH bpf-next 0/3] BPF selftests fixes patchwork-bot+netdevbpf
3 siblings, 0 replies; 7+ messages in thread
From: Daan De Meyer @ 2022-12-05 13:16 UTC (permalink / raw)
To: bpf; +Cc: Daan De Meyer
CONFIG_TEST_BPF can only be a module, so let's indicate it as such in
the selftests config.
Signed-off-by: Daan De Meyer <daan.j.demeyer@gmail.com>
---
tools/testing/selftests/bpf/config | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/bpf/config b/tools/testing/selftests/bpf/config
index 3cbdbf57a403..75895bee8cb6 100644
--- a/tools/testing/selftests/bpf/config
+++ b/tools/testing/selftests/bpf/config
@@ -70,7 +70,7 @@ CONFIG_NF_NAT=y
CONFIG_RC_CORE=y
CONFIG_SECURITY=y
CONFIG_SECURITYFS=y
-CONFIG_TEST_BPF=y
+CONFIG_TEST_BPF=m
CONFIG_USERFAULTFD=y
CONFIG_VXLAN=y
CONFIG_XDP_SOCKETS=y
--
2.38.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH bpf-next 1/3] selftests/bpf: Install all required files to run selftests
2022-12-05 13:16 ` [PATCH bpf-next 1/3] selftests/bpf: Install all required files to run selftests Daan De Meyer
@ 2022-12-07 0:29 ` Andrii Nakryiko
2022-12-07 0:34 ` Andrii Nakryiko
0 siblings, 1 reply; 7+ messages in thread
From: Andrii Nakryiko @ 2022-12-07 0:29 UTC (permalink / raw)
To: Daan De Meyer; +Cc: bpf
On Mon, Dec 5, 2022 at 5:25 AM Daan De Meyer <daan.j.demeyer@gmail.com> wrote:
>
> When installing the selftests using
> "make -C tools/testing/selftests install", we need to make sure
> all the required files to run the selftests are installed. Let's
> make sure this is the case.
>
> Signed-off-by: Daan De Meyer <daan.j.demeyer@gmail.com>
> ---
> tools/testing/selftests/bpf/Makefile | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile
> index 6a0f043dc410..f6b8ffdde16f 100644
> --- a/tools/testing/selftests/bpf/Makefile
> +++ b/tools/testing/selftests/bpf/Makefile
> @@ -532,8 +532,10 @@ TRUNNER_EXTRA_FILES := $(OUTPUT)/urandom_read $(OUTPUT)/bpf_testmod.ko \
> $(OUTPUT)/liburandom_read.so \
> $(OUTPUT)/xdp_synproxy \
> $(OUTPUT)/sign-file \
> - ima_setup.sh verify_sig_setup.sh \
> - $(wildcard progs/btf_dump_test_case_*.c)
> + $(realpath ima_setup.sh) \
> + $(realpath verify_sig_setup.sh) \
why do we need realpath for these scripts, but it's ok to not do that
for *.bpf.o and btf_dump_test_case_*.c below?
> + $(wildcard progs/btf_dump_test_case_*.c) \
> + $(wildcard progs/*.bpf.o)
> TRUNNER_BPF_BUILD_RULE := CLANG_BPF_BUILD_RULE
> TRUNNER_BPF_CFLAGS := $(BPF_CFLAGS) $(CLANG_CFLAGS) -DENABLE_ATOMICS_TESTS
> $(eval $(call DEFINE_TEST_RUNNER,test_progs))
> --
> 2.38.1
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH bpf-next 1/3] selftests/bpf: Install all required files to run selftests
2022-12-07 0:29 ` Andrii Nakryiko
@ 2022-12-07 0:34 ` Andrii Nakryiko
0 siblings, 0 replies; 7+ messages in thread
From: Andrii Nakryiko @ 2022-12-07 0:34 UTC (permalink / raw)
To: Daan De Meyer; +Cc: bpf
On Tue, Dec 6, 2022 at 4:29 PM Andrii Nakryiko
<andrii.nakryiko@gmail.com> wrote:
>
> On Mon, Dec 5, 2022 at 5:25 AM Daan De Meyer <daan.j.demeyer@gmail.com> wrote:
> >
> > When installing the selftests using
> > "make -C tools/testing/selftests install", we need to make sure
> > all the required files to run the selftests are installed. Let's
> > make sure this is the case.
> >
> > Signed-off-by: Daan De Meyer <daan.j.demeyer@gmail.com>
> > ---
> > tools/testing/selftests/bpf/Makefile | 6 ++++--
> > 1 file changed, 4 insertions(+), 2 deletions(-)
> >
> > diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile
> > index 6a0f043dc410..f6b8ffdde16f 100644
> > --- a/tools/testing/selftests/bpf/Makefile
> > +++ b/tools/testing/selftests/bpf/Makefile
> > @@ -532,8 +532,10 @@ TRUNNER_EXTRA_FILES := $(OUTPUT)/urandom_read $(OUTPUT)/bpf_testmod.ko \
> > $(OUTPUT)/liburandom_read.so \
> > $(OUTPUT)/xdp_synproxy \
> > $(OUTPUT)/sign-file \
> > - ima_setup.sh verify_sig_setup.sh \
> > - $(wildcard progs/btf_dump_test_case_*.c)
> > + $(realpath ima_setup.sh) \
> > + $(realpath verify_sig_setup.sh) \
>
> why do we need realpath for these scripts, but it's ok to not do that
> for *.bpf.o and btf_dump_test_case_*.c below?
>
I dropped the $(realpath) change for now and applied the series.
Please let me know if I'm missing something.
>
> > + $(wildcard progs/btf_dump_test_case_*.c) \
> > + $(wildcard progs/*.bpf.o)
> > TRUNNER_BPF_BUILD_RULE := CLANG_BPF_BUILD_RULE
> > TRUNNER_BPF_CFLAGS := $(BPF_CFLAGS) $(CLANG_CFLAGS) -DENABLE_ATOMICS_TESTS
> > $(eval $(call DEFINE_TEST_RUNNER,test_progs))
> > --
> > 2.38.1
> >
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH bpf-next 0/3] BPF selftests fixes
2022-12-05 13:16 [PATCH bpf-next 0/3] BPF selftests fixes Daan De Meyer
` (2 preceding siblings ...)
2022-12-05 13:16 ` [PATCH bpf-next 3/3] selftests/bpf: Use CONFIG_TEST_BPF=m instead of CONFIG_TEST_BPF=y Daan De Meyer
@ 2022-12-07 0:40 ` patchwork-bot+netdevbpf
3 siblings, 0 replies; 7+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-12-07 0:40 UTC (permalink / raw)
To: Daan De Meyer; +Cc: bpf
Hello:
This series was applied to bpf/bpf-next.git (master)
by Andrii Nakryiko <andrii@kernel.org>:
On Mon, 5 Dec 2022 14:16:15 +0100 you wrote:
> This patch series fixes a few issues I've found while integrating the
> bpf selftests into systemd's mkosi development environment.
>
> Daan De Meyer (3):
> selftests/bpf: Install all required files to run selftests
> selftests/bpf: Use "is not set" instead of "=n"
> selftests/bpf: Use CONFIG_TEST_BPF=m instead of of CONFIG_TEST_BPF=y
>
> [...]
Here is the summary with links:
- [bpf-next,1/3] selftests/bpf: Install all required files to run selftests
https://git.kernel.org/bpf/bpf-next/c/d68ae4982cb7
- [bpf-next,2/3] selftests/bpf: Use "is not set" instead of "=n"
https://git.kernel.org/bpf/bpf-next/c/efe7fadbd59e
- [bpf-next,3/3] selftests/bpf: Use CONFIG_TEST_BPF=m instead of CONFIG_TEST_BPF=y
https://git.kernel.org/bpf/bpf-next/c/d0c0b48c8727
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-12-07 0:40 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-05 13:16 [PATCH bpf-next 0/3] BPF selftests fixes Daan De Meyer
2022-12-05 13:16 ` [PATCH bpf-next 1/3] selftests/bpf: Install all required files to run selftests Daan De Meyer
2022-12-07 0:29 ` Andrii Nakryiko
2022-12-07 0:34 ` Andrii Nakryiko
2022-12-05 13:16 ` [PATCH bpf-next 2/3] selftests/bpf: Use "is not set" instead of "=n" Daan De Meyer
2022-12-05 13:16 ` [PATCH bpf-next 3/3] selftests/bpf: Use CONFIG_TEST_BPF=m instead of CONFIG_TEST_BPF=y Daan De Meyer
2022-12-07 0:40 ` [PATCH bpf-next 0/3] BPF selftests fixes patchwork-bot+netdevbpf
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).