]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/bpf: Run reuseport tests only with supported socket types
authorJakub Sitnicki <jakub@cloudflare.com>
Mon, 24 Feb 2020 13:53:26 +0000 (14:53 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 25 Feb 2020 00:35:16 +0000 (16:35 -0800)
commit735a5857a7bcc1e35f97ff11999e29834b034851
tree0fa803d180871f26cfe7181be2b769f8e9ed669b
parent7a2a01cad9ea588e42cfa958e80380d9cd80228a
selftests/bpf: Run reuseport tests only with supported socket types

SOCKMAP and SOCKHASH map types can be used with reuseport BPF programs but
don't support yet storing UDP sockets. Instead of marking UDP tests with
SOCK{MAP,HASH} as skipped, don't run them at all.

Skipped test might signal that the test environment is not suitable for
running the test, while in reality the functionality is not implemented in
the kernel yet.

Before:

  sh# ./test_progs -t select_reuseport
  …
  #40 select_reuseport:OK
  Summary: 1/126 PASSED, 30 SKIPPED, 0 FAILED

After:

  sh# ./test_progs  -t select_reuseport
  …
  #40 select_reuseport:OK
  Summary: 1/98 PASSED, 2 SKIPPED, 0 FAILED

The remaining two skipped tests are SYN cookies tests, which will be
addressed in the subsequent patch.

Fixes: 9c6fb1e5aedd ("selftests/bpf: Extend SK_REUSEPORT tests to cover SOCKMAP/SOCKHASH")
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-1-jakub@cloudflare.com
tools/testing/selftests/bpf/prog_tests/select_reuseport.c