From d14a03b9624794a0fd071d4143b48891a20fe02e Mon Sep 17 00:00:00 2001 From: Pedro Tammela Date: Fri, 13 Sep 2024 12:01:21 -0300 Subject: [PATCH] ci: clean up musl exceptions Now that we have Linux 6.6 we can clean up some of the test exceptions. Not all of them can be removed, so the comments are updated if needed. Signed-off-by: Pedro Tammela --- libc-test/build.rs | 219 +++------------------------------------------ 1 file changed, 11 insertions(+), 208 deletions(-) diff --git a/libc-test/build.rs b/libc-test/build.rs index 938294717eee3..353b5104caecf 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -3480,8 +3480,7 @@ fn test_linux(target: &str) { [gnu]: "linux/aio_abi.h", "linux/can.h", "linux/can/raw.h", - // FIXME: requires kernel headers >= 5.4.1. - [!musl]: "linux/can/j1939.h", + "linux/can/j1939.h", "linux/dccp.h", "linux/errqueue.h", "linux/falloc.h", @@ -3506,8 +3505,7 @@ fn test_linux(target: &str) { "linux/mempolicy.h", "linux/mman.h", "linux/module.h", - // FIXME: requires kernel headers >= 5.1. - [!musl]: "linux/mount.h", + "linux/mount.h", "linux/net_tstamp.h", "linux/netfilter/nfnetlink.h", "linux/netfilter/nfnetlink_log.h", @@ -3519,9 +3517,8 @@ fn test_linux(target: &str) { "linux/netfilter_ipv6.h", "linux/netfilter_ipv6/ip6_tables.h", "linux/netlink.h", - // FIXME: requires Linux >= 5.6: - [!musl]: "linux/openat2.h", - [!musl]: "linux/ptrace.h", + "linux/openat2.h", + "linux/ptrace.h", "linux/quota.h", "linux/random.h", "linux/reboot.h", @@ -3539,7 +3536,7 @@ fn test_linux(target: &str) { "sys/fanotify.h", // is not present on uclibc [!uclibc]: "sys/auxv.h", - [gnu]: "linux/close_range.h", + [gnu || musl]: "linux/close_range.h", } // note: aio.h must be included before sys/mount.h @@ -3630,11 +3627,6 @@ fn test_linux(target: &str) { // specific type. "Ioctl" => true, - // FIXME: requires >= 5.4.1 kernel headers - "pgn_t" if musl => true, - "priority_t" if musl => true, - "name_t" if musl => true, - // FIXME: Somehow fails to test after removing cfg hacks: "__uint128" => true, @@ -3653,22 +3645,6 @@ fn test_linux(target: &str) { if ty.starts_with("__c_anonymous_") { return true; } - // FIXME: musl CI has old headers - if musl && ty.starts_with("uinput_") { - return true; - } - if musl && ty == "seccomp_notif" { - return true; - } - if musl && ty == "seccomp_notif_addfd" { - return true; - } - if musl && ty == "seccomp_notif_resp" { - return true; - } - if musl && ty == "seccomp_notif_sizes" { - return true; - } // LFS64 types have been removed in musl 1.2.4+ if musl && (ty.ends_with("64") || ty.ends_with("64_t")) { @@ -3744,12 +3720,6 @@ fn test_linux(target: &str) { // Might differ between kernel versions "open_how" => true, - // FIXME: requires >= 5.4.1 kernel headers - "j1939_filter" if musl => true, - - // FIXME: requires >= 5.4 kernel headers - "sockaddr_can" if musl => true, - "sctp_initmsg" | "sctp_sndrcvinfo" | "sctp_sndinfo" | "sctp_rcvinfo" | "sctp_nxtinfo" | "sctp_prinfo" | "sctp_authinfo" => true, @@ -3760,34 +3730,6 @@ fn test_linux(target: &str) { // https://github.com/torvalds/linux/commit/94dfc73e7cf4a31da66b8843f0b9283ddd6b8381 "af_alg_iv" => true, - // FIXME: Requires >= 5.1 kernel headers. - // Everything that uses install-musl.sh has 4.19 kernel headers. - "tls12_crypto_info_aes_gcm_256" - if (aarch64 || arm || i686 || s390x || x86_64) && musl => - { - true - } - - // FIXME: Requires >= 5.11 kernel headers. - // Everything that uses install-musl.sh has 4.19 kernel headers. - "tls12_crypto_info_chacha20_poly1305" - if (aarch64 || arm || i686 || s390x || x86_64) && musl => - { - true - } - - // FIXME: Requires >= 5.3 kernel headers. - // Everything that uses install-musl.sh has 4.19 kernel headers. - "xdp_options" if musl => true, - - // FIXME: Requires >= 5.4 kernel headers. - // Everything that uses install-musl.sh has 4.19 kernel headers. - "xdp_umem_reg" | "xdp_ring_offset" | "xdp_mmap_offsets" if musl => true, - - // FIXME: Requires >= 5.9 kernel headers. - // Everything that uses install-musl.sh has 4.19 kernel headers. - "xdp_statistics" if musl => true, - // A new field was added in kernel 5.4, this is the old version for backwards compatibility. // https://github.com/torvalds/linux/commit/77cd0d7b3f257fd0e3096b4fdcff1a7d38e99e10 "xdp_ring_offset_v1" | "xdp_mmap_offsets_v1" => true, @@ -3848,31 +3790,6 @@ fn test_linux(target: &str) { } } if musl { - // FIXME: Requires >= 5.0 kernel headers - if name == "SECCOMP_GET_NOTIF_SIZES" - || name == "SECCOMP_FILTER_FLAG_NEW_LISTENER" - || name == "SECCOMP_FILTER_FLAG_TSYNC_ESRCH" - || name == "SECCOMP_USER_NOTIF_FLAG_CONTINUE" // requires >= 5.5 - || name == "SECCOMP_ADDFD_FLAG_SETFD" // requires >= 5.9 - || name == "SECCOMP_ADDFD_FLAG_SEND" // requires >= 5.9 - || name == "SECCOMP_FILTER_FLAG_WAIT_KILLABLE_RECV" // requires >= 5.19 - { - return true; - } - // FIXME: Requires >= 5.4.1 kernel headers - if name.starts_with("J1939") - || name.starts_with("RTEXT_FILTER_") - || name.starts_with("SO_J1939") - || name.starts_with("SCM_J1939") - { - return true; - } - // FIXME: Requires >= 5.10 kernel headers - if name.starts_with("MEMBARRIER_CMD_REGISTER") - || name.starts_with("MEMBARRIER_CMD_PRIVATE") - { - return true; - } // LFS64 types have been removed in musl 1.2.4+ if name.starts_with("RLIM64") { return true; @@ -3881,10 +3798,6 @@ fn test_linux(target: &str) { if name.starts_with("NI_IDN") { return true; } - // FIXME: Requires >= 6.3 kernel headers - if name == "MFD_NOEXEC_SEAL" || name == "MFD_EXEC" { - return true; - } } match name { // These constants are not available if gnu headers have been included @@ -3969,7 +3882,7 @@ fn test_linux(target: &str) { "SECCOMP_FILTER_FLAG_WAIT_KILLABLE_RECV" if sparc64 => true, // FIXME: Not currently available in headers on ARM and musl. - "NETLINK_GET_STRICT_CHK" if arm || musl => true, + "NETLINK_GET_STRICT_CHK" if arm => true, // kernel constants not available in uclibc 1.0.34 | "EXTPROC" @@ -4038,62 +3951,14 @@ fn test_linux(target: &str) { | "MINSIGSTKSZ" if gnu => true, - // FIXME: Linux >= 5.10: - // https://github.com/torvalds/linux/commit/d25e2e9388eda61b6e298585024ee3355f50c493 - "NF_INET_INGRESS" if musl => true, - // FIXME: Linux >= 5.16: // https://github.com/torvalds/linux/commit/42df6e1d221dddc0f2acf2be37e68d553ad65f96 - "NF_NETDEV_EGRESS" if musl || sparc64 => true, + "NF_NETDEV_EGRESS" if sparc64 => true, // value changed - "NF_NETDEV_NUMHOOKS" if musl || sparc64 => true, - - // FIXME: requires Linux >= 5.6: - | "RESOLVE_BENEATH" - | "RESOLVE_CACHED" - | "RESOLVE_IN_ROOT" - | "RESOLVE_NO_MAGICLINKS" - | "RESOLVE_NO_SYMLINKS" - | "RESOLVE_NO_XDEV" if musl => true, - - // FIXME: requires Linux >= 5.4: - | "CAN_J1939" - | "CAN_NPROTO" if musl => true, - - // FIXME: requires Linux >= 5.6 - "GRND_INSECURE" if musl => true, - - // FIXME: requires Linux >= 5.7: - "MREMAP_DONTUNMAP" if musl => true, + "NF_NETDEV_NUMHOOKS" if sparc64 => true, // FIXME: requires Linux >= v5.8 - "IF_LINK_MODE_TESTING" if musl || sparc64 => true, - - // FIXME: Requires more recent kernel headers (5.9 / 5.11): - | "CLOSE_RANGE_UNSHARE" - | "CLOSE_RANGE_CLOEXEC" if musl => true, - - // FIXME: requires Linux >= 5.12: - "MPOL_F_NUMA_BALANCING" if musl => true, - - // FIXME: Requires more recent kernel headers - | "NFNL_SUBSYS_COUNT" // bumped in v5.14 - | "NFNL_SUBSYS_HOOK" // v5.14+ - | "NFULA_VLAN" // v5.4+ - | "NFULA_L2HDR" // v5.4+ - | "NFULA_VLAN_PROTO" // v5.4+ - | "NFULA_VLAN_TCI" // v5.4+ - | "NFULA_VLAN_UNSPEC" // v5.4+ - | "RTNLGRP_NEXTHOP" // linux v5.3+ - | "RTNLGRP_BRVLAN" // linux v5.6+ - if musl => true, - - | "MADV_COLD" - | "MADV_PAGEOUT" - | "MADV_POPULATE_READ" - | "MADV_POPULATE_WRITE" - if musl => true, - "CLONE_CLEAR_SIGHAND" | "CLONE_INTO_CGROUP" => true, + "IF_LINK_MODE_TESTING" if sparc64 => true, // FIXME: Requires >= 6.3 kernel headers "MFD_EXEC" | "MFD_NOEXEC_SEAL" if sparc64 => true, @@ -4115,9 +3980,6 @@ fn test_linux(target: &str) { => true, "SCTP_FUTURE_ASSOC" | "SCTP_CURRENT_ASSOC" | "SCTP_ALL_ASSOC" | "SCTP_PEER_ADDR_THLDS_V2" => true, // linux 5.5+ - // FIXME: Requires more recent kernel headers - "HWTSTAMP_TX_ONESTEP_P2P" if musl => true, // linux v5.6+ - // kernel 6.5 minimum "MOVE_MOUNT_BENEATH" => true, // FIXME: Requires linux 6.1 @@ -4139,10 +4001,8 @@ fn test_linux(target: &str) { | "FAN_INFO" // linux v5.16+ => true, - // FIXME: Requires linux 5.15+ - "FAN_REPORT_PIDFD" if musl => true, - - // FIXME: Requires linux 5.9+ + // musl doesn't use in + "FAN_REPORT_PIDFD" | "FAN_REPORT_DIR_FID" | "FAN_REPORT_NAME" | "FAN_REPORT_DFID_NAME" @@ -4156,55 +4016,6 @@ fn test_linux(target: &str) { // FIXME: Requires linux 6.5 "NFT_MSG_MAX" => true, - // FIXME: Requires >= 5.1 kernel headers. - // Everything that uses install-musl.sh has 4.19 kernel headers. - "TLS_1_3_VERSION" - | "TLS_1_3_VERSION_MAJOR" - | "TLS_1_3_VERSION_MINOR" - | "TLS_CIPHER_AES_GCM_256" - | "TLS_CIPHER_AES_GCM_256_IV_SIZE" - | "TLS_CIPHER_AES_GCM_256_KEY_SIZE" - | "TLS_CIPHER_AES_GCM_256_SALT_SIZE" - | "TLS_CIPHER_AES_GCM_256_TAG_SIZE" - | "TLS_CIPHER_AES_GCM_256_REC_SEQ_SIZE" - if (aarch64 || arm || i686 || s390x || x86_64) && musl => - { - true - } - - // FIXME: Requires >= 5.11 kernel headers. - // Everything that uses install-musl.sh has 4.19 kernel headers. - "TLS_CIPHER_CHACHA20_POLY1305" - | "TLS_CIPHER_CHACHA20_POLY1305_IV_SIZE" - | "TLS_CIPHER_CHACHA20_POLY1305_KEY_SIZE" - | "TLS_CIPHER_CHACHA20_POLY1305_SALT_SIZE" - | "TLS_CIPHER_CHACHA20_POLY1305_TAG_SIZE" - | "TLS_CIPHER_CHACHA20_POLY1305_REC_SEQ_SIZE" - if (aarch64 || arm || i686 || s390x || x86_64) && musl => - { - true - } - - // FIXME: Requires >= 5.3 kernel headers. - // Everything that uses install-musl.sh has 4.19 kernel headers. - "XDP_OPTIONS_ZEROCOPY" | "XDP_OPTIONS" - if musl => - { - true - } - - // FIXME: Requires >= 5.4 kernel headers. - // Everything that uses install-musl.sh has 4.19 kernel headers. - "XSK_UNALIGNED_BUF_OFFSET_SHIFT" - | "XSK_UNALIGNED_BUF_ADDR_MASK" - | "XDP_UMEM_UNALIGNED_CHUNK_FLAG" - | "XDP_RING_NEED_WAKEUP" - | "XDP_USE_NEED_WAKEUP" - if musl => - { - true - } - // FIXME: Requires >= 6.6 kernel headers. "XDP_USE_SG" | "XDP_PKT_CONTD" @@ -4246,14 +4057,6 @@ fn test_linux(target: &str) { | "PF_MCE_EARLY" | "PF_MEMALLOC_PIN" => true, - "SCHED_FLAG_KEEP_POLICY" - | "SCHED_FLAG_KEEP_PARAMS" - | "SCHED_FLAG_UTIL_CLAMP_MIN" - | "SCHED_FLAG_UTIL_CLAMP_MAX" - | "SCHED_FLAG_KEEP_ALL" - | "SCHED_FLAG_UTIL_CLAMP" - | "SCHED_FLAG_ALL" if musl => true, // Needs more recent linux headers. - _ => false, } });