Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

tools/bpf: permit selftests/bpf to be built in a different directory

Fix a couple of issues at tools/testing/selftests/bpf/Makefile so
the following command
make -C tools/testing/selftests/bpf OUTPUT=/home/yhs/tmp
can put the built results into a different directory.

Also add the built binary test_tcpbpf_user in the .gitignore file.

Fixes: 6882804c916b ("selftests/bpf: add a test for overlapping packet range checks")
Fixes: 9d1f15941967 ("bpf: move cgroup_helpers from samples/bpf/ to tools/testing/selftesting/bpf/")
Signed-off-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>

authored by

Yonghong Song and committed by
Daniel Borkmann
62a06994 e029f541

+3 -2
+1
tools/testing/selftests/bpf/.gitignore
··· 8 8 test_align 9 9 test_dev_cgroup 10 10 test_progs 11 + test_tcpbpf_user 11 12 test_verifier_log 12 13 feature
+2 -2
tools/testing/selftests/bpf/Makefile
··· 27 27 28 28 include ../lib.mk 29 29 30 - BPFOBJ := $(OUTPUT)/libbpf.a $(OUTPUT)/cgroup_helpers.c 30 + BPFOBJ := $(OUTPUT)/libbpf.a cgroup_helpers.c 31 31 32 32 $(TEST_GEN_PROGS): $(BPFOBJ) 33 33 ··· 58 58 $(OUTPUT)/test_l4lb_noinline.o: CLANG_FLAGS += -fno-inline 59 59 $(OUTPUT)/test_xdp_noinline.o: CLANG_FLAGS += -fno-inline 60 60 61 - %.o: %.c 61 + $(OUTPUT)/%.o: %.c 62 62 $(CLANG) $(CLANG_FLAGS) \ 63 63 -O2 -target bpf -emit-llvm -c $< -o - | \ 64 64 $(LLC) -march=bpf -mcpu=$(CPU) -filetype=obj -o $@