From 104154738c818e48ab0cd25deefe6dd2602afa64 Mon Sep 17 00:00:00 2001 From: Jubilee Young Date: Tue, 23 Feb 2021 11:41:18 -0800 Subject: [PATCH 1/4] Fix mips64-musl ioctl consts to c_int This arch was overlooked or unspecified in earlier PRs that fixed c_ulong to c_int for ioctl.h consts for musl, see PR #289, PR #301, or PR #1097 for such prior art, however these are still args to fn ioctl on mips64-musl, which is expecting c_ints. Some numbers acquired casts to reflect the fact the data is being used and (so should be written as) an unsized bitfield, even if the value is greater than i32::MAX. --- src/unix/linux_like/linux/musl/b64/mips64.rs | 62 ++++++++++---------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/src/unix/linux_like/linux/musl/b64/mips64.rs b/src/unix/linux_like/linux/musl/b64/mips64.rs index 06d09ea1b38d4..21ddc9c0e5e7c 100644 --- a/src/unix/linux_like/linux/musl/b64/mips64.rs +++ b/src/unix/linux_like/linux/musl/b64/mips64.rs @@ -639,37 +639,37 @@ pub const F_OFD_GETLK: ::c_int = 36; pub const F_OFD_SETLK: ::c_int = 37; pub const F_OFD_SETLKW: ::c_int = 38; -pub const TCGETS: ::c_ulong = 0x540d; -pub const TCSETS: ::c_ulong = 0x540e; -pub const TCSETSW: ::c_ulong = 0x540f; -pub const TCSETSF: ::c_ulong = 0x5410; -pub const TCGETA: ::c_ulong = 0x5401; -pub const TCSETA: ::c_ulong = 0x5402; -pub const TCSETAW: ::c_ulong = 0x5403; -pub const TCSETAF: ::c_ulong = 0x5404; -pub const TCSBRK: ::c_ulong = 0x5405; -pub const TCXONC: ::c_ulong = 0x5406; -pub const TCFLSH: ::c_ulong = 0x5407; -pub const TIOCGSOFTCAR: ::c_ulong = 0x5481; -pub const TIOCSSOFTCAR: ::c_ulong = 0x5482; -pub const TIOCINQ: ::c_ulong = 0x467f; -pub const TIOCLINUX: ::c_ulong = 0x5483; -pub const TIOCGSERIAL: ::c_ulong = 0x5484; -pub const TIOCEXCL: ::c_ulong = 0x740d; -pub const TIOCNXCL: ::c_ulong = 0x740e; -pub const TIOCSCTTY: ::c_ulong = 0x5480; -pub const TIOCGPGRP: ::c_ulong = 0x40047477; -pub const TIOCSPGRP: ::c_ulong = 0x80047476; -pub const TIOCOUTQ: ::c_ulong = 0x7472; -pub const TIOCSTI: ::c_ulong = 0x5472; -pub const TIOCGWINSZ: ::c_ulong = 0x40087468; -pub const TIOCSWINSZ: ::c_ulong = 0x80087467; -pub const TIOCMGET: ::c_ulong = 0x741d; -pub const TIOCMBIS: ::c_ulong = 0x741b; -pub const TIOCMBIC: ::c_ulong = 0x741c; -pub const TIOCMSET: ::c_ulong = 0x741a; -pub const FIONREAD: ::c_ulong = 0x467f; -pub const TIOCCONS: ::c_ulong = 0x80047478; +pub const TCGETS: ::c_int = 0x540d; +pub const TCSETS: ::c_int = 0x540e; +pub const TCSETSW: ::c_int = 0x540f; +pub const TCSETSF: ::c_int = 0x5410; +pub const TCGETA: ::c_int = 0x5401; +pub const TCSETA: ::c_int = 0x5402; +pub const TCSETAW: ::c_int = 0x5403; +pub const TCSETAF: ::c_int = 0x5404; +pub const TCSBRK: ::c_int = 0x5405; +pub const TCXONC: ::c_int = 0x5406; +pub const TCFLSH: ::c_int = 0x5407; +pub const TIOCGSOFTCAR: ::c_int = 0x5481; +pub const TIOCSSOFTCAR: ::c_int = 0x5482; +pub const TIOCINQ: ::c_int = 0x467f; +pub const TIOCLINUX: ::c_int = 0x5483; +pub const TIOCGSERIAL: ::c_int = 0x5484; +pub const TIOCEXCL: ::c_int = 0x740d; +pub const TIOCNXCL: ::c_int = 0x740e; +pub const TIOCSCTTY: ::c_int = 0x5480; +pub const TIOCGPGRP: ::c_int = 0x40047477; +pub const TIOCSPGRP: ::c_int = 0x80047476_u32 as i32; +pub const TIOCOUTQ: ::c_int = 0x7472; +pub const TIOCSTI: ::c_int = 0x5472; +pub const TIOCGWINSZ: ::c_int = 0x40087468; +pub const TIOCSWINSZ: ::c_int = 0x80087467_u32 as i32; +pub const TIOCMGET: ::c_int = 0x741d; +pub const TIOCMBIS: ::c_int = 0x741b; +pub const TIOCMBIC: ::c_int = 0x741c; +pub const TIOCMSET: ::c_int = 0x741a; +pub const FIONREAD: ::c_int = 0x467f; +pub const TIOCCONS: ::c_int = 0x80047478_u32 as i32; pub const MCL_CURRENT: ::c_int = 0x0001; pub const MCL_FUTURE: ::c_int = 0x0002; From 5c07fcfd1c1333c5e6632ec96e169bd832ac5b57 Mon Sep 17 00:00:00 2001 From: Jubilee Young Date: Tue, 23 Feb 2021 19:54:45 -0800 Subject: [PATCH 2/4] Add trace to CI --- ci/run.sh | 2 +- ci/runtest-android.rs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ci/run.sh b/ci/run.sh index 6fb059d2eae58..314ea088c6724 100755 --- a/ci/run.sh +++ b/ci/run.sh @@ -121,6 +121,6 @@ else cargo test $opt --manifest-path libc-test/Cargo.toml --target "${TARGET}" - cargo test $opt --features extra_traits --manifest-path libc-test/Cargo.toml \ + RUST_BACKTRACE=1 cargo test $opt --features extra_traits --manifest-path libc-test/Cargo.toml \ --target "${TARGET}" fi diff --git a/ci/runtest-android.rs b/ci/runtest-android.rs index b8030c41a7f6f..e14dba322cdf6 100644 --- a/ci/runtest-android.rs +++ b/ci/runtest-android.rs @@ -27,6 +27,7 @@ fn main() { let output = Command::new("adb") .arg("shell") + .arg("RUST_BACKTRACE=1") .arg(&dst) .output() .expect("failed to run: adb shell"); From fcae5a7a1a65b56d89f38cafdc59659d1f756620 Mon Sep 17 00:00:00 2001 From: Jubilee Young Date: Thu, 25 Feb 2021 13:28:50 -0800 Subject: [PATCH 3/4] Disable aarch64-linux-android in CI --- .github/workflows/bors.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/bors.yml b/.github/workflows/bors.yml index bbeb86bd75341..5073de9993c11 100644 --- a/.github/workflows/bors.yml +++ b/.github/workflows/bors.yml @@ -103,7 +103,9 @@ jobs: max-parallel: 12 matrix: target: [ - aarch64-linux-android, + # FIXME: Mysterious failures in CI, see + # https://github.com/rust-lang/libc/issues/2081 + # aarch64-linux-android, aarch64-unknown-linux-gnu, aarch64-unknown-linux-musl, arm-linux-androideabi, From 9807fad7ac9715e8fc8635f3ed9afbc6bbdc2033 Mon Sep 17 00:00:00 2001 From: Jubilee Young Date: Thu, 25 Feb 2021 16:21:17 -0800 Subject: [PATCH 4/4] Stop directory-not-there errors in dox.sh --- ci/dox.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/ci/dox.sh b/ci/dox.sh index 67a0a75e76241..bcf20de5bfc29 100644 --- a/ci/dox.sh +++ b/ci/dox.sh @@ -6,12 +6,12 @@ set -ex -TARGET_DOC_DIR=target/doc -README=README.md -PLATFORM_SUPPORT=platform-support.md +TARGET_DOC_DIR="target/doc" +README="README.md" +PLATFORM_SUPPORT="platform-support.md" -rm -rf $TARGET_DOC_DIR -mkdir -p $TARGET_DOC_DIR +rm -rf "$TARGET_DOC_DIR" +mkdir -p "$TARGET_DOC_DIR" if ! rustc --version | grep -E "nightly" ; then echo "Building the documentation requires a nightly Rust toolchain" @@ -57,6 +57,7 @@ while read -r target; do --no-default-features --features extra_traits fi + mkdir -p "${TARGET_DOC_DIR}/${target}" cp -r "target/${target}/doc" "${TARGET_DOC_DIR}/${target}" echo "* [${target}](${target}/libc/index.html)" >> $PLATFORM_SUPPORT