OSDN Git Service

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)
commit51bad0f05616c43d6d34b0a19bcc9bdab8e8fb39
tree842e3282420e8bdcb46247af55e02259c9fc7f02
parent603fba9dfd0b2e2a844ece9ed98ce874c38aa98e
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: 91134d849a0e ("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