summaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/test_tc_tunnel.sh
diff options
context:
space:
mode:
authorWang Yufen <wangyufen@huawei.com>2022-10-20 11:05:34 +0800
committerAlexei Starovoitov <ast@kernel.org>2022-10-20 19:05:50 -0700
commit98af3746026c3eccb51b43181c41e001fe73f7af (patch)
treeaa4aceaa185b8b47bf1379081f28995670de16fb /tools/testing/selftests/bpf/test_tc_tunnel.sh
parentfb73a20ebe15b16dee68e226ec82f8e55c4d64f9 (diff)
downloadlinux-98af3746026c3eccb51b43181c41e001fe73f7af.tar.gz
linux-98af3746026c3eccb51b43181c41e001fe73f7af.tar.bz2
linux-98af3746026c3eccb51b43181c41e001fe73f7af.zip
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_tc_tunnel.sh')
-rwxr-xr-xtools/testing/selftests/bpf/test_tc_tunnel.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/testing/selftests/bpf/test_tc_tunnel.sh b/tools/testing/selftests/bpf/test_tc_tunnel.sh
index 088fcad138c9..334bdfeab940 100755
--- a/tools/testing/selftests/bpf/test_tc_tunnel.sh
+++ b/tools/testing/selftests/bpf/test_tc_tunnel.sh
@@ -3,6 +3,7 @@
#
# In-place tunneling
+BPF_FILE="test_tc_tunnel.bpf.o"
# must match the port that the bpf program filters on
readonly port=8000
@@ -196,7 +197,7 @@ verify_data
# client can no longer connect
ip netns exec "${ns1}" tc qdisc add dev veth1 clsact
ip netns exec "${ns1}" tc filter add dev veth1 egress \
- bpf direct-action object-file ./test_tc_tunnel.o \
+ bpf direct-action object-file ${BPF_FILE} \
section "encap_${tuntype}_${mac}"
echo "test bpf encap without decap (expect failure)"
server_listen
@@ -296,7 +297,7 @@ fi
ip netns exec "${ns2}" ip link del dev testtun0
ip netns exec "${ns2}" tc qdisc add dev veth2 clsact
ip netns exec "${ns2}" tc filter add dev veth2 ingress \
- bpf direct-action object-file ./test_tc_tunnel.o section decap
+ bpf direct-action object-file ${BPF_FILE} section decap
echo "test bpf encap with bpf decap"
client_connect
verify_data