]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/bpf: Run SYN cookies with reuseport BPF test only for TCP
authorJakub Sitnicki <jakub@cloudflare.com>
Mon, 24 Feb 2020 13:53:27 +0000 (14:53 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 25 Feb 2020 00:35:16 +0000 (16:35 -0800)
commitbffbc0644072ed8f6fd07d6b95ae85d906f187b7
tree1c9c7e0962f45a2bddc71ce52d8c6a3ceb474b9e
parent735a5857a7bcc1e35f97ff11999e29834b034851
selftests/bpf: Run SYN cookies with reuseport BPF test only for TCP

Currently we run SYN cookies test for all socket types and mark the test as
skipped if socket type is not compatible. This causes confusion because
skipped test might indicate a problem with the testing environment.

Instead, run the test only for the socket type which supports SYN cookies.

Also, switch to using designated initializers when setting up tests, so
that we can tweak only some test parameters, leaving the rest initialized
to default values.

Fixes: 7fd44c0baed1 ("selftests/bpf: Mark SYN cookie test skipped for UDP sockets")
Reported-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Jakub Sitnicki <jakub@cloudflare.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Link: https://lore.kernel.org/bpf/20200224135327.121542-2-jakub@cloudflare.com
tools/testing/selftests/bpf/prog_tests/select_reuseport.c