@@ -4182,9 +4182,6 @@ fn test_linux(target: &str) {
41824182 // FIXME(linux): Requires >= 6.12 kernel headers.
41834183 "mnt_ns_info" => true ,
41844184
4185- // FIXME(linux): Requires >= 6.4 kernel headers.
4186- "ptrace_sud_config" => true ,
4187-
41884185 // Struct has changed for new musl versions
41894186 "tcp_info" if old_musl => true ,
41904187
@@ -4240,20 +4237,6 @@ fn test_linux(target: &str) {
42404237 if name. starts_with ( "NI_IDN" ) {
42414238 return true ;
42424239 }
4243- // FIXME: Requires >= 6.3 kernel headers
4244- if loongarch64 && ( name == "MFD_NOEXEC_SEAL" || name == "MFD_EXEC" ) {
4245- return true ;
4246- }
4247- // FIXME: Requires >= 6.3 (6.6) kernel headers
4248- if name == "PR_GET_MDWE" || name == "PR_MDWE_NO_INHERIT" || name == "PR_MDWE_REFUSE_EXEC_GAIN" || name == "PR_SET_MDWE" {
4249- return true ;
4250- }
4251- // Requires musl >= 1.2
4252- if old_musl && ( name == "SO_PREFER_BUSY_POLL"
4253- || name == "SO_BUSY_POLL_BUDGET" )
4254- {
4255- return true ;
4256- }
42574240 // FIXME(musl): Not in musl yet
42584241 if name == "SO_NETNS_COOKIE"
42594242 || name == "SO_BUF_LOCK"
@@ -4274,20 +4257,45 @@ fn test_linux(target: &str) {
42744257 {
42754258 return true ;
42764259 }
4277- // Values changed in newer musl versions on these arches
4278- if old_musl && ( riscv64 || x86_64) && name == "O_LARGEFILE" {
4279- return true ;
4280- }
4281- // Values changed in newer musl versions
4282- if old_musl && name == "RLIM_NLIMITS" {
4283- return true ;
4284- }
42854260 // FIXME: Does not exist on non-x86 architectures, slated for removal
42864261 // in libc in 1.0
42874262 if ppc64 && name == "MAP_32BIT" {
42884263 return true ;
42894264 }
42904265 }
4266+ if old_musl {
4267+ // Constants that don't exist on the old version of musl we test with, but do exist
4268+ // on newer versions.
4269+ match name {
4270+ | "FAN_EVENT_INFO_TYPE_ERROR"
4271+ | "FAN_EVENT_INFO_TYPE_NEW_DFID_NAME"
4272+ | "FAN_EVENT_INFO_TYPE_OLD_DFID_NAME"
4273+ | "FAN_FS_ERROR"
4274+ | "FAN_INFO"
4275+ | "FAN_MARK_EVICTABLE"
4276+ | "FAN_MARK_IGNORE"
4277+ | "FAN_MARK_IGNORE_SURV"
4278+ | "FAN_RENAME"
4279+ | "FAN_REPORT_DFID_NAME_TARGET"
4280+ | "FAN_REPORT_TARGET_FID"
4281+ | "FAN_RESPONSE_INFO_AUDIT_RULE"
4282+ | "FAN_RESPONSE_INFO_NONE"
4283+ | "IPPROTO_ETHERNET"
4284+ | "IPPROTO_MPTCP"
4285+ | "PR_GET_MDWE"
4286+ | "PR_MDWE_NO_INHERIT"
4287+ | "PR_MDWE_REFUSE_EXEC_GAIN"
4288+ | "PR_SET_MDWE"
4289+ | "RLIM_NLIMITS"
4290+ | "SI_DETHREAD"
4291+ | "SO_BUSY_POLL_BUDGET"
4292+ | "SO_PREFER_BUSY_POLL"
4293+ => return true ,
4294+ // Values changed in newer musl versions on these arches
4295+ "O_LARGEFILE" if riscv64 || x86_64 => return true ,
4296+ _ => ( ) ,
4297+ }
4298+ }
42914299 match name {
42924300 // These constants are not available if gnu headers have been included
42934301 // and can therefore not be tested here
@@ -4340,43 +4348,17 @@ fn test_linux(target: &str) {
43404348 // deprecated: not available from Linux kernel 5.6:
43414349 "VMADDR_CID_RESERVED" => true ,
43424350
4343- // IPPROTO_MAX was increased in 5.6 for IPPROTO_MPTCP:
4344- | "IPPROTO_MAX"
4345- | "IPPROTO_ETHERNET"
4346- | "IPPROTO_MPTCP" => true ,
4351+ // FIXME(value): IPPROTO_MAX was increased in 5.6 for IPPROTO_MPTCP:
4352+ "IPPROTO_MAX" => true ,
43474353
43484354 // FIXME(linux): Not yet implemented on sparc64
43494355 "SYS_clone3" if sparc64 => true ,
43504356
43514357 // FIXME(linux): Not defined on ARM, gnueabihf, mips, musl, PowerPC, riscv64, s390x, and sparc64.
43524358 "SYS_memfd_secret" if arm | gnueabihf | mips | musl | ppc | riscv64 | s390x | sparc64 => true ,
43534359
4354- // FIXME(linux): Added in Linux 5.16
4355- // https://github.com/torvalds/linux/commit/039c0ec9bb77446d7ada7f55f90af9299b28ca49
4356- "SYS_futex_waitv" => true ,
4357-
4358- // FIXME(linux): Added in Linux 5.17
4359- // https://github.com/torvalds/linux/commit/c6018b4b254971863bd0ad36bb5e7d0fa0f0ddb0
4360- "SYS_set_mempolicy_home_node" => true ,
4361-
4362- // FIXME(linux): Added in Linux 5.18
4363- // https://github.com/torvalds/linux/commit/8b5413647262dda8d8d0e07e14ea1de9ac7cf0b2
4364- "NFQA_PRIORITY" => true ,
4365-
4366- // FIXME(linux): requires more recent kernel headers on CI
4367- | "UINPUT_VERSION"
4368- | "SW_MAX"
4369- | "SW_CNT"
4370- if ppc64 || riscv64 => true ,
4371-
4372- // FIXME(linux): requires more recent kernel headers on CI
4373- "SECCOMP_FILTER_FLAG_WAIT_KILLABLE_RECV" if sparc64 => true ,
4374-
4375- // FIXME(linux): Not currently available in headers on ARM and musl.
4376- "NETLINK_GET_STRICT_CHK" if arm => true ,
4377-
43784360 // Skip as this signal codes and trap reasons need newer headers
4379- "SI_DETHREAD" | " TRAP_PERF" => true ,
4361+ "TRAP_PERF" => true ,
43804362
43814363 // kernel constants not available in uclibc 1.0.34
43824364 | "EXTPROC"
@@ -4453,12 +4435,6 @@ fn test_linux(target: &str) {
44534435 // DIFF(main): fixed in 1.0 with e9abac9ac2
44544436 "CLONE_CLEAR_SIGHAND" | "CLONE_INTO_CGROUP" => true ,
44554437
4456- // kernel 6.1 minimum
4457- "MADV_COLLAPSE" => true ,
4458-
4459- // kernel 6.2 minimum
4460- "TUN_F_USO4" | "TUN_F_USO6" | "IFF_NO_CARRIER" => true ,
4461-
44624438 // kernel 6.9 minimum
44634439 "RWF_NOAPPEND" => true ,
44644440
@@ -4468,38 +4444,6 @@ fn test_linux(target: &str) {
44684444 // kernel 6.14 minimum
44694445 "RWF_DONTCACHE" => true ,
44704446
4471- // FIXME(linux): Requires more recent kernel headers
4472- | "IFLA_PARENT_DEV_NAME" // linux v5.13+
4473- | "IFLA_PARENT_DEV_BUS_NAME" // linux v5.13+
4474- | "IFLA_GRO_MAX_SIZE" // linux v5.16+
4475- | "IFLA_TSO_MAX_SIZE" // linux v5.18+
4476- | "IFLA_TSO_MAX_SEGS" // linux v5.18+
4477- | "IFLA_ALLMULTI" // linux v6.0+
4478- | "MADV_DONTNEED_LOCKED" // linux v5.18+
4479- => true ,
4480- "SCTP_FUTURE_ASSOC" | "SCTP_CURRENT_ASSOC" | "SCTP_ALL_ASSOC" | "SCTP_PEER_ADDR_THLDS_V2" => true , // linux 5.5+
4481-
4482- // kernel 6.5 minimum
4483- "MOVE_MOUNT_BENEATH" => true ,
4484- // FIXME(linux): Requires linux 6.1
4485- "ALG_SET_KEY_BY_KEY_SERIAL" | "ALG_SET_DRBG_ENTROPY" => true ,
4486-
4487- // FIXME(linux): Requires more recent kernel headers
4488- | "FAN_FS_ERROR" // linux v5.16+
4489- | "FAN_RENAME" // linux v5.17+
4490- | "FAN_REPORT_TARGET_FID" // linux v5.17+
4491- | "FAN_REPORT_DFID_NAME_TARGET" // linux v5.17+
4492- | "FAN_MARK_EVICTABLE" // linux v5.19+
4493- | "FAN_MARK_IGNORE" // linux v6.0+
4494- | "FAN_MARK_IGNORE_SURV" // linux v6.0+
4495- | "FAN_EVENT_INFO_TYPE_ERROR" // linux v5.16+
4496- | "FAN_EVENT_INFO_TYPE_OLD_DFID_NAME" // linux v5.17+
4497- | "FAN_EVENT_INFO_TYPE_NEW_DFID_NAME" // linux v5.17+
4498- | "FAN_RESPONSE_INFO_NONE" // linux v5.16+
4499- | "FAN_RESPONSE_INFO_AUDIT_RULE" // linux v5.16+
4500- | "FAN_INFO" // linux v5.16+
4501- => true ,
4502-
45034447 // musl doesn't use <linux/fanotify.h> in <sys/fanotify.h>
45044448 "FAN_REPORT_PIDFD"
45054449 | "FAN_REPORT_DIR_FID"
@@ -4512,36 +4456,24 @@ fn test_linux(target: &str) {
45124456 | "FAN_EPIDFD"
45134457 if musl => true ,
45144458
4515- // FIXME(linux ): Requires linux 6.5
4459+ // FIXME(value ): value needs update
45164460 "NFT_MSG_MAX" => true ,
45174461
45184462 // FIXME(linux): Requires >= 6.6 kernel headers.
4519- "XDP_USE_SG"
4520- | "XDP_PKT_CONTD"
4521- =>
4522- {
4523- true
4524- }
4463+ "XDP_USE_SG" | "XDP_PKT_CONTD" => true ,
45254464
4526- // FIXME(linux): Requires >= 6.6 kernel headers.
4527- "PR_MDWE_NO_INHERIT" => true ,
4465+ // FIXME(linux): Missing only on this platform for some reason
4466+ "PR_MDWE_NO_INHERIT" if gnueabihf => true ,
45284467
45294468 // FIXME(linux): Requires >= 6.8 kernel headers.
45304469 "XDP_UMEM_TX_SW_CSUM"
45314470 | "XDP_TXMD_FLAGS_TIMESTAMP"
45324471 | "XDP_TXMD_FLAGS_CHECKSUM"
45334472 | "XDP_TX_METADATA"
4534- =>
4535- {
4536- true
4537- }
4473+ => true ,
45384474
45394475 // FIXME(linux): Requires >= 6.11 kernel headers.
4540- "XDP_UMEM_TX_METADATA_LEN"
4541- =>
4542- {
4543- true
4544- }
4476+ "XDP_UMEM_TX_METADATA_LEN" => true ,
45454477
45464478 // FIXME(linux): Requires >= 6.11 kernel headers.
45474479 "NS_GET_MNTNS_ID" | "NS_GET_PID_FROM_PIDNS" | "NS_GET_TGID_FROM_PIDNS" | "NS_GET_PID_IN_PIDNS" | "NS_GET_TGID_IN_PIDNS" => true ,
@@ -4584,15 +4516,11 @@ fn test_linux(target: &str) {
45844516 | "PF_SUSPEND_TASK" => true ,
45854517
45864518 // FIXME(linux): Requires >= 6.9 kernel headers.
4587- "EPIOCSPARAMS"
4588- | "EPIOCGPARAMS" => true ,
4519+ "EPIOCSPARAMS" | "EPIOCGPARAMS" => true ,
45894520
45904521 // FIXME(linux): Requires >= 6.11 kernel headers.
45914522 "MAP_DROPPABLE" => true ,
45924523
4593- // FIXME(linux): Requires >= 6.2 kernel headers.
4594- "SOF_TIMESTAMPING_OPT_ID_TCP" => true ,
4595-
45964524 // FIXME(linux): Requires >= 6.12 kernel headers.
45974525 "SOF_TIMESTAMPING_OPT_RX_FILTER" => true ,
45984526
@@ -4602,12 +4530,10 @@ fn test_linux(target: &str) {
46024530 | "SO_DEVMEM_DONTNEED"
46034531 | "SCM_DEVMEM_LINEAR"
46044532 | "SCM_DEVMEM_DMABUF" => true ,
4533+
46054534 // FIXME(linux): Requires >= 6.4 kernel headers.
46064535 "PTRACE_SET_SYSCALL_USER_DISPATCH_CONFIG" | "PTRACE_GET_SYSCALL_USER_DISPATCH_CONFIG" => true ,
46074536
4608- // FIXME(linux): Requires >= 6.6 kernel headers.
4609- "PROC_EVENT_NONZERO_EXIT" => true ,
4610-
46114537 // FIXME(linux): Requires >= 6.14 kernel headers.
46124538 "SECBIT_EXEC_DENY_INTERACTIVE"
46134539 | "SECBIT_EXEC_DENY_INTERACTIVE_LOCKED"
0 commit comments