git: 6dced2c6358e - main - tests: Automated cleanup of cdefs and other formatting

From: Warner Losh <imp_at_FreeBSD.org>
Date: Mon, 27 Nov 2023 05:25:07 UTC
The branch main has been updated by imp:

URL: https://cgit.FreeBSD.org/src/commit/?id=6dced2c6358e467ac1dccd99f6f648d4f71957a8

commit 6dced2c6358e467ac1dccd99f6f648d4f71957a8
Author:     Warner Losh <imp@FreeBSD.org>
AuthorDate: 2023-11-24 20:12:57 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2023-11-27 05:24:01 +0000

    tests: Automated cleanup of cdefs and other formatting
    
    Apply the following automated changes to try to eliminate
    no-longer-needed sys/cdefs.h includes as well as now-empty
    blank lines in a row.
    
    Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/
    Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/
    Remove /\n+#if.*\n#endif.*\n+/
    Remove /^#if.*\n#endif.*\n/
    Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/
    Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/
    Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/
    
    Sponsored by:           Netflix
---
 tests/sys/capsicum/bindat_connectat.c     | 1 -
 tests/sys/capsicum/ioctls_test.c          | 1 -
 tests/sys/devrandom/uint128_test.c        | 1 -
 tests/sys/fifo/fifo_kqueue.c              | 1 -
 tests/sys/kern/acct/acct_test.c           | 1 -
 tests/sys/kern/fdgrowtable_test.c         | 1 -
 tests/sys/kern/kcov.c                     | 1 -
 tests/sys/kern/kern_copyin.c              | 1 -
 tests/sys/kern/kern_descrip_test.c        | 1 -
 tests/sys/kern/pipe/pipe_kqueue_test.c    | 1 -
 tests/sys/kern/ptrace_test.c              | 1 -
 tests/sys/kern/sched_affinity.c           | 2 +-
 tests/sys/kern/subr_physmem_test.c        | 1 -
 tests/sys/kern/sys_getrandom.c            | 1 -
 tests/sys/kern/unix_passfd_test.c         | 1 -
 tests/sys/net/routing/test_rtsock_ops.c   | 1 -
 tests/sys/netinet/ip6_v4mapped_test.c     | 1 -
 tests/sys/netinet/ip_reass_test.c         | 1 -
 tests/sys/netinet/so_reuseport_lb_test.c  | 1 -
 tests/sys/netinet/tcp_connect_port_test.c | 1 -
 tests/sys/posixshm/posixshm_test.c        | 1 -
 tests/sys/vfs/lookup_cap_dotdot.c         | 1 -
 22 files changed, 1 insertion(+), 22 deletions(-)

diff --git a/tests/sys/capsicum/bindat_connectat.c b/tests/sys/capsicum/bindat_connectat.c
index 397bbbd562ae..2d7ec706c1cc 100644
--- a/tests/sys/capsicum/bindat_connectat.c
+++ b/tests/sys/capsicum/bindat_connectat.c
@@ -23,7 +23,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/param.h>
 #include <sys/capsicum.h>
 #include <sys/socket.h>
diff --git a/tests/sys/capsicum/ioctls_test.c b/tests/sys/capsicum/ioctls_test.c
index d35e1582861b..5db58279071c 100644
--- a/tests/sys/capsicum/ioctls_test.c
+++ b/tests/sys/capsicum/ioctls_test.c
@@ -23,7 +23,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/capsicum.h>
 #include <sys/filio.h>
 #include <sys/socket.h>
diff --git a/tests/sys/devrandom/uint128_test.c b/tests/sys/devrandom/uint128_test.c
index 2c9b956c9c8f..a59adba1a7c7 100644
--- a/tests/sys/devrandom/uint128_test.c
+++ b/tests/sys/devrandom/uint128_test.c
@@ -26,7 +26,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/param.h>
 #include <sys/random.h>
 
