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

selftests/bpf: Add missing files required by test_bpftool.sh for installing

test_bpftool.sh relies on bpftool and test_bpftool.py.

'make install' will install bpftool to INSTALL_PATH/bpf/bpftool, and
export it to PATH so that it can be used after installing.

Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20210820015556.23276-5-lizhijian@cn.fujitsu.com

authored by

Li Zhijian and committed by
Alexei Starovoitov
404bd9ff 7a3bdca2

+5 -2
+3 -1
tools/testing/selftests/bpf/Makefile
··· 79 79 80 80 TEST_PROGS_EXTENDED := with_addr.sh \ 81 81 with_tunnels.sh \ 82 - test_xdp_vlan.sh 82 + test_xdp_vlan.sh test_bpftool.py 83 83 84 84 # Compile but not part of 'make run_tests' 85 85 TEST_GEN_PROGS_EXTENDED = test_sock_addr test_skb_cgroup_id_user \ ··· 186 186 OUTPUT=$(SCRATCH_DIR)/ VMLINUX_BTF=$(VMLINUX_BTF) \ 187 187 BPFOBJ=$(BPFOBJ) BPF_INCLUDE=$(INCLUDE_DIR) && \ 188 188 cp $(SCRATCH_DIR)/runqslower $@ 189 + 190 + TEST_GEN_PROGS_EXTENDED += $(DEFAULT_BPFTOOL) 189 191 190 192 $(TEST_GEN_PROGS) $(TEST_GEN_PROGS_EXTENDED): $(OUTPUT)/test_stub.o $(BPFOBJ) 191 193
+2 -1
tools/testing/selftests/bpf/test_bpftool.sh
··· 2 2 # SPDX-License-Identifier: GPL-2.0 3 3 # Copyright (c) 2020 SUSE LLC. 4 4 5 + # 'make -C tools/testing/selftests/bpf install' will install to SCRIPT_DIR 5 6 SCRIPT_DIR=$(dirname $(realpath $0)) 6 7 7 8 # 'make -C tools/testing/selftests/bpf' will install to BPFTOOL_INSTALL_PATH 8 9 BPFTOOL_INSTALL_PATH="$SCRIPT_DIR"/tools/sbin 9 - export PATH=$BPFTOOL_INSTALL_PATH:$PATH 10 + export PATH=$SCRIPT_DIR:$BPFTOOL_INSTALL_PATH:$PATH 10 11 python3 -m unittest -v test_bpftool.TestBpftool