diff --git a/ci/docker/i686-unknown-linux-gnu/Dockerfile b/ci/docker/i686-unknown-linux-gnu/Dockerfile index 5a2f4c9dd43ec..b1596071b8f63 100644 --- a/ci/docker/i686-unknown-linux-gnu/Dockerfile +++ b/ci/docker/i686-unknown-linux-gnu/Dockerfile @@ -1,9 +1,6 @@ -FROM ubuntu:23.10 +FROM ubuntu:25.04 -# FIXME(time): we are using an EOL release because 24.04 changes to 64-bit time -RUN sed -i -E 's/(archive|security)\.ubuntu\.com/old-releases.ubuntu.com/g' \ - /etc/apt/sources.list && \ - apt-get update && apt-get install -y --no-install-recommends \ +RUN apt-get update && apt-get install -y --no-install-recommends \ ca-certificates \ gcc-multilib \ libc6-dev diff --git a/ci/docker/i686-unknown-linux-musl/Dockerfile b/ci/docker/i686-unknown-linux-musl/Dockerfile index ce3abd0e538c8..225823d6143c5 100644 --- a/ci/docker/i686-unknown-linux-musl/Dockerfile +++ b/ci/docker/i686-unknown-linux-musl/Dockerfile @@ -1,9 +1,6 @@ -FROM ubuntu:23.10 +FROM ubuntu:25.04 -# FIXME(time): we are using an EOL release because 24.04 changes to 64-bit time -RUN sed -i -E 's/(archive|security)\.ubuntu\.com/old-releases.ubuntu.com/g' \ - /etc/apt/sources.list && \ - dpkg --add-architecture i386 && \ +RUN dpkg --add-architecture i386 && \ apt-get update && apt-get install -y --no-install-recommends \ ca-certificates \ curl \ diff --git a/libc-test/build.rs b/libc-test/build.rs index 6050c4d8a4b23..56588ab8cd632 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -2056,9 +2056,6 @@ fn test_android(target: &str) { // Needs a newer Android SDK for the definition "P_PIDFD" => true, - // Requires Linux kernel 5.6 - "VMADDR_CID_LOCAL" => true, - // FIXME(android): conflicts with standard C headers and is tested in // `linux_termios.rs` below: "BOTHER" => true, @@ -2067,28 +2064,10 @@ fn test_android(target: &str) { // is a private value for kernel usage normally "FUSE_SUPER_MAGIC" => true, - // linux 5.12 min - "MPOL_F_NUMA_BALANCING" => true, // GRND_INSECURE was added in platform-tools-30.0.0 "GRND_INSECURE" => true, - // kernel 5.10 minimum required - "MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_RSEQ" | "MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ" => true, - - // kernel 5.18 minimum - | "MADV_COLD" - | "MADV_DONTNEED_LOCKED" - | "MADV_PAGEOUT" - | "MADV_POPULATE_READ" - | "MADV_POPULATE_WRITE" => true, - - // kernel 5.6 minimum required - "IPPROTO_MPTCP" | "IPPROTO_ETHERNET" => true, - - // kernel 6.2 minimum - "TUN_F_USO4" | "TUN_F_USO6" | "IFF_NO_CARRIER" => true, - // FIXME(android): NDK r22 minimum required | "FDB_NOTIFY_BIT" | "FDB_NOTIFY_INACTIVE_BIT" @@ -3664,6 +3643,13 @@ fn config_gnu_bits(target: &str, cfg: &mut ctest::TestGenerator) { fn test_linux(target: &str) { assert!(target.contains("linux") || target.contains("l4re")); + // FIXME(linux32): Some 32 bit targets use old kernel headers because newer distros enforce 64 + // bit time. Use this to avoid skipping tests also on 64 bit targets. + let pointer_width = env::var("CARGO_CFG_TARGET_POINTER_WIDTH") + .unwrap_or_default() + .parse::() + .unwrap_or_default(); + // target_os let linux = target.contains("linux"); let l4re = target.contains("l4re"); @@ -4039,7 +4025,7 @@ fn test_linux(target: &str) { cfg.skip_struct(move |struct_| { let ty = struct_.ident(); - // FIXME(linux): CI has old headers + // FIXME(linux): Requires >= 6.12 kernel headers. CI has old headers if ty == "ptp_sys_offset_extended" { return true; } @@ -4106,14 +4092,17 @@ fn test_linux(target: &str) { "sctp_initmsg" | "sctp_sndrcvinfo" | "sctp_sndinfo" | "sctp_rcvinfo" | "sctp_nxtinfo" | "sctp_prinfo" | "sctp_authinfo" => true, - // FIXME(linux): Requires >= 6.8 kernel headers. - // A field was added in 6.8. + // FIXME(musl): A field was added in linux 6.8, not yet in musl + // FIXME(linux32): A field was added in linux 6.8 // https://github.com/torvalds/linux/commit/341ac980eab90ac1f6c22ee9f9da83ed9604d899 // The previous version of the struct was removed in 6.11 due to a bug. // https://github.com/torvalds/linux/commit/32654bbd6313b4cfc82297e6634fa9725c3c900f - "xdp_umem_reg" => true, + "xdp_umem_reg" if musl || pointer_width == 32 => true, - // FIXME(linux): Requires >= 6.8 kernel headers. + // FIXME(1.0,linux): A new field was added to `xsk_tx_metadata_request` in linux 6.15. + // https://github.com/torvalds/linux/commit/ca4419f15abd19ba8be1e109661b60f9f5b6c9f0 + // When updating, consider giving the `__c_anonymous_` prefix to the enum variants + // `xsk_tx_metadata_request` and `xsk_tx_metadata_completion`. "xsk_tx_metadata" | "xsk_tx_metadata_request" | "xsk_tx_metadata_completion" => true, // A new field was added in kernel 5.4, this is the old version for backwards compatibility. @@ -4422,17 +4411,22 @@ fn test_linux(target: &str) { true } - // FIXME(linux): Requires >= 6.6 kernel headers. - "XDP_USE_SG" | "XDP_PKT_CONTD" => true, + // FIXME(linux32): Requires >= 6.6 kernel headers. + "XDP_USE_SG" | "XDP_PKT_CONTD" if pointer_width == 32 => true, // FIXME(linux): Missing only on this platform for some reason "PR_MDWE_NO_INHERIT" if gnueabihf => true, - // FIXME(linux): Requires >= 6.8 kernel headers. + // FIXME(musl): Not yet in musl + // FIXME(linux32): Requires >= 6.8 kernel headers. "XDP_UMEM_TX_SW_CSUM" | "XDP_TXMD_FLAGS_TIMESTAMP" | "XDP_TXMD_FLAGS_CHECKSUM" - | "XDP_TX_METADATA" => true, + | "XDP_TX_METADATA" + if musl || pointer_width == 32 => + { + true + } // FIXME(linux): Requires >= 6.11 kernel headers. "XDP_UMEM_TX_METADATA_LEN" => true, @@ -4448,9 +4442,6 @@ fn test_linux(target: &str) { true } - // FIXME(linux): Requires >= 6.6 kernel headers. - "SYS_fchmodat2" => true, - // FIXME(linux): Requires >= 6.10 kernel headers. "SYS_mseal" => true,