selftests/bpf: Extend SK_REUSEPORT tests to cover SOCKMAP/SOCKHASH
authorJakub Sitnicki <jakub@cloudflare.com>
Tue, 18 Feb 2020 17:10:22 +0000 (17:10 +0000)
committerDaniel Borkmann <daniel@iogearbox.net>
Fri, 21 Feb 2020 21:29:45 +0000 (22:29 +0100)
commit11318ba8cafd59105637b2b82b8a32719e44a2d2
treec563226648eec517924dd38d80970ffacd337992
parent035ff358f2d9e2f5e1639ba4defe4dc40ac642dd
selftests/bpf: Extend SK_REUSEPORT tests to cover SOCKMAP/SOCKHASH

Parametrize the SK_REUSEPORT tests so that the map type for storing sockets
is not hard-coded in the test setup routine.

This, together with careful state cleaning after the tests, lets us run the
test cases for REUSEPORT_ARRAY, SOCKMAP, and SOCKHASH to have test coverage
for all supported map types. The last two support only TCP sockets at the
moment.

Signed-off-by: Jakub Sitnicki <jakub@cloudflare.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Link: https://lore.kernel.org/bpf/20200218171023.844439-11-jakub@cloudflare.com
tools/testing/selftests/bpf/prog_tests/select_reuseport.c