]> git.baikalelectronics.ru Git - kernel.git/commit
bpf, selftests: Make redirect_neigh test more extensible
authorDaniel Borkmann <daniel@iogearbox.net>
Sat, 10 Oct 2020 23:40:05 +0000 (01:40 +0200)
committerAlexei Starovoitov <ast@kernel.org>
Sun, 11 Oct 2020 17:21:04 +0000 (10:21 -0700)
commit94534af3b94434e3440a213f6935885744e57db8
treee325023ab6e74e832f602e330cee75f463f3ec7f
parenta511cdc5255c159547637e88698d07c799f8b876
bpf, selftests: Make redirect_neigh test more extensible

Rename into test_tc_redirect.sh and move setup and test code into separate
functions so they can be reused for newly added tests in here. Also remove
the crude hack to override ifindex inside the object file via xxd and sed
and just use a simple map instead. Map given iproute2 does not support BTF
fully and therefore neither global data at this point.

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Yonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/bpf/20201010234006.7075-6-daniel@iogearbox.net
tools/testing/selftests/bpf/progs/test_tc_neigh.c
tools/testing/selftests/bpf/test_tc_neigh.sh [deleted file]
tools/testing/selftests/bpf/test_tc_redirect.sh [new file with mode: 0755]