]> git.proxmox.com Git - mirror_ubuntu-hirsute-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)
commit57a73fe7c1988ae726de23ee7c3c49ca82221751
treee325023ab6e74e832f602e330cee75f463f3ec7f
parent6775dab73bdc17df0f19d9f9d7470dc54536a909
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]