summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/test_flow_dissector.sh
diff options
context:
space:
mode:
authorWang Yufen <wangyufen@huawei.com>2022-10-20 06:05:34 +0300
committerAlexei Starovoitov <ast@kernel.org>2022-10-21 05:05:50 +0300
commit98af3746026c3eccb51b43181c41e001fe73f7af (patch)
treeaa4aceaa185b8b47bf1379081f28995670de16fb /tools/testing/selftests/bpf/test_flow_dissector.sh
parentfb73a20ebe15b16dee68e226ec82f8e55c4d64f9 (diff)
downloadlinux-98af3746026c3eccb51b43181c41e001fe73f7af.tar.xz
selftests/bpf: fix missing BPF object files
After commit afef88e65554 ("selftests/bpf: Store BPF object files with .bpf.o extension"), we should use *.bpf.o instead of *.o. In addition, use the BPF_FILE variable to save the BPF object file name, which can be better identified and modified. Fixes: afef88e65554 ("selftests/bpf: Store BPF object files with .bpf.o extension") Signed-off-by: Wang Yufen <wangyufen@huawei.com> Acked-by: Stanislav Fomichev <sdf@google.com> Link: https://lore.kernel.org/r/1666235134-562-1-git-send-email-wangyufen@huawei.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf/test_flow_dissector.sh')
-rwxr-xr-xtools/testing/selftests/bpf/test_flow_dissector.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/testing/selftests/bpf/test_flow_dissector.sh b/tools/testing/selftests/bpf/test_flow_dissector.sh
index 5303ce0c977b..4b298863797a 100755
--- a/tools/testing/selftests/bpf/test_flow_dissector.sh
+++ b/tools/testing/selftests/bpf/test_flow_dissector.sh
@@ -2,6 +2,8 @@
# SPDX-License-Identifier: GPL-2.0
#
# Load BPF flow dissector and verify it correctly dissects traffic
+
+BPF_FILE="bpf_flow.bpf.o"
export TESTNAME=test_flow_dissector
unmount=0
@@ -22,7 +24,7 @@ if [[ -z $(ip netns identify $$) ]]; then
if bpftool="$(which bpftool)"; then
echo "Testing global flow dissector..."
- $bpftool prog loadall ./bpf_flow.o /sys/fs/bpf/flow \
+ $bpftool prog loadall $BPF_FILE /sys/fs/bpf/flow \
type flow_dissector
if ! unshare --net $bpftool prog attach pinned \
@@ -95,7 +97,7 @@ else
fi
# Attach BPF program
-./flow_dissector_load -p bpf_flow.o -s _dissect
+./flow_dissector_load -p $BPF_FILE -s _dissect
# Setup
tc qdisc add dev lo ingress