diff options
author | bors <bors@rust-lang.org> | 2019-11-21 20:34:40 +0000 |
---|---|---|
committer | bors <bors@rust-lang.org> | 2019-11-21 20:34:40 +0000 |
commit | 2d94f3f3734a8fd0efea842da9b4e6d7dd80063f (patch) | |
tree | 50fd04aea736a9a8bfded41c388b158af04d4b6a /libc-test | |
parent | cd47b46a7334035ed02de395ee400d629bd2bbfe (diff) | |
parent | b14e947de37335b49cc12e4b51faf30cf455743b (diff) | |
download | rust-libc-2d94f3f3734a8fd0efea842da9b4e6d7dd80063f.tar.gz |
Auto merge of #1588 - oxalica:upgrade-musl, r=gnzlbg
Upgrade to musl 1.1.24 in CI
Required by #1577
Note that in musl 1.1.24, `struct sched_param` from `sched.h` has changed and some fields became reserved. So [these fields](https://github.com/rust-lang/libc/blob/13d4a5da2eafd82d3ebb2acb729d8b8c9148fb1f/src/unix/linux_like/mod.rs#L97) are outdated. I'm not sure if we should rename them, since they are in public API.
I simply skip `struct sched_param` from the test now.
Here's the diff between musl 1.1.23 and 1.1.24
```
diff --git a/include/sched.h b/include/sched.h
index 05d40b1e..7e470d3a 100644
--- a/include/sched.h
+++ b/include/sched.h
@@ -18,10 +18,12 @@ extern "C" {
struct sched_param {
int sched_priority;
- int sched_ss_low_priority;
- struct timespec sched_ss_repl_period;
- struct timespec sched_ss_init_budget;
- int sched_ss_max_repl;
+ int __reserved1;
+ struct {
+ time_t __reserved1;
+ long __reserved2;
+ } __reserved2[2];
+ int __reserved3;
};
```
Diffstat (limited to 'libc-test')
-rw-r--r-- | libc-test/build.rs | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/libc-test/build.rs b/libc-test/build.rs index 22e61664a4..5840c7c3a5 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -2063,7 +2063,6 @@ fn test_linux(target: &str) { let i686 = target.contains("i686"); let mips = target.contains("mips"); let mips32 = mips && !target.contains("64"); - let mips32_musl = mips32 && musl; let mips64 = mips && target.contains("64"); let ppc64 = target.contains("powerpc64"); let s390x = target.contains("s390x"); @@ -2071,6 +2070,7 @@ fn test_linux(target: &str) { let x32 = target.contains("x32"); let x86_32 = target.contains("i686"); let x86_64 = target.contains("x86_64"); + let aarch64_musl = target.contains("aarch64") && musl; let mut cfg = ctest_cfg(); cfg.define("_GNU_SOURCE", None); @@ -2134,8 +2134,7 @@ fn test_linux(target: &str) { "sys/prctl.h", "sys/ptrace.h", "sys/quota.h", - // FIXME: the mips-musl CI build jobs use ancient musl 1.0.15: - [!mips32_musl]: "sys/random.h", + "sys/random.h", "sys/reboot.h", "sys/resource.h", "sys/sem.h", @@ -2189,8 +2188,7 @@ fn test_linux(target: &str) { "linux/fs.h", "linux/futex.h", "linux/genetlink.h", - // FIXME: musl version 1.0.15 used by mips build jobs is ancient - [!mips32_musl]: "linux/if.h", + "linux/if.h", "linux/if_addr.h", "linux/if_alg.h", "linux/if_ether.h", @@ -2307,9 +2305,6 @@ fn test_linux(target: &str) { // structs. "termios2" => true, - // FIXME: musl version using by mips build jobs 1.0.15 is ancient: - "ifmap" | "ifreq" | "ifconf" if mips32_musl => true, - // FIXME: remove once Ubuntu 20.04 LTS is released, somewhere in 2020. // ucontext_t added a new field as of glibc 2.28; our struct definition is // conservative and omits the field, but that means the size doesn't match for newer @@ -2353,7 +2348,7 @@ fn test_linux(target: &str) { // Require Linux kernel 5.1: "F_SEAL_FUTURE_WRITE" => true, - // The musl version 1.0.22 used in CI does not + // The musl version 1.1.24 used in CI does not // contain these glibc constants yet: | "RLIMIT_RTTIME" // should be in `resource.h` | "TCP_COOKIE_TRANSACTIONS" // should be in the `netinet/tcp.h` header @@ -2375,10 +2370,6 @@ fn test_linux(target: &str) { // - these constants are used by the glibc implementation. n if musl && n.contains("__SIZEOF_PTHREAD") => true, - // FIXME: musl version 1.0.15 used by mips build jobs is ancient - t if mips32_musl && t.starts_with("IFF") => true, - "MFD_HUGETLB" | "AF_XDP" | "PF_XDP" if mips32_musl => true, - _ => false, } }); @@ -2462,7 +2453,17 @@ fn test_linux(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) && musl) || + // FIXME: After musl 1.1.24, the type becomes `int` instead of `unsigned short`. + (struct_ == "ipc_perm" && field == "__seq" && aarch64_musl) }); cfg.skip_roundtrip(move |s| match s { |