summaryrefslogtreecommitdiff
path: root/libc-test
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-09-28 22:24:29 +0000
committerbors <bors@rust-lang.org>2022-09-28 22:24:29 +0000
commit362960cecb52eb87fb07d022f6b0fe3b257c0592 (patch)
tree1aa9fcad415bebc8e512fec47d1c2fdf51b89c8e /libc-test
parent6c9122930fde2a46756c949c26a6683e0440eac4 (diff)
parenta119fdbf38192df88281b2f271ee3e43439ef268 (diff)
downloadrust-libc-362960cecb52eb87fb07d022f6b0fe3b257c0592.tar.gz
Auto merge of #2915 - JohnTitor:road-to-jammy, r=JohnTitor
Update Docker image to Ubuntu 22.04 Signed-off-by: Yuki Okushi <jtitor@2k36.org> r? `@ghost`
Diffstat (limited to 'libc-test')
-rw-r--r--libc-test/build.rs243
1 files changed, 144 insertions, 99 deletions
diff --git a/libc-test/build.rs b/libc-test/build.rs
index 9609cc5571..d1718454e4 100644
--- a/libc-test/build.rs
+++ b/libc-test/build.rs
@@ -2406,7 +2406,6 @@ fn test_emscripten(target: &str) {
"sys/reboot.h",
"sys/resource.h",
"sys/sem.h",
- "sys/sendfile.h",
"sys/shm.h",
"sys/signalfd.h",
"sys/socket.h",
@@ -2473,6 +2472,9 @@ fn test_emscripten(target: &str) {
// FIXME: is this necessary?
"sighandler_t" => true,
+ // FIXME: The size has been changed due to musl's time64
+ "time_t" => true,
+
_ => false,
}
});
@@ -2491,6 +2493,16 @@ fn test_emscripten(target: &str) {
// Skip for now to unblock CI.
"pthread_condattr_t" => true,
+ // FIXME: The size has been changed when upgraded to musl 1.2.2
+ "pthread_mutex_t" => true,
+
+ // FIXME: The size has been changed
+ "max_align_t" => true,
+
+ // FIXME: The size has been changed due to time64
+ "utimbuf" | "timeval" | "timespec" | "rusage" | "itimerval" | "sched_param"
+ | "stat" | "stat64" | "shmid_ds" | "msqid_ds" => true,
+
_ => false,
}
});
@@ -2503,6 +2515,14 @@ fn test_emscripten(target: &str) {
// FIXME: Investigate why CI is missing it.
"clearenv" => true,
+ // FIXME: Somehow the ctest cannot find it on emscripten:
+ // = note: error: undefined symbol: wait4 (referenced by top-level compiled C/C++ code)
+ // warning: Link with `-sLLD_REPORT_UNDEFINED` to get more information on undefined symbols
+ // warning: To disable errors for undefined symbols use `-sERROR_ON_UNDEFINED_SYMBOLS=0`
+ // warning: _wait4 may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
+ // Error: Aborting compilation due to previous errors
+ "wait4" => true,
+
_ => false,
}
});
@@ -2520,6 +2540,18 @@ fn test_emscripten(target: &str) {
// emscripten-core/emscripten@6d6474e
"SYS_gettid" => true,
+ // FIXME: These values have been changed
+ | "POSIX_MADV_DONTNEED" // to 4
+ | "RLIMIT_NLIMITS" // to 16
+ | "RLIM_NLIMITS" // to 16
+ | "IPPROTO_MAX" // to 263
+ | "F_GETLK" // to 5
+ | "F_SETLK" // to 6
+ | "F_SETLKW" // to 7
+ | "O_TMPFILE" // to 65
+ | "SIG_IGN" // -1
+ => true,
+
_ => false,
}
});
@@ -2557,7 +2589,15 @@ fn test_emscripten(target: &str) {
field == "_pad2" ||
field == "ssi_syscall" ||
field == "ssi_call_addr" ||
- field == "ssi_arch"))
+ field == "ssi_arch")) ||
+ // FIXME: After musl 1.1.24, it have only one field `sched_priority`,
+ // while other fields become reserved.
+ (struct_ == "sched_param" && [
+ "sched_ss_low_priority",
+ "sched_ss_repl_period",
+ "sched_ss_init_budget",
+ "sched_ss_max_repl",
+ ].contains(&field))
});
// FIXME: test linux like
@@ -2695,6 +2735,7 @@ fn test_linux(target: &str) {
let mips = target.contains("mips");
let mips32 = mips && !target.contains("64");
let mips64 = mips && target.contains("64");
+ let ppc = target.contains("powerpc");
let ppc64 = target.contains("powerpc64");
let s390x = target.contains("s390x");
let sparc64 = target.contains("sparc64");
@@ -2702,7 +2743,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 +2848,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
@@ -2857,8 +2898,8 @@ 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",
+ // FIXME: requires Linux >= 5.6:
+ [!musl && !sparc64]: "linux/openat2.h",
[!musl]: "linux/ptrace.h",
"linux/quota.h",
"linux/random.h",
@@ -3013,11 +3054,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,
@@ -3027,6 +3063,12 @@ fn test_linux(target: &str) {
// FIXME: requires >= 5.4.1 kernel headers
"j1939_filter" if musl => true,
+ // FIXME: requires >= 5.4 kernel headers
+ "sockaddr_can" if musl => true,
+
+ // FIXME: Unignore once we update Ubuntu to 22.04
+ "mallinfo2" if sparc64 => true,
+
_ => false,
}
});
@@ -3061,11 +3103,14 @@ 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
+ {
+ return true;
+ }
+ }
+ if musl || sparc64 {
+ // FIXME: Requires >= 5.4.1 kernel headers
+ if name.starts_with("J1939")
|| name.starts_with("SO_J1939")
- // FIXME: Requires >= 5.4.1 kernel headers
|| name.starts_with("SCM_J1939")
{
return true;
@@ -3093,9 +3138,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 +3166,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 +3178,20 @@ 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: Not defined on ARM, gnueabihf, MIPS, musl, PowerPC, riscv64, s390x, and sparc64.
+ "SYS_memfd_secret" if arm | gnueabihf | mips | musl | ppc | riscv64 | s390x | sparc64 => 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,
+ // FIXME: Added in Linux 5.16
+ // https://github.com/torvalds/linux/commit/039c0ec9bb77446d7ada7f55f90af9299b28ca49
+ "SYS_futex_waitv" => true,
- // Requires more recent kernel headers:
- | "IFLA_PROP_LIST"
- | "IFLA_ALT_IFNAME"
- | "IFLA_PERM_ADDRESS"
- | "IFLA_PROTO_DOWN_REASON" => true,
+ // FIXME: Added in Linux 5.17
+ // https://github.com/torvalds/linux/commit/c6018b4b254971863bd0ad36bb5e7d0fa0f0ddb0
+ "SYS_set_mempolicy_home_node" => 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.18
+ // https://github.com/torvalds/linux/commit/8b5413647262dda8d8d0e07e14ea1de9ac7cf0b2
+ "NFQA_PRIORITY" => true,
// FIXME: requires more recent kernel headers on CI
| "UINPUT_VERSION"
@@ -3195,18 +3199,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 +3225,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,25 +3236,79 @@ 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+
+ | "RTNLGRP_MCTP_IFADDR" // linux v5.17+
+ | "RTNLGRP_TUNNEL" // linux v5.18+
+ | "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,
+
+ // FIXME: requires Linux >= 5.6:
+ | "RESOLVE_BENEATH"
+ | "RESOLVE_CACHED"
+ | "RESOLVE_IN_ROOT"
+ | "RESOLVE_NO_MAGICLINKS"
+ | "RESOLVE_NO_SYMLINKS"
+ | "RESOLVE_NO_XDEV" if musl || sparc64 => true,
+
+ // FIXME: requires Linux >= 5.4:
+ | "CAN_J1939"
+ | "CAN_NPROTO" if musl || sparc64 => true,
+
+ // FIXME: requires Linux >= 5.6
+ "GRND_INSECURE" if musl || sparc64 => true,
+
+ // FIXME: requires Linux >= 5.7:
+ "MREMAP_DONTUNMAP" if musl || sparc64 => true,
+
+ // FIXME: Requires more recent kernel headers (5.9 / 5.11):
+ | "CLOSE_RANGE_UNSHARE"
+ | "CLOSE_RANGE_CLOEXEC" if musl || sparc64 => true,
+
+ // FIXME: requires Linux >= 5.12:
+ "MPOL_F_NUMA_BALANCING" if musl || sparc64 => true,
+
+ // FIXME: Requires more recent kernel headers
| "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+
+ | "NFNL_SUBSYS_HOOK" // v5.14+
| "NFULA_VLAN" // v5.4+
| "NFULA_L2HDR" // v5.4+
- | "NFULA_VLAN_UNSPEC" // v5.4+
| "NFULA_VLAN_PROTO" // v5.4+
- | "NFULA_VLAN_TCI" => true, // v5.4+
+ | "NFULA_VLAN_TCI" // v5.4+
+ | "NFULA_VLAN_UNSPEC" // 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+
- => true,
+ if musl || sparc64 => true,
+
+ // FIXME: Unignore once we update Ubuntu to 22.04
+ | "VMADDR_CID_LOCAL"
+ | "STATX_MNT_ID"
+ | "SYS_close_range"
+ | "SYS_openat2"
+ | "SYS_pidfd_getfd"
+ | "SYS_faccessat2"
+ | "SYS_process_madvise"
+ | "SYS_epoll_pwait2"
+ | "SYS_mount_setattr"
+ | "SYS_quotactl_fd"
+ | "SYS_landlock_create_ruleset"
+ | "SYS_landlock_add_rule"
+ | "SYS_landlock_restrict_self"
+ | "SYS_process_mrelease"
+ | "IFLA_PROP_LIST"
+ | "IFLA_ALT_IFNAME"
+ | "IFLA_PERM_ADDRESS"
+ | "IFLA_PROTO_DOWN_REASON"
+ if sparc64 => true,
_ => false,
}
@@ -3424,7 +3466,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 {