bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf] selftests/bpf: Mark SYN cookie test skipped for UDP sockets
@ 2020-02-12 10:32 Jakub Sitnicki
  2020-02-12 16:50 ` Daniel Borkmann
  0 siblings, 1 reply; 2+ messages in thread
From: Jakub Sitnicki @ 2020-02-12 10:32 UTC (permalink / raw)
  To: bpf; +Cc: netdev, kernel-team, Lorenz Bauer

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>
---
 tools/testing/selftests/bpf/prog_tests/select_reuseport.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tools/testing/selftests/bpf/prog_tests/select_reuseport.c b/tools/testing/selftests/bpf/prog_tests/select_reuseport.c
index 098bcae5f827..db07a398e8d6 100644
--- a/tools/testing/selftests/bpf/prog_tests/select_reuseport.c
+++ b/tools/testing/selftests/bpf/prog_tests/select_reuseport.c
@@ -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
-- 
2.24.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH bpf] selftests/bpf: Mark SYN cookie test skipped for UDP sockets
  2020-02-12 10:32 [PATCH bpf] selftests/bpf: Mark SYN cookie test skipped for UDP sockets Jakub Sitnicki
@ 2020-02-12 16:50 ` Daniel Borkmann
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Borkmann @ 2020-02-12 16:50 UTC (permalink / raw)
  To: Jakub Sitnicki, bpf; +Cc: netdev, kernel-team, Lorenz Bauer

On 2/12/20 11:32 AM, Jakub Sitnicki wrote:
> 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>

Applied, thanks!

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-02-12 16:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-12 10:32 [PATCH bpf] selftests/bpf: Mark SYN cookie test skipped for UDP sockets Jakub Sitnicki
2020-02-12 16:50 ` Daniel Borkmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).