bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf-next] selftests/bpf: improve bpftool changes detection
@ 2020-01-24  5:41 Andrii Nakryiko
  2020-01-24  7:03 ` [Potential Spoof] " Martin Lau
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Andrii Nakryiko @ 2020-01-24  5:41 UTC (permalink / raw)
  To: bpf, netdev, ast, daniel; +Cc: andrii.nakryiko, kernel-team, Andrii Nakryiko

Detect when bpftool source code changes and trigger rebuild within
selftests/bpf Makefile. Also fix few small formatting problems.

Signed-off-by: Andrii Nakryiko <andriin@fb.com>
---
 tools/testing/selftests/bpf/Makefile | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile
index 5f41f5bd8033..257a1aaaa37d 100644
--- a/tools/testing/selftests/bpf/Makefile
+++ b/tools/testing/selftests/bpf/Makefile
@@ -155,16 +155,17 @@ $(OUTPUT)/test_sysctl: cgroup_helpers.c
 
 DEFAULT_BPFTOOL := $(SCRATCH_DIR)/sbin/bpftool
 BPFTOOL ?= $(DEFAULT_BPFTOOL)
-$(DEFAULT_BPFTOOL): $(BPFOBJ) | $(BUILD_DIR)/bpftool
-	$(Q)$(MAKE) $(submake_extras)  -C $(BPFTOOLDIR)			\
-		    OUTPUT=$(BUILD_DIR)/bpftool/			\
+$(DEFAULT_BPFTOOL): $(wildcard $(BPFTOOLDIR)/*.[ch] $(BPFTOOLDIR)/Makefile)    \
+		    $(BPFOBJ) | $(BUILD_DIR)/bpftool
+	$(Q)$(MAKE) $(submake_extras)  -C $(BPFTOOLDIR)			       \
+		    OUTPUT=$(BUILD_DIR)/bpftool/			       \
 		    prefix= DESTDIR=$(SCRATCH_DIR)/ install
 
-$(BPFOBJ): $(wildcard $(BPFDIR)/*.c $(BPFDIR)/*.h $(BPFDIR)/Makefile)          \
+$(BPFOBJ): $(wildcard $(BPFDIR)/*.[ch] $(BPFDIR)/Makefile)		       \
 	   ../../../include/uapi/linux/bpf.h                                   \
 	   | $(INCLUDE_DIR) $(BUILD_DIR)/libbpf
 	$(Q)$(MAKE) $(submake_extras) -C $(BPFDIR) OUTPUT=$(BUILD_DIR)/libbpf/ \
-		DESTDIR=$(SCRATCH_DIR) prefix= all install_headers
+		    DESTDIR=$(SCRATCH_DIR) prefix= all install_headers
 
 $(BUILD_DIR)/libbpf $(BUILD_DIR)/bpftool $(INCLUDE_DIR):
 	$(call msg,MKDIR,,$@)
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Potential Spoof] [PATCH bpf-next] selftests/bpf: improve bpftool changes detection
  2020-01-24  5:41 [PATCH bpf-next] selftests/bpf: improve bpftool changes detection Andrii Nakryiko
@ 2020-01-24  7:03 ` Martin Lau
  2020-01-24  9:53 ` Toke Høiland-Jørgensen
  2020-01-24 10:11 ` Daniel Borkmann
  2 siblings, 0 replies; 4+ messages in thread
From: Martin Lau @ 2020-01-24  7:03 UTC (permalink / raw)
  To: Andrii Nakryiko
  Cc: bpf, netdev, Alexei Starovoitov, daniel, andrii.nakryiko, Kernel Team

On Thu, Jan 23, 2020 at 09:41:48PM -0800, Andrii Nakryiko wrote:
> Detect when bpftool source code changes and trigger rebuild within
> selftests/bpf Makefile. Also fix few small formatting problems.
Acked-by: Martin KaFai Lau <kafai@fb.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH bpf-next] selftests/bpf: improve bpftool changes detection
  2020-01-24  5:41 [PATCH bpf-next] selftests/bpf: improve bpftool changes detection Andrii Nakryiko
  2020-01-24  7:03 ` [Potential Spoof] " Martin Lau
@ 2020-01-24  9:53 ` Toke Høiland-Jørgensen
  2020-01-24 10:11 ` Daniel Borkmann
  2 siblings, 0 replies; 4+ messages in thread
From: Toke Høiland-Jørgensen @ 2020-01-24  9:53 UTC (permalink / raw)
  To: Andrii Nakryiko, bpf, netdev, ast, daniel
  Cc: andrii.nakryiko, kernel-team, Andrii Nakryiko

Andrii Nakryiko <andriin@fb.com> writes:

> Detect when bpftool source code changes and trigger rebuild within
> selftests/bpf Makefile. Also fix few small formatting problems.
>
> Signed-off-by: Andrii Nakryiko <andriin@fb.com>

Thanks for taking care of this!

Acked-by: Toke Høiland-Jørgensen <toke@redhat.com>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH bpf-next] selftests/bpf: improve bpftool changes detection
  2020-01-24  5:41 [PATCH bpf-next] selftests/bpf: improve bpftool changes detection Andrii Nakryiko
  2020-01-24  7:03 ` [Potential Spoof] " Martin Lau
  2020-01-24  9:53 ` Toke Høiland-Jørgensen
@ 2020-01-24 10:11 ` Daniel Borkmann
  2 siblings, 0 replies; 4+ messages in thread
From: Daniel Borkmann @ 2020-01-24 10:11 UTC (permalink / raw)
  To: Andrii Nakryiko, bpf, netdev, ast; +Cc: andrii.nakryiko, kernel-team

On 1/24/20 6:41 AM, Andrii Nakryiko wrote:
> Detect when bpftool source code changes and trigger rebuild within
> selftests/bpf Makefile. Also fix few small formatting problems.
> 
> Signed-off-by: Andrii Nakryiko <andriin@fb.com>

Applied, thanks!

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-01-24 10:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-24  5:41 [PATCH bpf-next] selftests/bpf: improve bpftool changes detection Andrii Nakryiko
2020-01-24  7:03 ` [Potential Spoof] " Martin Lau
2020-01-24  9:53 ` Toke Høiland-Jørgensen
2020-01-24 10:11 ` Daniel Borkmann

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).