* [PATCH] selftests/bpf: install btf .c files
@ 2020-05-19 8:49 Yauheni Kaliuta
2020-05-19 19:09 ` Andrii Nakryiko
0 siblings, 1 reply; 4+ messages in thread
From: Yauheni Kaliuta @ 2020-05-19 8:49 UTC (permalink / raw)
To: bpf; +Cc: Jiri Benc, Jiri Olsa, Andrii Nakryiko, Daniel Borkmann
Some .c files used by test_progs to check btf and they are missing
from installation after commit 74b5a5968fe8 ("selftests/bpf: Replace
test_progs and test_maps w/ general rule").
Take them back.
Fixes: 74b5a5968fe8 ("selftests/bpf: Replace test_progs and
test_maps w/ general rule")
Signed-off-by: Yauheni Kaliuta <yauheni.kaliuta@redhat.com>
---
tools/testing/selftests/bpf/Makefile | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile
index e716e931d0c9..d96440732905 100644
--- a/tools/testing/selftests/bpf/Makefile
+++ b/tools/testing/selftests/bpf/Makefile
@@ -46,6 +46,9 @@ TEST_GEN_FILES =
TEST_FILES = test_lwt_ip_encap.o \
test_tc_edt.o
+BTF_C_FILES = $(wildcard progs/btf_dump_test_case_*.c)
+TEST_FILES += $(BTF_C_FILES)
+
# Order correspond to 'make run_tests' order
TEST_PROGS := test_kmod.sh \
test_xdp_redirect.sh \
--
2.26.2
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] selftests/bpf: install btf .c files 2020-05-19 8:49 [PATCH] selftests/bpf: install btf .c files Yauheni Kaliuta @ 2020-05-19 19:09 ` Andrii Nakryiko 2020-05-20 6:16 ` Yauheni Kaliuta 0 siblings, 1 reply; 4+ messages in thread From: Andrii Nakryiko @ 2020-05-19 19:09 UTC (permalink / raw) To: Yauheni Kaliuta Cc: bpf, Jiri Benc, Jiri Olsa, Andrii Nakryiko, Daniel Borkmann On Tue, May 19, 2020 at 1:50 AM Yauheni Kaliuta <yauheni.kaliuta@redhat.com> wrote: > > Some .c files used by test_progs to check btf and they are missing > from installation after commit 74b5a5968fe8 ("selftests/bpf: Replace > test_progs and test_maps w/ general rule"). > > Take them back. > > Fixes: 74b5a5968fe8 ("selftests/bpf: Replace test_progs and > test_maps w/ general rule") > > Signed-off-by: Yauheni Kaliuta <yauheni.kaliuta@redhat.com> > --- > tools/testing/selftests/bpf/Makefile | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile > index e716e931d0c9..d96440732905 100644 > --- a/tools/testing/selftests/bpf/Makefile > +++ b/tools/testing/selftests/bpf/Makefile > @@ -46,6 +46,9 @@ TEST_GEN_FILES = > TEST_FILES = test_lwt_ip_encap.o \ > test_tc_edt.o > > +BTF_C_FILES = $(wildcard progs/btf_dump_test_case_*.c) > +TEST_FILES += $(BTF_C_FILES) Can you please re-use BTF_C_FILES in TRUNNER_EXTRA_FILES := assignment on line 357? See also $(TRUNNER_BINARY)-extras rule. For "flavored" test_progs runners (e.g., test_progs-no_alu32), those files need to be copied into no_alu32 sub-directory (same for BPF .o files, actually). Unless you don't want to run flavored test_progs, of course. > # Order correspond to 'make run_tests' order > TEST_PROGS := test_kmod.sh \ > test_xdp_redirect.sh \ > -- > 2.26.2 > ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] selftests/bpf: install btf .c files 2020-05-19 19:09 ` Andrii Nakryiko @ 2020-05-20 6:16 ` Yauheni Kaliuta 2020-05-20 21:45 ` Andrii Nakryiko 0 siblings, 1 reply; 4+ messages in thread From: Yauheni Kaliuta @ 2020-05-20 6:16 UTC (permalink / raw) To: Andrii Nakryiko Cc: bpf, Jiri Benc, Jiri Olsa, Andrii Nakryiko, Daniel Borkmann Hi, Andrii! >>>>> On Tue, 19 May 2020 12:09:36 -0700, Andrii Nakryiko wrote: > On Tue, May 19, 2020 at 1:50 AM Yauheni Kaliuta > <yauheni.kaliuta@redhat.com> wrote: >> >> Some .c files used by test_progs to check btf and they are missing >> from installation after commit 74b5a5968fe8 ("selftests/bpf: Replace >> test_progs and test_maps w/ general rule"). >> >> Take them back. >> >> Fixes: 74b5a5968fe8 ("selftests/bpf: Replace test_progs and >> test_maps w/ general rule") >> >> Signed-off-by: Yauheni Kaliuta <yauheni.kaliuta@redhat.com> >> --- >> tools/testing/selftests/bpf/Makefile | 3 +++ >> 1 file changed, 3 insertions(+) >> >> diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile >> index e716e931d0c9..d96440732905 100644 >> --- a/tools/testing/selftests/bpf/Makefile >> +++ b/tools/testing/selftests/bpf/Makefile >> @@ -46,6 +46,9 @@ TEST_GEN_FILES = >> TEST_FILES = test_lwt_ip_encap.o \ >> test_tc_edt.o >> >> +BTF_C_FILES = $(wildcard progs/btf_dump_test_case_*.c) >> +TEST_FILES += $(BTF_C_FILES) > Can you please re-use BTF_C_FILES in TRUNNER_EXTRA_FILES := > assignment on line 357? Do you mean this: From 45ce4975303de9e0abc733f68583a50478733071 Mon Sep 17 00:00:00 2001 From: Yauheni Kaliuta <yauheni.kaliuta@redhat.com> Date: Tue, 19 May 2020 11:35:52 +0300 Subject: [PATCH] selftests/bpf: install btf .c files Some .c files used by test_progs to check btf and they are missing from installation after commit 74b5a5968fe8 ("selftests/bpf: Replace test_progs and test_maps w/ general rule"). Take them back. Reuse BTF_C_FILES for TRUNNER_EXTRA_FILES. Fixes: 74b5a5968fe8 ("selftests/bpf: Replace test_progs and test_maps w/ general rule") Signed-off-by: Yauheni Kaliuta <yauheni.kaliuta@redhat.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 e716e931d0c9..3ab4b6937987 100644 --- a/tools/testing/selftests/bpf/Makefile +++ b/tools/testing/selftests/bpf/Makefile @@ -46,6 +46,9 @@ TEST_GEN_FILES = TEST_FILES = test_lwt_ip_encap.o \ test_tc_edt.o +BTF_C_FILES = $(wildcard progs/btf_dump_test_case_*.c) +TEST_FILES += $(BTF_C_FILES) + # Order correspond to 'make run_tests' order TEST_PROGS := test_kmod.sh \ test_xdp_redirect.sh \ @@ -357,8 +360,7 @@ TRUNNER_BPF_PROGS_DIR := progs TRUNNER_EXTRA_SOURCES := test_progs.c cgroup_helpers.c trace_helpers.c \ network_helpers.c testing_helpers.c \ flow_dissector_load.h -TRUNNER_EXTRA_FILES := $(OUTPUT)/urandom_read \ - $(wildcard progs/btf_dump_test_case_*.c) +TRUNNER_EXTRA_FILES := $(OUTPUT)/urandom_read $(BTF_C_FILES) TRUNNER_BPF_BUILD_RULE := CLANG_BPF_BUILD_RULE TRUNNER_BPF_CFLAGS := $(BPF_CFLAGS) $(CLANG_CFLAGS) TRUNNER_BPF_LDFLAGS := -mattr=+alu32 -- 2.26.2 ? > See also $(TRUNNER_BINARY)-extras rule. For "flavored" > test_progs runners (e.g., test_progs-no_alu32), those files > need to be copied into no_alu32 sub-directory (same for BPF .o > files, actually). Unless you don't want to run flavored > test_progs, of course. Thanks, I'll have a look. >> # Order correspond to 'make run_tests' order >> TEST_PROGS := test_kmod.sh \ >> test_xdp_redirect.sh \ >> -- >> 2.26.2 >> -- WBR, Yauheni Kaliuta ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] selftests/bpf: install btf .c files 2020-05-20 6:16 ` Yauheni Kaliuta @ 2020-05-20 21:45 ` Andrii Nakryiko 0 siblings, 0 replies; 4+ messages in thread From: Andrii Nakryiko @ 2020-05-20 21:45 UTC (permalink / raw) To: Yauheni Kaliuta Cc: bpf, Jiri Benc, Jiri Olsa, Andrii Nakryiko, Daniel Borkmann On Tue, May 19, 2020 at 11:16 PM Yauheni Kaliuta <yauheni.kaliuta@redhat.com> wrote: > > Hi, Andrii! > > >>>>> On Tue, 19 May 2020 12:09:36 -0700, Andrii Nakryiko wrote: > > > On Tue, May 19, 2020 at 1:50 AM Yauheni Kaliuta > > <yauheni.kaliuta@redhat.com> wrote: > >> > >> Some .c files used by test_progs to check btf and they are missing > >> from installation after commit 74b5a5968fe8 ("selftests/bpf: Replace > >> test_progs and test_maps w/ general rule"). > >> > >> Take them back. > >> > >> Fixes: 74b5a5968fe8 ("selftests/bpf: Replace test_progs and > >> test_maps w/ general rule") > >> > >> Signed-off-by: Yauheni Kaliuta <yauheni.kaliuta@redhat.com> > >> --- > >> tools/testing/selftests/bpf/Makefile | 3 +++ > >> 1 file changed, 3 insertions(+) > >> > >> diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile > >> index e716e931d0c9..d96440732905 100644 > >> --- a/tools/testing/selftests/bpf/Makefile > >> +++ b/tools/testing/selftests/bpf/Makefile > >> @@ -46,6 +46,9 @@ TEST_GEN_FILES = > >> TEST_FILES = test_lwt_ip_encap.o \ > >> test_tc_edt.o > >> > >> +BTF_C_FILES = $(wildcard progs/btf_dump_test_case_*.c) > >> +TEST_FILES += $(BTF_C_FILES) > > > Can you please re-use BTF_C_FILES in TRUNNER_EXTRA_FILES := > > assignment on line 357? > > Do you mean this: Yes, you can add my Acked-by: Andrii Nakryiko <andriin@fb.com>. Test_progs flavors can be addressed separately, I think. [...] ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-05-20 21:45 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2020-05-19 8:49 [PATCH] selftests/bpf: install btf .c files Yauheni Kaliuta 2020-05-19 19:09 ` Andrii Nakryiko 2020-05-20 6:16 ` Yauheni Kaliuta 2020-05-20 21:45 ` Andrii Nakryiko
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox