Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftests/bpf: Mark SYN cookie test skipped for UDP sockets

SYN cookie test with reuseport BPF doesn't make sense for UDP sockets. We
don't run it but the test_progs test runner doesn't know about it. Mark the
test as skipped so the test_progs can report correctly how many tests were
skipped.

Fixes: 7ee0d4e97b88 ("selftests/bpf: Switch reuseport tests for test_progs framework")
Reported-by: Lorenz Bauer <lmb@cloudflare.com>
Signed-off-by: Jakub Sitnicki <jakub@cloudflare.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20200212103208.438419-1-jakub@cloudflare.com

authored by

Jakub Sitnicki and committed by
Daniel Borkmann
eecd618b 2fe77100

+3 -1
+3 -1
tools/testing/selftests/bpf/prog_tests/select_reuseport.c
··· 506 506 .pass_on_failure = 0, 507 507 }; 508 508 509 - if (type != SOCK_STREAM) 509 + if (type != SOCK_STREAM) { 510 + test__skip(); 510 511 return; 512 + } 511 513 512 514 /* 513 515 * +1 for TCP-SYN and