Skip to content

Commit

Permalink
selftests/bpf: Mark SYN cookie test skipped for UDP sockets
Browse files Browse the repository at this point in the history
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: 7ee0d4e ("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
  • Loading branch information
Jakub Sitnicki authored and Daniel Borkmann committed Feb 12, 2020
1 parent 2fe7710 commit eecd618
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tools/testing/selftests/bpf/prog_tests/select_reuseport.c
Original file line number Diff line number Diff line change
Expand Up @@ -506,8 +506,10 @@ static void test_syncookie(int type, sa_family_t family)
.pass_on_failure = 0,
};

if (type != SOCK_STREAM)
if (type != SOCK_STREAM) {
test__skip();
return;
}

/*
* +1 for TCP-SYN and
Expand Down

0 comments on commit eecd618

Please sign in to comment.