diff --git a/tests/sys/fifo/fifo_kqueue.c b/tests/sys/fifo/fifo_kqueue.c
index 43af68545ba9..9052ed599282 100644
--- a/tests/sys/fifo/fifo_kqueue.c
+++ b/tests/sys/fifo/fifo_kqueue.c
@@ -25,7 +25,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/param.h>
 #include <sys/event.h>
 #include <sys/stat.h>
diff --git a/tests/sys/kern/acct/acct_test.c b/tests/sys/kern/acct/acct_test.c
index b3028d518885..f0f016b9cc26 100644
--- a/tests/sys/kern/acct/acct_test.c
+++ b/tests/sys/kern/acct/acct_test.c
@@ -23,7 +23,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/types.h>
 
 #include <assert.h>
diff --git a/tests/sys/kern/fdgrowtable_test.c b/tests/sys/kern/fdgrowtable_test.c
index e066c97a05fb..75c3d6701c0c 100644
--- a/tests/sys/kern/fdgrowtable_test.c
+++ b/tests/sys/kern/fdgrowtable_test.c
@@ -25,7 +25,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/param.h>
 #include <sys/filedesc.h>
 #include <sys/queue.h>
diff --git a/tests/sys/kern/kcov.c b/tests/sys/kern/kcov.c
index 914511f7d137..cecc0cda78ea 100644
--- a/tests/sys/kern/kcov.c
+++ b/tests/sys/kern/kcov.c
@@ -29,7 +29,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/param.h>
 #include <sys/ioctl.h>
 #include <sys/kcov.h>
diff --git a/tests/sys/kern/kern_copyin.c b/tests/sys/kern/kern_copyin.c
index 25c9eda96541..6ad195d5d055 100644
--- a/tests/sys/kern/kern_copyin.c
+++ b/tests/sys/kern/kern_copyin.c
@@ -27,7 +27,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/param.h>
 #include <sys/exec.h>
 #include <sys/sysctl.h>
diff --git a/tests/sys/kern/kern_descrip_test.c b/tests/sys/kern/kern_descrip_test.c
index b181187fa168..a315156c36de 100644
--- a/tests/sys/kern/kern_descrip_test.c
+++ b/tests/sys/kern/kern_descrip_test.c
@@ -24,7 +24,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/param.h>
 #include <sys/limits.h>
 #include <sys/resource.h>
diff --git a/tests/sys/kern/pipe/pipe_kqueue_test.c b/tests/sys/kern/pipe/pipe_kqueue_test.c
index b432e839c102..ee2e9ce68c7a 100644
--- a/tests/sys/kern/pipe/pipe_kqueue_test.c
+++ b/tests/sys/kern/pipe/pipe_kqueue_test.c
@@ -25,7 +25,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/param.h>
 #include <sys/event.h>
 #include <sys/stat.h>
diff --git a/tests/sys/kern/ptrace_test.c b/tests/sys/kern/ptrace_test.c
index 5666215f9377..bd176e2963f0 100644
--- a/tests/sys/kern/ptrace_test.c
+++ b/tests/sys/kern/ptrace_test.c
@@ -23,7 +23,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/types.h>
 #include <sys/cpuset.h>
 #include <sys/elf.h>
diff --git a/tests/sys/kern/sched_affinity.c b/tests/sys/kern/sched_affinity.c
index dce8678bcf6e..cbba226b3fa2 100644
--- a/tests/sys/kern/sched_affinity.c
+++ b/tests/sys/kern/sched_affinity.c
@@ -3,7 +3,7 @@
  *
  * SPDX-License-Identifier: BSD-2-Clause
  */
-#include <sys/cdefs.h>
+
 #include <sys/types.h>
 #include <sys/stdint.h>
 #include <sys/sysctl.h>
diff --git a/tests/sys/kern/subr_physmem_test.c b/tests/sys/kern/subr_physmem_test.c
index 92420fd39ee5..b810a2016473 100644
--- a/tests/sys/kern/subr_physmem_test.c
+++ b/tests/sys/kern/subr_physmem_test.c
@@ -27,7 +27,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/param.h>
 #include <sys/physmem.h>
 
