public inbox for bpf@vger.kernel.org
 help / color / mirror / Atom feed
From: Yauheni Kaliuta <yauheni.kaliuta@redhat.com>
To: Andrii Nakryiko <andrii.nakryiko@gmail.com>
Cc: bpf <bpf@vger.kernel.org>, Jiri Benc <jbenc@redhat.com>,
	Jiri Olsa <jolsa@redhat.com>, Andrii Nakryiko <andriin@fb.com>,
	Daniel Borkmann <daniel@iogearbox.net>
Subject: Re: [PATCH] selftests/bpf: install btf .c files
Date: Wed, 20 May 2020 09:16:23 +0300	[thread overview]
Message-ID: <xuny7dx7nnbc.fsf@redhat.com> (raw)
In-Reply-To: <CAEf4Bzb-FjHtH9dyVtjZf7FYBB2BiPs0mK8ZoqH3B9iU5Hz7Mg@mail.gmail.com> (Andrii Nakryiko's message of "Tue, 19 May 2020 12:09:36 -0700")

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


  reply	other threads:[~2020-05-20  6:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2020-05-20 21:45     ` Andrii Nakryiko

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=xuny7dx7nnbc.fsf@redhat.com \
    --to=yauheni.kaliuta@redhat.com \
    --cc=andrii.nakryiko@gmail.com \
    --cc=andriin@fb.com \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=jbenc@redhat.com \
    --cc=jolsa@redhat.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