]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/bpf: Rewrite test_tc_redirect.sh as prog_tests/tc_redirect.c
authorJussi Maki <joamaki@gmail.com>
Wed, 5 May 2021 08:59:25 +0000 (08:59 +0000)
committerDaniel Borkmann <daniel@iogearbox.net>
Tue, 11 May 2021 21:15:43 +0000 (23:15 +0200)
commit15536c439a279d19dc36d6c20aea5e102118cd4e
treed9cf88c53d32c305982876d7d5b6407f0577463e
parentca00716fc979fb1c444d3fc6c994c8b6e180b192
selftests/bpf: Rewrite test_tc_redirect.sh as prog_tests/tc_redirect.c

As discussed in [0], this ports test_tc_redirect.sh to the test_progs
framework and removes the old test.

This makes it more in line with rest of the tests and makes it possible
to run this test case with vmtest.sh and under the bpf CI.

The upcoming skb_change_head() helper fix in [0] is depending on it and
extending the test case to redirect a packet from L3 device to veth.

  [0] https://lore.kernel.org/bpf/20210427135550.807355-1-joamaki@gmail.com

Signed-off-by: Jussi Maki <joamaki@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20210505085925.783985-1-joamaki@gmail.com
tools/testing/selftests/bpf/network_helpers.c
tools/testing/selftests/bpf/network_helpers.h
tools/testing/selftests/bpf/prog_tests/tc_redirect.c [new file with mode: 0644]
tools/testing/selftests/bpf/progs/test_tc_neigh.c
tools/testing/selftests/bpf/progs/test_tc_neigh_fib.c
tools/testing/selftests/bpf/progs/test_tc_peer.c
tools/testing/selftests/bpf/test_tc_redirect.sh [deleted file]