diff --git a/tests/sys/kern/sys_getrandom.c b/tests/sys/kern/sys_getrandom.c
index 5f1acdc2efb1..6b6553bbdaac 100644
--- a/tests/sys/kern/sys_getrandom.c
+++ b/tests/sys/kern/sys_getrandom.c
@@ -26,7 +26,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/param.h>
 #include <sys/random.h>
 #include <errno.h>
diff --git a/tests/sys/kern/unix_passfd_test.c b/tests/sys/kern/unix_passfd_test.c
index d8c0efe5b9ea..9c9a6a175ceb 100644
--- a/tests/sys/kern/unix_passfd_test.c
+++ b/tests/sys/kern/unix_passfd_test.c
@@ -26,7 +26,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/param.h>
 #include <sys/socket.h>
 #include <sys/stat.h>
diff --git a/tests/sys/net/routing/test_rtsock_ops.c b/tests/sys/net/routing/test_rtsock_ops.c
index bc1694116404..ab4be93cc1af 100644
--- a/tests/sys/net/routing/test_rtsock_ops.c
+++ b/tests/sys/net/routing/test_rtsock_ops.c
@@ -25,7 +25,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/types.h>
 #include <sys/errno.h>
 #include <sys/socket.h>
diff --git a/tests/sys/netinet/ip6_v4mapped_test.c b/tests/sys/netinet/ip6_v4mapped_test.c
index bbc8d11d63ef..fa23192f56e4 100644
--- a/tests/sys/netinet/ip6_v4mapped_test.c
+++ b/tests/sys/netinet/ip6_v4mapped_test.c
@@ -31,7 +31,6 @@
  * This test is derived from tcp_connect_port_test.c.
  */
 
-#include <sys/cdefs.h>
 #include <sys/param.h>
 #include <sys/socket.h>
 #include <sys/stat.h>
diff --git a/tests/sys/netinet/ip_reass_test.c b/tests/sys/netinet/ip_reass_test.c
index f649dd9ad4db..a65bfa34e1d4 100644
--- a/tests/sys/netinet/ip_reass_test.c
+++ b/tests/sys/netinet/ip_reass_test.c
@@ -27,7 +27,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/param.h>
 #include <sys/ioctl.h>
 #include <sys/socket.h>
diff --git a/tests/sys/netinet/so_reuseport_lb_test.c b/tests/sys/netinet/so_reuseport_lb_test.c
index 5d3b2ab03af8..64fe0b53618d 100644
--- a/tests/sys/netinet/so_reuseport_lb_test.c
+++ b/tests/sys/netinet/so_reuseport_lb_test.c
@@ -27,7 +27,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/param.h>
 #include <sys/socket.h>
 
diff --git a/tests/sys/netinet/tcp_connect_port_test.c b/tests/sys/netinet/tcp_connect_port_test.c
index c8d211cc87cc..ad087afb162d 100644
--- a/tests/sys/netinet/tcp_connect_port_test.c
+++ b/tests/sys/netinet/tcp_connect_port_test.c
@@ -26,7 +26,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/param.h>
 #include <sys/socket.h>
 #include <sys/stat.h>
diff --git a/tests/sys/posixshm/posixshm_test.c b/tests/sys/posixshm/posixshm_test.c
index c97a10bb0a86..efc903d4ee04 100644
--- a/tests/sys/posixshm/posixshm_test.c
+++ b/tests/sys/posixshm/posixshm_test.c
@@ -29,7 +29,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/param.h>
 #include <sys/ioctl.h>
 #include <sys/mman.h>
diff --git a/tests/sys/vfs/lookup_cap_dotdot.c b/tests/sys/vfs/lookup_cap_dotdot.c
index 416c045d2f5d..fa26a13568ca 100644
--- a/tests/sys/vfs/lookup_cap_dotdot.c
+++ b/tests/sys/vfs/lookup_cap_dotdot.c
@@ -24,7 +24,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/param.h>
 #include <sys/capsicum.h>
 #include <sys/sysctl.h>