From 1b201de3491846f23f44b90c35b9554bf43facfb Mon Sep 17 00:00:00 2001 From: Yuki Okushi Date: Tue, 20 Sep 2022 07:55:27 +0900 Subject: [PATCH 1/5] Update Docker image to Ubuntu 22.04 Signed-off-by: Yuki Okushi --- ci/docker/aarch64-linux-android/Dockerfile | 2 +- ci/docker/aarch64-unknown-linux-gnu/Dockerfile | 2 +- ci/docker/aarch64-unknown-linux-musl/Dockerfile | 2 +- ci/docker/arm-linux-androideabi/Dockerfile | 2 +- ci/docker/arm-unknown-linux-gnueabihf/Dockerfile | 2 +- ci/docker/arm-unknown-linux-musleabihf/Dockerfile | 2 +- ci/docker/armv7-unknown-linux-uclibceabihf/Dockerfile | 2 +- ci/docker/asmjs-unknown-emscripten/Dockerfile | 2 +- ci/docker/i686-linux-android/Dockerfile | 2 +- ci/docker/i686-unknown-linux-gnu/Dockerfile | 2 +- ci/docker/i686-unknown-linux-musl/Dockerfile | 2 +- ci/docker/mips-unknown-linux-gnu/Dockerfile | 2 +- ci/docker/mips-unknown-linux-musl/Dockerfile | 2 +- ci/docker/mips64-unknown-linux-gnuabi64/Dockerfile | 2 +- ci/docker/mips64-unknown-linux-muslabi64/Dockerfile | 2 +- ci/docker/mips64el-unknown-linux-gnuabi64/Dockerfile | 2 +- ci/docker/mips64el-unknown-linux-muslabi64/Dockerfile | 2 +- ci/docker/mipsel-unknown-linux-musl/Dockerfile | 2 +- ci/docker/mipsel-unknown-linux-uclibc/Dockerfile | 2 +- ci/docker/powerpc-unknown-linux-gnu/Dockerfile | 2 +- ci/docker/powerpc64-unknown-linux-gnu/Dockerfile | 2 +- ci/docker/powerpc64le-unknown-linux-gnu/Dockerfile | 2 +- ci/docker/riscv64gc-unknown-linux-gnu/Dockerfile | 2 +- ci/docker/s390x-unknown-linux-gnu/Dockerfile | 2 +- ci/docker/s390x-unknown-linux-musl/Dockerfile | 2 +- ci/docker/sparc64-unknown-linux-gnu/Dockerfile | 2 +- ci/docker/wasm32-unknown-emscripten/Dockerfile | 2 +- ci/docker/wasm32-wasi/Dockerfile | 2 +- ci/docker/x86_64-linux-android/Dockerfile | 2 +- ci/docker/x86_64-unknown-linux-gnu/Dockerfile | 2 +- ci/docker/x86_64-unknown-linux-gnux32/Dockerfile | 2 +- ci/docker/x86_64-unknown-linux-musl/Dockerfile | 2 +- 32 files changed, 32 insertions(+), 32 deletions(-) diff --git a/ci/docker/aarch64-linux-android/Dockerfile b/ci/docker/aarch64-linux-android/Dockerfile index 0aa99eeea10ae..b009e95b0e71e 100644 --- a/ci/docker/aarch64-linux-android/Dockerfile +++ b/ci/docker/aarch64-linux-android/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:20.04 +FROM ubuntu:22.04 RUN dpkg --add-architecture i386 RUN apt-get update diff --git a/ci/docker/aarch64-unknown-linux-gnu/Dockerfile b/ci/docker/aarch64-unknown-linux-gnu/Dockerfile index 0588b4643a9e4..a609d8a3b7a28 100644 --- a/ci/docker/aarch64-unknown-linux-gnu/Dockerfile +++ b/ci/docker/aarch64-unknown-linux-gnu/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:20.04 +FROM ubuntu:22.04 RUN apt-get update && apt-get install -y --no-install-recommends \ gcc libc6-dev ca-certificates \ gcc-aarch64-linux-gnu libc6-dev-arm64-cross qemu-user diff --git a/ci/docker/aarch64-unknown-linux-musl/Dockerfile b/ci/docker/aarch64-unknown-linux-musl/Dockerfile index fa00395125ff9..2002879e8c9e0 100644 --- a/ci/docker/aarch64-unknown-linux-musl/Dockerfile +++ b/ci/docker/aarch64-unknown-linux-musl/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:20.04 +FROM ubuntu:22.04 RUN apt-get update && apt-get install -y --no-install-recommends \ gcc make libc6-dev git curl ca-certificates \ diff --git a/ci/docker/arm-linux-androideabi/Dockerfile b/ci/docker/arm-linux-androideabi/Dockerfile index e5cc79d87fd1b..93d850b38eb1f 100644 --- a/ci/docker/arm-linux-androideabi/Dockerfile +++ b/ci/docker/arm-linux-androideabi/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:20.04 +FROM ubuntu:22.04 RUN dpkg --add-architecture i386 RUN apt-get update diff --git a/ci/docker/arm-unknown-linux-gnueabihf/Dockerfile b/ci/docker/arm-unknown-linux-gnueabihf/Dockerfile index 299ff9719fd57..57efe887b6292 100644 --- a/ci/docker/arm-unknown-linux-gnueabihf/Dockerfile +++ b/ci/docker/arm-unknown-linux-gnueabihf/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:20.04 +FROM ubuntu:22.04 RUN apt-get update && apt-get install -y --no-install-recommends \ gcc libc6-dev ca-certificates \ gcc-arm-linux-gnueabihf libc6-dev-armhf-cross qemu-user diff --git a/ci/docker/arm-unknown-linux-musleabihf/Dockerfile b/ci/docker/arm-unknown-linux-musleabihf/Dockerfile index f7d9ec53bdcc0..53228f46e6cef 100644 --- a/ci/docker/arm-unknown-linux-musleabihf/Dockerfile +++ b/ci/docker/arm-unknown-linux-musleabihf/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:20.04 +FROM ubuntu:22.04 RUN apt-get update && apt-get install -y --no-install-recommends \ gcc make libc6-dev git curl ca-certificates \ diff --git a/ci/docker/armv7-unknown-linux-uclibceabihf/Dockerfile b/ci/docker/armv7-unknown-linux-uclibceabihf/Dockerfile index 4f94531d9f150..e6be22c93c637 100644 --- a/ci/docker/armv7-unknown-linux-uclibceabihf/Dockerfile +++ b/ci/docker/armv7-unknown-linux-uclibceabihf/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:20.04 +FROM ubuntu:22.04 RUN apt-get update && apt-get install -y --no-install-recommends \ gcc libc6-dev qemu-user ca-certificates qemu-system-arm curl \ diff --git a/ci/docker/asmjs-unknown-emscripten/Dockerfile b/ci/docker/asmjs-unknown-emscripten/Dockerfile index bf41bfa9a3efb..72a47f29020e2 100644 --- a/ci/docker/asmjs-unknown-emscripten/Dockerfile +++ b/ci/docker/asmjs-unknown-emscripten/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:20.04 +FROM ubuntu:22.04 # This is a workaround to avoid the interaction with tzdata. ENV DEBIAN_FRONTEND=noninteractive diff --git a/ci/docker/i686-linux-android/Dockerfile b/ci/docker/i686-linux-android/Dockerfile index 62a379b3cf8bc..ed1b2e9fbef0e 100644 --- a/ci/docker/i686-linux-android/Dockerfile +++ b/ci/docker/i686-linux-android/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:20.04 +FROM ubuntu:22.04 RUN dpkg --add-architecture i386 RUN apt-get update diff --git a/ci/docker/i686-unknown-linux-gnu/Dockerfile b/ci/docker/i686-unknown-linux-gnu/Dockerfile index 6bab1d0c64fab..bbe76a4c5c16c 100644 --- a/ci/docker/i686-unknown-linux-gnu/Dockerfile +++ b/ci/docker/i686-unknown-linux-gnu/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:20.04 +FROM ubuntu:22.04 RUN apt-get update RUN apt-get install -y --no-install-recommends \ gcc-multilib libc6-dev ca-certificates diff --git a/ci/docker/i686-unknown-linux-musl/Dockerfile b/ci/docker/i686-unknown-linux-musl/Dockerfile index f168be993cae0..fd2ba4c63b166 100644 --- a/ci/docker/i686-unknown-linux-musl/Dockerfile +++ b/ci/docker/i686-unknown-linux-musl/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:20.04 +FROM ubuntu:22.04 RUN dpkg --add-architecture i386 RUN apt-get update diff --git a/ci/docker/mips-unknown-linux-gnu/Dockerfile b/ci/docker/mips-unknown-linux-gnu/Dockerfile index 574f184673fdc..333a5bae32a9d 100644 --- a/ci/docker/mips-unknown-linux-gnu/Dockerfile +++ b/ci/docker/mips-unknown-linux-gnu/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:20.04 +FROM ubuntu:22.04 RUN apt-get update && apt-get install -y --no-install-recommends \ gcc libc6-dev qemu-user ca-certificates \ diff --git a/ci/docker/mips-unknown-linux-musl/Dockerfile b/ci/docker/mips-unknown-linux-musl/Dockerfile index a078c1bd72946..6fbd284fb9ba3 100644 --- a/ci/docker/mips-unknown-linux-musl/Dockerfile +++ b/ci/docker/mips-unknown-linux-musl/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:20.04 +FROM ubuntu:22.04 RUN apt-get update && apt-get install -y --no-install-recommends \ gcc libc6-dev qemu-user ca-certificates qemu-system-mips curl \ diff --git a/ci/docker/mips64-unknown-linux-gnuabi64/Dockerfile b/ci/docker/mips64-unknown-linux-gnuabi64/Dockerfile index 83a52d87ac8fa..263a2a77d5501 100644 --- a/ci/docker/mips64-unknown-linux-gnuabi64/Dockerfile +++ b/ci/docker/mips64-unknown-linux-gnuabi64/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:20.04 +FROM ubuntu:22.04 RUN apt-get update && apt-get install -y --no-install-recommends \ gcc libc6-dev qemu-user ca-certificates \ diff --git a/ci/docker/mips64-unknown-linux-muslabi64/Dockerfile b/ci/docker/mips64-unknown-linux-muslabi64/Dockerfile index 2d34919c7a36e..9e36b3b7f7f25 100644 --- a/ci/docker/mips64-unknown-linux-muslabi64/Dockerfile +++ b/ci/docker/mips64-unknown-linux-muslabi64/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:20.04 +FROM ubuntu:22.04 RUN apt-get update && apt-get install -y --no-install-recommends \ gcc make libc6-dev git curl ca-certificates \ diff --git a/ci/docker/mips64el-unknown-linux-gnuabi64/Dockerfile b/ci/docker/mips64el-unknown-linux-gnuabi64/Dockerfile index 2ba6b2526916a..49fd75cb04f38 100644 --- a/ci/docker/mips64el-unknown-linux-gnuabi64/Dockerfile +++ b/ci/docker/mips64el-unknown-linux-gnuabi64/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:20.04 +FROM ubuntu:22.04 RUN apt-get update && apt-get install -y --no-install-recommends \ gcc libc6-dev qemu-user ca-certificates \ diff --git a/ci/docker/mips64el-unknown-linux-muslabi64/Dockerfile b/ci/docker/mips64el-unknown-linux-muslabi64/Dockerfile index 2960729c1836b..c8b6f122a5f23 100644 --- a/ci/docker/mips64el-unknown-linux-muslabi64/Dockerfile +++ b/ci/docker/mips64el-unknown-linux-muslabi64/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:20.04 +FROM ubuntu:22.04 RUN apt-get update && apt-get install -y --no-install-recommends \ gcc make libc6-dev git curl ca-certificates \ diff --git a/ci/docker/mipsel-unknown-linux-musl/Dockerfile b/ci/docker/mipsel-unknown-linux-musl/Dockerfile index 16ddd0baf8deb..dad215abf5601 100644 --- a/ci/docker/mipsel-unknown-linux-musl/Dockerfile +++ b/ci/docker/mipsel-unknown-linux-musl/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:20.04 +FROM ubuntu:22.04 RUN apt-get update && apt-get install -y --no-install-recommends \ gcc libc6-dev qemu-user ca-certificates qemu-system-mipsel curl \ diff --git a/ci/docker/mipsel-unknown-linux-uclibc/Dockerfile b/ci/docker/mipsel-unknown-linux-uclibc/Dockerfile index 5abb49dbe6681..fe9806d0535b8 100644 --- a/ci/docker/mipsel-unknown-linux-uclibc/Dockerfile +++ b/ci/docker/mipsel-unknown-linux-uclibc/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:20.04 +FROM ubuntu:22.04 RUN apt-get update && apt-get install -y --no-install-recommends \ gcc libc6-dev qemu-user ca-certificates qemu-system-mipsel curl \ diff --git a/ci/docker/powerpc-unknown-linux-gnu/Dockerfile b/ci/docker/powerpc-unknown-linux-gnu/Dockerfile index 2298b964b9ffb..50edc7d97dda9 100644 --- a/ci/docker/powerpc-unknown-linux-gnu/Dockerfile +++ b/ci/docker/powerpc-unknown-linux-gnu/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:20.04 +FROM ubuntu:22.04 RUN apt-get update && apt-get install -y --no-install-recommends \ gcc libc6-dev qemu-user ca-certificates \ diff --git a/ci/docker/powerpc64-unknown-linux-gnu/Dockerfile b/ci/docker/powerpc64-unknown-linux-gnu/Dockerfile index dcafec95fff6f..d04283615507a 100644 --- a/ci/docker/powerpc64-unknown-linux-gnu/Dockerfile +++ b/ci/docker/powerpc64-unknown-linux-gnu/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:20.04 +FROM ubuntu:22.04 RUN apt-get update && apt-get install -y --no-install-recommends \ gcc libc6-dev qemu-user ca-certificates \ diff --git a/ci/docker/powerpc64le-unknown-linux-gnu/Dockerfile b/ci/docker/powerpc64le-unknown-linux-gnu/Dockerfile index bfcd268a0b9f9..52e1874ff3b89 100644 --- a/ci/docker/powerpc64le-unknown-linux-gnu/Dockerfile +++ b/ci/docker/powerpc64le-unknown-linux-gnu/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:20.04 +FROM ubuntu:22.04 RUN apt-get update && apt-get install -y --no-install-recommends \ gcc libc6-dev qemu-user ca-certificates \ diff --git a/ci/docker/riscv64gc-unknown-linux-gnu/Dockerfile b/ci/docker/riscv64gc-unknown-linux-gnu/Dockerfile index 2ab35b317f96b..7102e605668e4 100644 --- a/ci/docker/riscv64gc-unknown-linux-gnu/Dockerfile +++ b/ci/docker/riscv64gc-unknown-linux-gnu/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:20.04 +FROM ubuntu:22.04 RUN apt-get update && apt-get install -y --no-install-recommends \ gcc libc6-dev qemu-user ca-certificates \ diff --git a/ci/docker/s390x-unknown-linux-gnu/Dockerfile b/ci/docker/s390x-unknown-linux-gnu/Dockerfile index b26252a00f6a4..73d158dbcf9e6 100644 --- a/ci/docker/s390x-unknown-linux-gnu/Dockerfile +++ b/ci/docker/s390x-unknown-linux-gnu/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:20.04 +FROM ubuntu:22.04 RUN apt-get update && apt-get install -y --no-install-recommends \ curl ca-certificates \ diff --git a/ci/docker/s390x-unknown-linux-musl/Dockerfile b/ci/docker/s390x-unknown-linux-musl/Dockerfile index b602920780180..ba6331e761001 100644 --- a/ci/docker/s390x-unknown-linux-musl/Dockerfile +++ b/ci/docker/s390x-unknown-linux-musl/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:20.04 +FROM ubuntu:22.04 RUN apt-get update && apt-get install -y --no-install-recommends \ curl ca-certificates \ diff --git a/ci/docker/sparc64-unknown-linux-gnu/Dockerfile b/ci/docker/sparc64-unknown-linux-gnu/Dockerfile index 6dabc8c563962..ff6810a7fac58 100644 --- a/ci/docker/sparc64-unknown-linux-gnu/Dockerfile +++ b/ci/docker/sparc64-unknown-linux-gnu/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:20.04 +FROM ubuntu:22.04 RUN apt-get update && apt-get install -y --no-install-recommends \ curl ca-certificates \ diff --git a/ci/docker/wasm32-unknown-emscripten/Dockerfile b/ci/docker/wasm32-unknown-emscripten/Dockerfile index 999b28c83c2a8..0722aa1beab4c 100644 --- a/ci/docker/wasm32-unknown-emscripten/Dockerfile +++ b/ci/docker/wasm32-unknown-emscripten/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:20.04 +FROM ubuntu:22.04 # This is a workaround to avoid the interaction with tzdata. ENV DEBIAN_FRONTEND=noninteractive diff --git a/ci/docker/wasm32-wasi/Dockerfile b/ci/docker/wasm32-wasi/Dockerfile index 874bdc3be4a8d..ffc4b4bdea079 100644 --- a/ci/docker/wasm32-wasi/Dockerfile +++ b/ci/docker/wasm32-wasi/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:20.04 +FROM ubuntu:22.04 RUN apt-get update && \ apt-get install -y --no-install-recommends \ diff --git a/ci/docker/x86_64-linux-android/Dockerfile b/ci/docker/x86_64-linux-android/Dockerfile index a814edda6cdea..bbce3b9a6bc8f 100644 --- a/ci/docker/x86_64-linux-android/Dockerfile +++ b/ci/docker/x86_64-linux-android/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:20.04 +FROM ubuntu:22.04 RUN apt-get update && \ apt-get install -y --no-install-recommends \ diff --git a/ci/docker/x86_64-unknown-linux-gnu/Dockerfile b/ci/docker/x86_64-unknown-linux-gnu/Dockerfile index 5eb1ad082316c..f8e6be479470b 100644 --- a/ci/docker/x86_64-unknown-linux-gnu/Dockerfile +++ b/ci/docker/x86_64-unknown-linux-gnu/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:20.04 +FROM ubuntu:22.04 RUN apt-get update RUN apt-get install -y --no-install-recommends \ gcc libc6-dev ca-certificates linux-headers-generic diff --git a/ci/docker/x86_64-unknown-linux-gnux32/Dockerfile b/ci/docker/x86_64-unknown-linux-gnux32/Dockerfile index 6bab1d0c64fab..bbe76a4c5c16c 100644 --- a/ci/docker/x86_64-unknown-linux-gnux32/Dockerfile +++ b/ci/docker/x86_64-unknown-linux-gnux32/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:20.04 +FROM ubuntu:22.04 RUN apt-get update RUN apt-get install -y --no-install-recommends \ gcc-multilib libc6-dev ca-certificates diff --git a/ci/docker/x86_64-unknown-linux-musl/Dockerfile b/ci/docker/x86_64-unknown-linux-musl/Dockerfile index ad4ad8f5b1a75..0495007640004 100644 --- a/ci/docker/x86_64-unknown-linux-musl/Dockerfile +++ b/ci/docker/x86_64-unknown-linux-musl/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:20.04 +FROM ubuntu:22.04 RUN apt-get update RUN apt-get install -y --no-install-recommends \ From 2cc4a61170e0d69e885b88ca14c8386e23b60ffe Mon Sep 17 00:00:00 2001 From: Yuki Okushi Date: Tue, 20 Sep 2022 19:39:54 +0900 Subject: [PATCH 2/5] test: Ignore some items changed in recent Linux versions Signed-off-by: Yuki Okushi --- libc-test/build.rs | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/libc-test/build.rs b/libc-test/build.rs index 9609cc55711b3..f3350fbef10c9 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -3268,6 +3268,17 @@ fn test_linux(target: &str) { | "RTNLGRP_STATS" // linux v5.18+ => true, + // FIXME: The below is no longer const in glibc 2.34: + // https://github.com/bminor/glibc/commit/5d98a7dae955bafa6740c26eaba9c86060ae0344 + | "PTHREAD_STACK_MIN" + | "SIGSTKSZ" + | "MINSIGSTKSZ" + if gnu => true, + + // FIXME: Linux >= 5.16 changed its value: + // https://github.com/torvalds/linux/commit/42df6e1d221dddc0f2acf2be37e68d553ad65f96 + "NF_NETDEV_NUMHOOKS" => true, + _ => false, } }); @@ -3424,7 +3435,10 @@ fn test_linux(target: &str) { // the `u` field is in fact an anonymous union (gnu && struct_ == "ptrace_syscall_info" && (field == "u" || field == "pad")) || // the vregs field is a `__uint128_t` C's type. - (struct_ == "user_fpsimd_struct" && field == "vregs") + (struct_ == "user_fpsimd_struct" && field == "vregs") || + // Linux >= 5.11 tweaked the `svm_zero` field of the `sockaddr_vm` struct. + // https://github.com/torvalds/linux/commit/dc8eeef73b63ed8988224ba6b5ed19a615163a7f + (struct_ == "sockaddr_vm" && field == "svm_zero") }); cfg.skip_roundtrip(move |s| match s { From 1f1527e580b1fc6c1d6114968b217680eb1d087b Mon Sep 17 00:00:00 2001 From: Yuki Okushi Date: Tue, 20 Sep 2022 19:48:29 +0900 Subject: [PATCH 3/5] test: Unignore some items Signed-off-by: Yuki Okushi --- libc-test/build.rs | 118 +++++---------------------------------------- 1 file changed, 13 insertions(+), 105 deletions(-) diff --git a/libc-test/build.rs b/libc-test/build.rs index f3350fbef10c9..6e676e9657436 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -2857,8 +2857,7 @@ fn test_linux(target: &str) { "linux/netfilter_ipv6.h", "linux/netfilter_ipv6/ip6_tables.h", "linux/netlink.h", - // FIXME: requires more recent kernel headers: - // "linux/openat2.h", + "linux/openat2.h", [!musl]: "linux/ptrace.h", "linux/quota.h", "linux/random.h", @@ -2956,11 +2955,6 @@ fn test_linux(target: &str) { // For internal use only, to define architecture specific ioctl constants with a libc 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, - _ => false, } }); @@ -3013,11 +3007,6 @@ fn test_linux(target: &str) { // which is absent in musl, has to be defined. "__exit_status" if musl => true, - // FIXME: CI's kernel header version is old. - "sockaddr_can" => true, - - // Requires glibc 2.33 or newer. - "mallinfo2" => true, // clone_args might differ b/w libc versions "clone_args" => true, @@ -3061,12 +3050,6 @@ fn test_linux(target: &str) { || name.starts_with("TCP_") || name.starts_with("UINPUT_") || name.starts_with("VMADDR_") - // FIXME: Requires >= 5.4.1 kernel headers - || name.starts_with("J1939") - // FIXME: Requires >= 5.4.1 kernel headers - || name.starts_with("SO_J1939") - // FIXME: Requires >= 5.4.1 kernel headers - || name.starts_with("SCM_J1939") { return true; } @@ -3093,9 +3076,6 @@ fn test_linux(target: &str) { // because including `linux/if_arp.h` causes some conflicts: "ARPHRD_CAN" => true, - // Require Linux kernel 5.1: - "F_SEAL_FUTURE_WRITE" => true, - // FIXME: deprecated: not available in any header // See: https://github.com/rust-lang/libc/issues/1356 "ENOATTR" => true, @@ -3124,12 +3104,6 @@ fn test_linux(target: &str) { // deprecated: not available from Linux kernel 5.6: "VMADDR_CID_RESERVED" => true, - // Require Linux kernel 5.6: - "VMADDR_CID_LOCAL" => true, - - // Requires Linux kernel 5.7: - "MREMAP_DONTUNMAP" => true, - // IPPROTO_MAX was increased in 5.6 for IPPROTO_MPTCP: | "IPPROTO_MAX" | "IPPROTO_MPTCP" => true, @@ -3142,52 +3116,17 @@ fn test_linux(target: &str) { // Not yet implemented on sparc64 "SYS_clone3" if mips | sparc64 => true, - // FIXME: these syscalls were added in Linux 5.9 or later - // and are currently not included in the glibc headers. - | "SYS_close_range" - | "SYS_openat2" - | "SYS_pidfd_getfd" - | "SYS_faccessat2" - | "SYS_process_madvise" - | "SYS_epoll_pwait2" - | "SYS_mount_setattr" => true, - - // FIXME: these syscalls were added in Linux 5.13 or later - // and are currently not included in the glibc headers. - | "SYS_quotactl_fd" - | "SYS_landlock_create_ruleset" - | "SYS_landlock_add_rule" - | "SYS_landlock_restrict_self" - | "SYS_memfd_secret" - | "SYS_process_mrelease" - | "SYS_futex_waitv" - | "SYS_set_mempolicy_home_node" => true, - - // Requires more recent kernel headers: - | "IFLA_PROP_LIST" - | "IFLA_ALT_IFNAME" - | "IFLA_PERM_ADDRESS" - | "IFLA_PROTO_DOWN_REASON" => true, - - // FIXME: They require recent kernel header: - | "CAN_J1939" - | "CAN_RAW_FILTER_MAX" - | "CAN_NPROTO" => true, - - // FIXME: Requires recent kernel headers (5.15) - | "J1939_NLA_TOTAL_SIZE" - | "J1939_NLA_PGN" - | "J1939_NLA_SRC_NAME" - | "J1939_NLA_DEST_NAME" - | "J1939_NLA_SRC_ADDR" - | "J1939_NLA_DEST_ADDR" - | "J1939_EE_INFO_RX_RTS" - | "J1939_EE_INFO_RX_DPO" - | "J1939_EE_INFO_RX_ABORT" - | "SOL_CAN_J1939" => true, - - // FIXME: Requires recent kernel headers (5.8): - "STATX_MNT_ID" => true, + // FIXME: Added in Linux 5.16 + // https://github.com/torvalds/linux/commit/039c0ec9bb77446d7ada7f55f90af9299b28ca49 + "SYS_futex_waitv" => true, + + // FIXME: Added in Linux 5.17 + // https://github.com/torvalds/linux/commit/c6018b4b254971863bd0ad36bb5e7d0fa0f0ddb0 + "SYS_set_mempolicy_home_node" => true, + + // FIXME: Added in Linux 5.18 + // https://github.com/torvalds/linux/commit/8b5413647262dda8d8d0e07e14ea1de9ac7cf0b2 + "NFQA_PRIORITY" => true, // FIXME: requires more recent kernel headers on CI | "UINPUT_VERSION" @@ -3195,18 +3134,6 @@ fn test_linux(target: &str) { | "SW_CNT" if mips || ppc64 || riscv64 || sparc64 => true, - // FIXME: Requires more recent kernel headers (5.9 / 5.11): - | "CLOSE_RANGE_UNSHARE" - | "CLOSE_RANGE_CLOEXEC" => true, - - // FIXME: requires more recent kernel headers: - | "RESOLVE_BENEATH" - | "RESOLVE_CACHED" - | "RESOLVE_IN_ROOT" - | "RESOLVE_NO_MAGICLINKS" - | "RESOLVE_NO_SYMLINKS" - | "RESOLVE_NO_XDEV" => true, - // FIXME: Not currently available in headers on ARM, MIPS and musl. "NETLINK_GET_STRICT_CHK" if arm || mips || musl => true, @@ -3233,14 +3160,10 @@ fn test_linux(target: &str) { // is a private value for kernel usage normally "FUSE_SUPER_MAGIC" => true, - // linux 5.12 min - "MPOL_F_NUMA_BALANCING" => true, + // linux 5.17 min "PR_SET_VMA" | "PR_SET_VMA_ANON_NAME" => true, - // GRND_INSECURE was added in glibc-2.32 - "GRND_INSECURE" => true, - // present in recent kernels only "PR_PAC_SET_ENABLED_KEYS" | "PR_PAC_GET_ENABLED_KEYS" => true, @@ -3248,21 +3171,6 @@ fn test_linux(target: &str) { "FUTEX_LOCK_PI2" => true, // FIXME: Parts of netfilter/nfnetlink*.h require more recent kernel headers: - | "NFNL_SUBSYS_HOOK" // v5.14+ - | "NFNL_SUBSYS_COUNT" // bumped in v5.14 - | "NFQA_VLAN" // v4.7+ - | "NFQA_L2HDR" // v4.7+ - | "NFQA_PRIORITY" // v5.18+ - | "NFQA_VLAN_UNSPEC" // v4.7+ - | "NFQA_VLAN_PROTO" // v4.7+ - | "NFQA_VLAN_TCI" // v4.7+ - | "NFULA_VLAN" // v5.4+ - | "NFULA_L2HDR" // v5.4+ - | "NFULA_VLAN_UNSPEC" // v5.4+ - | "NFULA_VLAN_PROTO" // v5.4+ - | "NFULA_VLAN_TCI" => true, // v5.4+ - | "RTNLGRP_NEXTHOP" // linux v5.3+ - | "RTNLGRP_BRVLAN" // linux v5.6+ | "RTNLGRP_MCTP_IFADDR" // linux v5.17+ | "RTNLGRP_TUNNEL" // linux v5.18+ | "RTNLGRP_STATS" // linux v5.18+ From d0868acb8cd3bae6e11ebabe3717f7dcf50de133 Mon Sep 17 00:00:00 2001 From: Yuki Okushi Date: Sat, 24 Sep 2022 22:17:42 +0900 Subject: [PATCH 4/5] Try to update emsdk version Signed-off-by: Yuki Okushi --- ci/docker/asmjs-unknown-emscripten/Dockerfile | 3 ++- .../wasm32-unknown-emscripten/Dockerfile | 3 ++- ci/emscripten.sh | 23 +++---------------- 3 files changed, 7 insertions(+), 22 deletions(-) diff --git a/ci/docker/asmjs-unknown-emscripten/Dockerfile b/ci/docker/asmjs-unknown-emscripten/Dockerfile index 72a47f29020e2..65d1a949ec577 100644 --- a/ci/docker/asmjs-unknown-emscripten/Dockerfile +++ b/ci/docker/asmjs-unknown-emscripten/Dockerfile @@ -15,7 +15,8 @@ RUN apt-get install -y --no-install-recommends \ libxml2 \ python3 \ python3-distutils \ - xz-utils + xz-utils \ + bzip2 COPY emscripten.sh / RUN bash /emscripten.sh diff --git a/ci/docker/wasm32-unknown-emscripten/Dockerfile b/ci/docker/wasm32-unknown-emscripten/Dockerfile index 0722aa1beab4c..5a10efe16eb12 100644 --- a/ci/docker/wasm32-unknown-emscripten/Dockerfile +++ b/ci/docker/wasm32-unknown-emscripten/Dockerfile @@ -21,7 +21,8 @@ RUN apt-get install -y --no-install-recommends \ cmake \ sudo \ gdb \ - xz-utils + xz-utils \ + bzip2 RUN ln -s /usr/bin/python3 /usr/bin/python & \ ln -s /usr/bin/pip3 /usr/bin/pip diff --git a/ci/emscripten.sh b/ci/emscripten.sh index c16e793bb4e1f..33f3c9a49ea43 100644 --- a/ci/emscripten.sh +++ b/ci/emscripten.sh @@ -2,34 +2,17 @@ set -ex -EMSDK_VERSION=1.39.20 - -hide_output() { - set +x - on_err=" -echo ERROR: An error was encountered with the build. -cat /tmp/build.log -exit 1 -" - trap '$on_err' ERR - bash -c "while true; do sleep 30; echo \$(date) - building ...; done" & - PING_LOOP_PID=$! - "${@}" &> /tmp/build.log - trap - ERR - kill $PING_LOOP_PID - rm -f /tmp/build.log - set -x -} +EMSDK_VERSION=3.1.23 git clone https://github.com/emscripten-core/emsdk.git /emsdk-portable cd /emsdk-portable -hide_output ./emsdk install "${EMSDK_VERSION}" +./emsdk install "${EMSDK_VERSION}" ./emsdk activate "${EMSDK_VERSION}" # Compile and cache libc # shellcheck disable=SC1091 source ./emsdk_env.sh -echo "main(){}" > a.c +echo "int main() {return 0;}" > a.c HOME=/emsdk-portable/ emcc a.c rm -f a.* From c9a98671ba3931f1df0c097e3aa0d509742922c0 Mon Sep 17 00:00:00 2001 From: Yuki Okushi Date: Sat, 24 Sep 2022 22:59:57 +0900 Subject: [PATCH 5/5] Ignore some items Signed-off-by: Yuki Okushi --- libc-test/build.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libc-test/build.rs b/libc-test/build.rs index 6e676e9657436..0fd43b43b3023 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -2702,7 +2702,7 @@ fn test_linux(target: &str) { let x86_32 = target.contains("i686"); let x86_64 = target.contains("x86_64"); let aarch64_musl = target.contains("aarch64") && musl; - let gnuabihf = target.contains("gnueabihf"); + let gnueabihf = target.contains("gnueabihf"); let x86_64_gnux32 = target.contains("gnux32") && x86_64; let riscv64 = target.contains("riscv64"); let uclibc = target.contains("uclibc"); @@ -2807,9 +2807,9 @@ fn test_linux(target: &str) { "errno.h", // `sys/io.h` is only available on x86*, Alpha, IA64, and 32-bit // ARM: https://bugzilla.redhat.com/show_bug.cgi?id=1116162 - // Also unavailable on gnuabihf with glibc 2.30. + // Also unavailable on gnueabihf with glibc 2.30. // https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=6b33f373c7b9199e00ba5fbafd94ac9bfb4337b1 - [(x86_64 || x86_32 || arm) && !gnuabihf]: "sys/io.h", + [(x86_64 || x86_32 || arm) && !gnueabihf]: "sys/io.h", // `sys/reg.h` is only available on x86 and x86_64 [x86_64 || x86_32]: "sys/reg.h", // sysctl system call is deprecated and not available on musl @@ -3116,6 +3116,9 @@ fn test_linux(target: &str) { // Not yet implemented on sparc64 "SYS_clone3" if mips | sparc64 => true, + // FIXME: Not currently available on gnueabihf + "SYS_memfd_secret" if gnueabihf => true, + // FIXME: Added in Linux 5.16 // https://github.com/torvalds/linux/commit/039c0ec9bb77446d7ada7f55f90af9299b28ca49 "SYS_futex_waitv" => true,