Skip to contentSkip to conversation

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

PATCH Applied Jakub Sitnicki 2 participants 2 messages Feb 12, 2020

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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")
---
 tools/testing/selftests/bpf/prog_tests/select_reuseport.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
tools/testing/selftests/bpf/prog_tests/select_reuseport.c +3 -1
index 098bcae5f827..db07a398e8d6 100644
@@ -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
Signature · 1 line
2.24.1
maintainer Applied
#1 lore raw
Quoted 8 lines · Jakub Sitnicki

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")

Applied, thanks!