@@ -4212,13 +4212,11 @@ fn test_linux(target: &str) {
42124212 || name == "SO_DEVMEM_DMABUF"
42134213 || name == "SO_DEVMEM_DONTNEED"
42144214 {
4215- return true ;
4215+ return true ;
42164216 }
42174217 // FIXME(musl): Not in musl yet
4218- if name == "SCM_DEVMEM_LINEAR"
4219- || name == "SCM_DEVMEM_DMABUF"
4220- {
4221- return true ;
4218+ if name == "SCM_DEVMEM_LINEAR" || name == "SCM_DEVMEM_DMABUF" {
4219+ return true ;
42224220 }
42234221 // FIXME: Does not exist on non-x86 architectures, slated for removal
42244222 // in libc in 1.0
@@ -4230,7 +4228,7 @@ fn test_linux(target: &str) {
42304228 // Constants that don't exist on the old version of musl we test with, but do exist
42314229 // on newer versions.
42324230 match name {
4233- | "FAN_EVENT_INFO_TYPE_ERROR"
4231+ "FAN_EVENT_INFO_TYPE_ERROR"
42344232 | "FAN_EVENT_INFO_TYPE_NEW_DFID_NAME"
42354233 | "FAN_EVENT_INFO_TYPE_OLD_DFID_NAME"
42364234 | "FAN_FS_ERROR"
@@ -4252,8 +4250,7 @@ fn test_linux(target: &str) {
42524250 | "RLIM_NLIMITS"
42534251 | "SI_DETHREAD"
42544252 | "SO_BUSY_POLL_BUDGET"
4255- | "SO_PREFER_BUSY_POLL"
4256- => return true ,
4253+ | "SO_PREFER_BUSY_POLL" => return true ,
42574254 // Values changed in newer musl versions on these arches
42584255 "O_LARGEFILE" if riscv64 || x86_64 => return true ,
42594256 _ => ( ) ,
@@ -4264,13 +4261,13 @@ fn test_linux(target: &str) {
42644261 // and can therefore not be tested here
42654262 //
42664263 // The IPV6 constants are tested in the `linux_ipv6.rs` tests:
4267- | "IPV6_FLOWINFO"
4264+ "IPV6_FLOWINFO"
42684265 | "IPV6_FLOWLABEL_MGR"
42694266 | "IPV6_FLOWINFO_SEND"
42704267 | "IPV6_FLOWINFO_FLOWLABEL"
4271- | "IPV6_FLOWINFO_PRIORITY"
4268+ | "IPV6_FLOWINFO_PRIORITY" => true ,
42724269 // The F_ fnctl constants are tested in the `linux_fnctl.rs` tests:
4273- | "F_CANCELLK"
4270+ "F_CANCELLK"
42744271 | "F_ADD_SEALS"
42754272 | "F_GET_SEALS"
42764273 | "F_SEAL_SEAL"
@@ -4293,12 +4290,7 @@ fn test_linux(target: &str) {
42934290
42944291 // FIXME(linux): conflicts with glibc headers and is tested in
42954292 // `linux_termios.rs` below:
4296- | "BOTHER"
4297- | "IBSHIFT"
4298- | "TCGETS2"
4299- | "TCSETS2"
4300- | "TCSETSW2"
4301- | "TCSETSF2" => true ,
4293+ "BOTHER" | "IBSHIFT" | "TCGETS2" | "TCSETS2" | "TCSETSW2" | "TCSETSF2" => true ,
43024294
43034295 // FIXME(musl): on musl the pthread types are defined a little differently
43044296 // - these constants are used by the glibc implementation.
@@ -4318,13 +4310,17 @@ fn test_linux(target: &str) {
43184310 "SYS_clone3" if sparc64 => true ,
43194311
43204312 // FIXME(linux): Not defined on ARM, gnueabihf, mips, musl, PowerPC, riscv64, s390x, and sparc64.
4321- "SYS_memfd_secret" if arm | gnueabihf | mips | musl | ppc | riscv64 | s390x | sparc64 => true ,
4313+ "SYS_memfd_secret"
4314+ if arm | gnueabihf | mips | musl | ppc | riscv64 | s390x | sparc64 =>
4315+ {
4316+ true
4317+ }
43224318
43234319 // Skip as this signal codes and trap reasons need newer headers
43244320 "TRAP_PERF" => true ,
43254321
43264322 // kernel constants not available in uclibc 1.0.34
4327- | "EXTPROC"
4323+ "EXTPROC"
43284324 | "IPPROTO_BEETPH"
43294325 | "IPPROTO_MPLS"
43304326 | "IPV6_HDRINCL"
@@ -4337,7 +4333,10 @@ fn test_linux(target: &str) {
43374333 | "SHM_EXEC"
43384334 | "UDP_GRO"
43394335 | "UDP_SEGMENT"
4340- if uclibc => true ,
4336+ if uclibc =>
4337+ {
4338+ true
4339+ }
43414340
43424341 // headers conflicts with linux/pidfd.h
43434342 "PIDFD_NONBLOCK" => true ,
@@ -4380,17 +4379,18 @@ fn test_linux(target: &str) {
43804379 | "PR_SCHED_CORE_SCOPE_THREAD"
43814380 | "PR_SCHED_CORE_SCOPE_THREAD_GROUP"
43824381 | "PR_SCHED_CORE_SHARE_FROM"
4383- | "PR_SCHED_CORE_SHARE_TO" if old_musl => true ,
4382+ | "PR_SCHED_CORE_SHARE_TO"
4383+ if old_musl =>
4384+ {
4385+ true
4386+ }
43844387
43854388 // Not present in glibc
43864389 "PR_SME_VL_LEN_MAX" | "PR_SME_SET_VL_INHERIT" | "PR_SME_SET_VL_ONE_EXEC" if gnu => true ,
43874390
43884391 // FIXME(linux): The below is no longer const in glibc 2.34:
43894392 // https://github.com/bminor/glibc/commit/5d98a7dae955bafa6740c26eaba9c86060ae0344
4390- | "PTHREAD_STACK_MIN"
4391- | "SIGSTKSZ"
4392- | "MINSIGSTKSZ"
4393- if gnu => true ,
4393+ "PTHREAD_STACK_MIN" | "SIGSTKSZ" | "MINSIGSTKSZ" if gnu => true ,
43944394
43954395 // value changed
43964396 "NF_NETDEV_NUMHOOKS" if sparc64 => true ,
@@ -4417,7 +4417,10 @@ fn test_linux(target: &str) {
44174417 | "FAN_EVENT_INFO_TYPE_PIDFD"
44184418 | "FAN_NOPIDFD"
44194419 | "FAN_EPIDFD"
4420- if musl => true ,
4420+ if musl =>
4421+ {
4422+ true
4423+ }
44214424
44224425 // FIXME(linux): Requires >= 6.6 kernel headers.
44234426 "XDP_USE_SG" | "XDP_PKT_CONTD" => true ,
@@ -4429,16 +4432,21 @@ fn test_linux(target: &str) {
44294432 "XDP_UMEM_TX_SW_CSUM"
44304433 | "XDP_TXMD_FLAGS_TIMESTAMP"
44314434 | "XDP_TXMD_FLAGS_CHECKSUM"
4432- | "XDP_TX_METADATA"
4433- => true ,
4435+ | "XDP_TX_METADATA" => true ,
44344436
44354437 // FIXME(linux): Requires >= 6.11 kernel headers.
44364438 "XDP_UMEM_TX_METADATA_LEN" => true ,
44374439
44384440 // FIXME(linux): Requires >= 6.11 kernel headers.
4439- "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 ,
4441+ "NS_GET_MNTNS_ID"
4442+ | "NS_GET_PID_FROM_PIDNS"
4443+ | "NS_GET_TGID_FROM_PIDNS"
4444+ | "NS_GET_PID_IN_PIDNS"
4445+ | "NS_GET_TGID_IN_PIDNS" => true ,
44404446 // FIXME(linux): Requires >= 6.12 kernel headers.
4441- "MNT_NS_INFO_SIZE_VER0" | "NS_MNT_GET_INFO" | "NS_MNT_GET_NEXT" | "NS_MNT_GET_PREV" => true ,
4447+ "MNT_NS_INFO_SIZE_VER0" | "NS_MNT_GET_INFO" | "NS_MNT_GET_NEXT" | "NS_MNT_GET_PREV" => {
4448+ true
4449+ }
44424450
44434451 // FIXME(linux): Requires >= 6.6 kernel headers.
44444452 "SYS_fchmodat2" => true ,
@@ -4447,33 +4455,13 @@ fn test_linux(target: &str) {
44474455 "SYS_mseal" => true ,
44484456
44494457 // FIXME(linux): seems to not be available all the time (from <include/linux/sched.h>:
4450- "PF_VCPU"
4451- | "PF_IDLE"
4452- | "PF_EXITING"
4453- | "PF_POSTCOREDUMP"
4454- | "PF_IO_WORKER"
4455- | "PF_WQ_WORKER"
4456- | "PF_FORKNOEXEC"
4457- | "PF_MCE_PROCESS"
4458- | "PF_SUPERPRIV"
4459- | "PF_DUMPCORE"
4460- | "PF_SIGNALED"
4461- | "PF_MEMALLOC"
4462- | "PF_NPROC_EXCEEDED"
4463- | "PF_USED_MATH"
4464- | "PF_USER_WORKER"
4465- | "PF_NOFREEZE"
4466- | "PF_KSWAPD"
4467- | "PF_MEMALLOC_NOFS"
4468- | "PF_MEMALLOC_NOIO"
4469- | "PF_LOCAL_THROTTLE"
4470- | "PF_KTHREAD"
4471- | "PF_RANDOMIZE"
4472- | "PF_NO_SETAFFINITY"
4473- | "PF_MCE_EARLY"
4474- | "PF_MEMALLOC_PIN"
4475- | "PF_BLOCK_TS"
4476- | "PF_SUSPEND_TASK" => true ,
4458+ "PF_VCPU" | "PF_IDLE" | "PF_EXITING" | "PF_POSTCOREDUMP" | "PF_IO_WORKER"
4459+ | "PF_WQ_WORKER" | "PF_FORKNOEXEC" | "PF_MCE_PROCESS" | "PF_SUPERPRIV"
4460+ | "PF_DUMPCORE" | "PF_SIGNALED" | "PF_MEMALLOC" | "PF_NPROC_EXCEEDED"
4461+ | "PF_USED_MATH" | "PF_USER_WORKER" | "PF_NOFREEZE" | "PF_KSWAPD"
4462+ | "PF_MEMALLOC_NOFS" | "PF_MEMALLOC_NOIO" | "PF_LOCAL_THROTTLE" | "PF_KTHREAD"
4463+ | "PF_RANDOMIZE" | "PF_NO_SETAFFINITY" | "PF_MCE_EARLY" | "PF_MEMALLOC_PIN"
4464+ | "PF_BLOCK_TS" | "PF_SUSPEND_TASK" => true ,
44774465
44784466 // FIXME(linux): Requires >= 6.9 kernel headers.
44794467 "EPIOCSPARAMS" | "EPIOCGPARAMS" => true ,
@@ -4485,14 +4473,12 @@ fn test_linux(target: &str) {
44854473 "SOF_TIMESTAMPING_OPT_RX_FILTER" => true ,
44864474
44874475 // FIXME(linux): Requires >= 6.12 kernel headers.
4488- "SO_DEVMEM_LINEAR"
4489- | "SO_DEVMEM_DMABUF"
4490- | "SO_DEVMEM_DONTNEED"
4491- | "SCM_DEVMEM_LINEAR"
4492- | "SCM_DEVMEM_DMABUF" => true ,
4476+ "SO_DEVMEM_LINEAR" | "SO_DEVMEM_DMABUF" | "SO_DEVMEM_DONTNEED"
4477+ | "SCM_DEVMEM_LINEAR" | "SCM_DEVMEM_DMABUF" => true ,
44934478
44944479 // FIXME(linux): Requires >= 6.4 kernel headers.
4495- "PTRACE_SET_SYSCALL_USER_DISPATCH_CONFIG" | "PTRACE_GET_SYSCALL_USER_DISPATCH_CONFIG" => true ,
4480+ "PTRACE_SET_SYSCALL_USER_DISPATCH_CONFIG"
4481+ | "PTRACE_GET_SYSCALL_USER_DISPATCH_CONFIG" => true ,
44964482
44974483 // FIXME(linux): Requires >= 6.14 kernel headers.
44984484 "SECBIT_EXEC_DENY_INTERACTIVE"
0 commit comments