]> git.baikalelectronics.ru Git - kernel.git/commit
bpf/selftests: Fix couldn't retrieve pinned program in xdp veth test
authorJie2x Zhou <jie2x.zhou@intel.com>
Tue, 19 Jul 2022 08:24:30 +0000 (16:24 +0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Fri, 22 Jul 2022 17:23:04 +0000 (19:23 +0200)
commit320ced37736375a8fbd154265dded4e46715fbac
treea6ab2c0f225f7eb5323992ac8df20c805da42cbd
parentc0d199214d8b1d534ab4e4a8d0a5e954fc83fbf2
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 <lkp@intel.com>
Signed-off-by: Jie2x Zhou <jie2x.zhou@intel.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20220719082430.9916-1-jie2x.zhou@intel.com
tools/testing/selftests/bpf/test_xdp_veth.sh