From: Roman Gushchin Subject: [PATCH v3 net-next 4/5] bpf: move cgroup_helpers from samples/bpf/ to tools/testing/selftesting/bpf/ Date: Thu, 2 Nov 2017 13:15:29 -0400 Message-ID: <20171102171530.7627-5-guro@fb.com> References: <20171102171530.7627-1-guro@fb.com> Mime-Version: 1.0 Content-Type: text/plain Cc: Tejun Heo , Alexei Starovoitov , Daniel Borkmann , , , Roman Gushchin To: Return-path: Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:47906 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754910AbdKBRQj (ORCPT ); Thu, 2 Nov 2017 13:16:39 -0400 In-Reply-To: <20171102171530.7627-1-guro@fb.com> Sender: netdev-owner@vger.kernel.org List-ID: The purpose of this move is to use these files in bpf tests. Signed-off-by: Roman Gushchin Acked-by: Alexei Starovoitov Acked-by: Tejun Heo Cc: Daniel Borkmann --- samples/bpf/Makefile | 5 +++-- tools/testing/selftests/bpf/Makefile | 2 +- {samples => tools/testing/selftests}/bpf/cgroup_helpers.c | 0 {samples => tools/testing/selftests}/bpf/cgroup_helpers.h | 0 4 files changed, 4 insertions(+), 3 deletions(-) rename {samples => tools/testing/selftests}/bpf/cgroup_helpers.c (100%) rename {samples => tools/testing/selftests}/bpf/cgroup_helpers.h (100%) diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile index ea2b9e6135f3..adb1e5dba1ea 100644 --- a/samples/bpf/Makefile +++ b/samples/bpf/Makefile @@ -45,6 +45,7 @@ hostprogs-y += syscall_tp # Libbpf dependencies LIBBPF := ../../tools/lib/bpf/bpf.o +CGROUP_HELPERS := ../../tools/testing/selftests/bpf/cgroup_helpers.o test_lru_dist-objs := test_lru_dist.o $(LIBBPF) sock_example-objs := sock_example.o $(LIBBPF) @@ -68,13 +69,13 @@ map_perf_test-objs := bpf_load.o $(LIBBPF) map_perf_test_user.o test_overhead-objs := bpf_load.o $(LIBBPF) test_overhead_user.o test_cgrp2_array_pin-objs := $(LIBBPF) test_cgrp2_array_pin.o test_cgrp2_attach-objs := $(LIBBPF) test_cgrp2_attach.o -test_cgrp2_attach2-objs := $(LIBBPF) test_cgrp2_attach2.o cgroup_helpers.o +test_cgrp2_attach2-objs := $(LIBBPF) test_cgrp2_attach2.o $(CGROUP_HELPERS) test_cgrp2_sock-objs := $(LIBBPF) test_cgrp2_sock.o test_cgrp2_sock2-objs := bpf_load.o $(LIBBPF) test_cgrp2_sock2.o xdp1-objs := bpf_load.o $(LIBBPF) xdp1_user.o # reuse xdp1 source intentionally xdp2-objs := bpf_load.o $(LIBBPF) xdp1_user.o -test_current_task_under_cgroup-objs := bpf_load.o $(LIBBPF) cgroup_helpers.o \ +test_current_task_under_cgroup-objs := bpf_load.o $(LIBBPF) $(CGROUP_HELPERS) \ test_current_task_under_cgroup_user.o trace_event-objs := bpf_load.o $(LIBBPF) trace_event_user.o sampleip-objs := bpf_load.o $(LIBBPF) sampleip_user.o diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile index 2e7880ea0add..36c34f0218a3 100644 --- a/tools/testing/selftests/bpf/Makefile +++ b/tools/testing/selftests/bpf/Makefile @@ -22,7 +22,7 @@ TEST_PROGS := test_kmod.sh test_xdp_redirect.sh test_xdp_meta.sh include ../lib.mk -BPFOBJ := $(OUTPUT)/libbpf.a +BPFOBJ := $(OUTPUT)/libbpf.a $(OUTPUT)/cgroup_helpers.c $(TEST_GEN_PROGS): $(BPFOBJ) diff --git a/samples/bpf/cgroup_helpers.c b/tools/testing/selftests/bpf/cgroup_helpers.c similarity index 100% rename from samples/bpf/cgroup_helpers.c rename to tools/testing/selftests/bpf/cgroup_helpers.c diff --git a/samples/bpf/cgroup_helpers.h b/tools/testing/selftests/bpf/cgroup_helpers.h similarity index 100% rename from samples/bpf/cgroup_helpers.h rename to tools/testing/selftests/bpf/cgroup_helpers.h -- 2.13.6