Skip to content

Commit f664f9c

Browse files
jie2xzhouborkmann
authored andcommitted
bpf/selftests: Fix couldn't retrieve pinned program in xdp veth test
Before change: selftests: bpf: test_xdp_veth.sh Couldn't retrieve pinned program '/sys/fs/bpf/test_xdp_veth/progs/redirect_map_0': No such file or directory selftests: xdp_veth [SKIP] ok 20 selftests: bpf: test_xdp_veth.sh # SKIP After change: PING 10.1.1.33 (10.1.1.33) 56(84) bytes of data. 64 bytes from 10.1.1.33: icmp_seq=1 ttl=64 time=0.320 ms --- 10.1.1.33 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.320/0.320/0.320/0.000 ms selftests: xdp_veth [PASS] For the test case, the following can be found: ls /sys/fs/bpf/test_xdp_veth/progs/redirect_map_0 ls: cannot access '/sys/fs/bpf/test_xdp_veth/progs/redirect_map_0': No such file or directory ls /sys/fs/bpf/test_xdp_veth/progs/ xdp_redirect_map_0 xdp_redirect_map_1 xdp_redirect_map_2 Reported-by: kernel test robot <[email protected]> Signed-off-by: Jie2x Zhou <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
1 parent e423414 commit f664f9c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tools/testing/selftests/bpf/test_xdp_veth.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,9 @@ bpftool prog loadall \
106106
bpftool map update pinned $BPF_DIR/maps/tx_port key 0 0 0 0 value 122 0 0 0
107107
bpftool map update pinned $BPF_DIR/maps/tx_port key 1 0 0 0 value 133 0 0 0
108108
bpftool map update pinned $BPF_DIR/maps/tx_port key 2 0 0 0 value 111 0 0 0
109-
ip link set dev veth1 xdp pinned $BPF_DIR/progs/redirect_map_0
110-
ip link set dev veth2 xdp pinned $BPF_DIR/progs/redirect_map_1
111-
ip link set dev veth3 xdp pinned $BPF_DIR/progs/redirect_map_2
109+
ip link set dev veth1 xdp pinned $BPF_DIR/progs/xdp_redirect_map_0
110+
ip link set dev veth2 xdp pinned $BPF_DIR/progs/xdp_redirect_map_1
111+
ip link set dev veth3 xdp pinned $BPF_DIR/progs/xdp_redirect_map_2
112112

113113
ip -n ${NS1} link set dev veth11 xdp obj xdp_dummy.o sec xdp
114114
ip -n ${NS2} link set dev veth22 xdp obj xdp_tx.o sec xdp

0 commit comments

Comments
 (0)