BPF Archive on lore.kernel.org
 help / color / 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	[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, back to index

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

BPF Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/bpf/0 bpf/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 bpf bpf/ https://lore.kernel.org/bpf \
		bpf@vger.kernel.org
	public-inbox-index bpf

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.bpf


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git