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

Configure Feed

Select the types of activity you want to include in your feed.

selftest: net: Remove DCCP bits.

We will remove DCCP.

Let's remove DCCP bits from selftest.

Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Link: https://patch.msgid.link/20250410023921.11307-2-kuniyu@amazon.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Kuniyuki Iwashima and committed by
Jakub Kicinski
b2bdce7a ba5560e5

+1 -36
-1
tools/testing/selftests/net/config
··· 33 33 CONFIG_NF_CONNTRACK=m 34 34 CONFIG_IPV6_MROUTE=y 35 35 CONFIG_IPV6_SIT=y 36 - CONFIG_IP_DCCP=m 37 36 CONFIG_NF_NAT=m 38 37 CONFIG_IP6_NF_IPTABLES=m 39 38 CONFIG_IP_NF_IPTABLES=m
+1 -35
tools/testing/selftests/net/reuseport_addr_any.c
··· 9 9 #include <arpa/inet.h> 10 10 #include <errno.h> 11 11 #include <error.h> 12 - #include <linux/dccp.h> 13 12 #include <linux/in.h> 14 13 #include <linux/unistd.h> 15 14 #include <stdbool.h> ··· 19 20 #include <sys/types.h> 20 21 #include <sys/socket.h> 21 22 #include <unistd.h> 22 - 23 - #ifndef SOL_DCCP 24 - #define SOL_DCCP 269 25 - #endif 26 23 27 24 static const char *IP4_ADDR = "127.0.0.1"; 28 25 static const char *IP6_ADDR = "::1"; ··· 81 86 82 87 if (proto == SOCK_STREAM && listen(rcv_fds[i], 10)) 83 88 error(1, errno, "tcp: failed to listen on receive port"); 84 - else if (proto == SOCK_DCCP) { 85 - if (setsockopt(rcv_fds[i], SOL_DCCP, 86 - DCCP_SOCKOPT_SERVICE, 87 - &(int) {htonl(42)}, sizeof(int))) 88 - error(1, errno, "failed to setsockopt"); 89 - 90 - if (listen(rcv_fds[i], 10)) 91 - error(1, errno, "dccp: failed to listen on receive port"); 92 - } 93 89 } 94 90 } 95 91 ··· 134 148 if (fd < 0) 135 149 error(1, errno, "failed to create send socket"); 136 150 137 - if (proto == SOCK_DCCP && 138 - setsockopt(fd, SOL_DCCP, DCCP_SOCKOPT_SERVICE, 139 - &(int){htonl(42)}, sizeof(int))) 140 - error(1, errno, "failed to setsockopt"); 141 - 142 151 if (bind(fd, saddr, sz)) 143 152 error(1, errno, "failed to bind send socket"); 144 153 ··· 156 175 if (i < 0) 157 176 error(1, errno, "epoll_wait failed"); 158 177 159 - if (proto == SOCK_STREAM || proto == SOCK_DCCP) { 178 + if (proto == SOCK_STREAM) { 160 179 fd = accept(ev.data.fd, NULL, NULL); 161 180 if (fd < 0) 162 181 error(1, errno, "failed to accept"); ··· 224 243 225 244 static void test_proto(int proto, const char *proto_str) 226 245 { 227 - if (proto == SOCK_DCCP) { 228 - int test_fd; 229 - 230 - test_fd = socket(AF_INET, proto, 0); 231 - if (test_fd < 0) { 232 - if (errno == ESOCKTNOSUPPORT) { 233 - fprintf(stderr, "DCCP not supported: skipping DCCP tests\n"); 234 - return; 235 - } else 236 - error(1, errno, "failed to create a DCCP socket"); 237 - } 238 - close(test_fd); 239 - } 240 - 241 246 fprintf(stderr, "%s IPv4 ... ", proto_str); 242 247 run_one_test(AF_INET, AF_INET, proto, IP4_ADDR); 243 248 ··· 238 271 { 239 272 test_proto(SOCK_DGRAM, "UDP"); 240 273 test_proto(SOCK_STREAM, "TCP"); 241 - test_proto(SOCK_DCCP, "DCCP"); 242 274 243 275 fprintf(stderr, "SUCCESS\n"); 244 276 return 0;