]> git.baikalelectronics.ru Git - kernel.git/commit
selftests: bpf: Reset global state between reuseport test runs
authorLorenz Bauer <lmb@cloudflare.com>
Fri, 24 Jan 2020 11:27:54 +0000 (11:27 +0000)
committerDaniel Borkmann <daniel@iogearbox.net>
Fri, 24 Jan 2020 21:12:13 +0000 (22:12 +0100)
commit5e5f1a5d212d784bda21dac825827b1f82f3d43d
tree842e3282420e8bdcb46247af55e02259c9fc7f02
parenta38ad12c08c9c8ee15c2f78c37cbd9e88dcefbbc
selftests: bpf: Reset global state between reuseport test runs

Currently, there is a lot of false positives if a single reuseport test
fails. This is because expected_results and the result map are not cleared.

Zero both after individual test runs, which fixes the mentioned false
positives.

Fixes: 1f84785bfbad ("bpf: Test BPF_PROG_TYPE_SK_REUSEPORT")
Signed-off-by: Lorenz Bauer <lmb@cloudflare.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Reviewed-by: Jakub Sitnicki <jakub@cloudflare.com>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Link: https://lore.kernel.org/bpf/20200124112754.19664-5-lmb@cloudflare.com
tools/testing/selftests/bpf/prog_tests/select_reuseport.c