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

selftests/bpf: Make cgroup_v1v2 use its own port

This patch change cgroup_v1v2 use a different port, avoid conflict with
other tests.

Signed-off-by: Yucong Sun <sunyucong@gmail.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20211006185619.364369-8-fallentree@fb.com

authored by

Yucong Sun and committed by
Andrii Nakryiko
445e72c7 d719de0d

+2 -2
+1 -1
tools/testing/selftests/bpf/prog_tests/cgroup_v1v2.c
··· 46 46 { 47 47 struct network_helper_opts opts = {}; 48 48 int server_fd, client_fd, cgroup_fd; 49 - static const int port = 60123; 49 + static const int port = 60120; 50 50 51 51 /* Step 1: Check base connectivity works without any BPF. */ 52 52 server_fd = start_server(AF_INET, SOCK_STREAM, NULL, port, 0);
+1 -1
tools/testing/selftests/bpf/progs/connect4_dropper.c
··· 18 18 { 19 19 if (ctx->type != SOCK_STREAM) 20 20 return VERDICT_PROCEED; 21 - if (ctx->user_port == bpf_htons(60123)) 21 + if (ctx->user_port == bpf_htons(60120)) 22 22 return VERDICT_REJECT; 23 23 return VERDICT_PROCEED; 24 24 }