Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix mips64-musl ioctl consts to c_int #2078

Merged
merged 4 commits into from
Feb 26, 2021

Conversation

workingjubilee
Copy link
Member

@workingjubilee workingjubilee commented Feb 23, 2021

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.

Currently rustc is not building on mips64-linux-musl because of this error.

@rust-highfive
Copy link

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Amanieu (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

This arch was overlooked or unspecified in earlier PRs that fixed
c_ulong to c_int for ioctl.h consts for musl, see PR rust-lang#289, PR rust-lang#301,
or PR rust-lang#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.
@Amanieu
Copy link
Member

Amanieu commented Feb 23, 2021

@bors r+

@bors
Copy link
Contributor

bors commented Feb 23, 2021

📌 Commit 1041547 has been approved by Amanieu

@bors
Copy link
Contributor

bors commented Feb 23, 2021

⌛ Testing commit 1041547 with merge acb41f6...

bors added a commit that referenced this pull request Feb 23, 2021
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.

Currently rustc is not building on mips64-linux-musl because of this error.
@bors
Copy link
Contributor

bors commented Feb 23, 2021

💔 Test failed - checks-actions

@workingjubilee
Copy link
Member Author

Build failure on sparc64-linux-gnu and aarch64-linux android, appears spurious but both died around the same point

aarch64-linux-android

Compiling libc v0.2.86 (/checkout)
Compiling libc-test v0.1.0 (/checkout/libc-test)
Finished test [unoptimized + debuginfo] target(s) in 1m 15s
Running target/aarch64-linux-android/debug/deps/cmsg-85998318d0dbb347
/checkout/target/aarch64-linux-android/debug/deps/cmsg-85998318d0dbb347: 1 file pushed, 0 skipped. 6.6 MB/s (6280304 bytes in 0.904s)
status: exit code: 0
stdout ---

running 5 tests
test t::test_cmsg_data ... ok
test t::test_cmsg_firsthdr ... ok
test t::test_cmsg_len ... ok
test t::test_cmsg_nxthdr ... ok
test t::test_cmsg_space ... ok

test result: ok. 5 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 128.65s

stderr ---
Running target/aarch64-linux-android/debug/deps/errqueue-f5addfcdc0abe27f
/checkout/target/aarch64-linux-android/debug/deps/errqueue-f5addfcdc0abe27f: 1 file pushed, 0 skipped. 7.4 MB/s (6216840 bytes in 0.806s)
status: exit code: 101
stdout ---

stderr ---
thread 'main' panicked at 'No option 'h' defined', /cargo/registry/src/gh.neting.cc-1ecc6299db9ec823/getopts-0.2.21/src/lib.rs:799:21
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

thread 'main' panicked at 'failed to find successful test run', /tmp/runtest.rs:45:9
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
error: test failed, to rerun pass '--test errqueue'
Error: Process completed with exit code 101.

sparc-unknown-linux-gnu

  Running target/sparc64-unknown-linux-gnu/debug/deps/main-236950364f4610fb

qemu-system-sparc64: terminating on signal 15 from pid 2245 (timeout)
OpenBIOS for Sparc64
Configuration device id QEMU version 1 machine id 0
kernel addr 404000 size b267e0
kernel cmdline init=/run_prog.sh
CPUs: 1 x SUNW,UltraSPARC-IIi
UUID: 00000000-0000-0000-0000-000000000000
Welcome to OpenBIOS v1.1 built on Mar 12 2020 14:03
Type 'help' for detailed information

RUNNING ALL TESTS
PASSED 19344 tests

  • cargo test --features extra_traits --manifest-path libc-test/Cargo.toml --target sparc64-unknown-linux-gnu
    Compiling libc v0.2.86 (/checkout)
    Compiling libc-test v0.1.0 (/checkout/libc-test)
    warning: function is never used: cmsg_nxthdr
    --> libc-test/test/cmsg.rs:14:9
    |
    14 | / pub fn cmsg_nxthdr(
    15 | | mhdr: *const msghdr,
    16 | | cmsg: *const cmsghdr,
    17 | | ) -> *mut cmsghdr;
    | |__________________________^
    |
    = note: #[warn(dead_code)] on by default

warning: 1 warning emitted

Finished test [unoptimized + debuginfo] target(s) in 1m 20s
Running target/sparc64-unknown-linux-gnu/debug/deps/cmsg-2643cde4a5a9cd20
qemu-system-sparc64: terminating on signal 15 from pid 2919 (timeout)
OpenBIOS for Sparc64
Configuration device id QEMU version 1 machine id 0
kernel addr 404000 size b267e0
kernel cmdline init=/run_prog.sh
CPUs: 1 x SUNW,UltraSPARC-IIi
UUID: 00000000-0000-0000-0000-000000000000
Welcome to OpenBIOS v1.1 built on Mar 12 2020 14:03
Type 'help' for detailed information

running 4 tests
test t::test_cmsg_data ... ok
test t::test_cmsg_firsthdr ... ok
test t::test_cmsg_len ... ok
test t::test_cmsg_space ... ok

test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.03s

Running target/sparc64-unknown-linux-gnu/debug/deps/errqueue-aec01ef3f9138751

this PR should only affect mips64 targets though, and neither of those libcs.

@Amanieu
Copy link
Member

Amanieu commented Feb 23, 2021

@bors retry

@bors
Copy link
Contributor

bors commented Feb 23, 2021

⌛ Testing commit 1041547 with merge 5be554e...

bors added a commit that referenced this pull request Feb 23, 2021
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.

Currently rustc is not building on mips64-linux-musl because of this error.
@bors
Copy link
Contributor

bors commented Feb 23, 2021

💔 Test failed - checks-actions

@workingjubilee
Copy link
Member Author

...similar issues, including failures on x86_64-unknown-linux-gnux32.
apparently this is a recurring problem: #1851 (comment)

Do I have the power?
Do I have a moderate amount of power?
Do I have... moderating power?

@bors retry

@bors
Copy link
Contributor

bors commented Feb 23, 2021

@workingjubilee: 🔑 Insufficient privileges: not in try users

@workingjubilee
Copy link
Member Author

darn :^) I'll stop fussing I guess.

@Amanieu
Copy link
Member

Amanieu commented Feb 24, 2021

@bors retry

@bors
Copy link
Contributor

bors commented Feb 24, 2021

⌛ Testing commit 1041547 with merge 99cc096...

@bors
Copy link
Contributor

bors commented Feb 25, 2021

💔 Test failed - checks-actions

@workingjubilee
Copy link
Member Author

workingjubilee commented Feb 25, 2021

That's... not really more useful, hm.

stderr ---
thread 'main' panicked at 'No option 'h' defined', /cargo/registry/src/gh.neting.cc-1ecc6299db9ec823/getopts-0.2.21/src/lib.rs:799:21
stack backtrace:
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

thread 'main' panicked at 'failed to find successful test run', /tmp/runtest.rs:46:9
stack backtrace:
   0: std::panicking::begin_panic
   1: runtest::main::{{closure}}
   2: core::option::Option<T>::unwrap_or_else
   3: runtest::main
   4: core::ops::function::FnOnce::call_once
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
error: test failed, to rerun pass '--test errqueue'

@Amanieu
Copy link
Member

Amanieu commented Feb 25, 2021

Just comment out the aarch64-android CI for now, this is too much trouble.

@workingjubilee
Copy link
Member Author

workingjubilee commented Feb 25, 2021

Noted, it's a tier 3 tier 2 target anyways, so we don't technically promise full testing! Sucks, though!

EDIT: whoops, misread!

@workingjubilee
Copy link
Member Author

@bors retry

@Amanieu
Copy link
Member

Amanieu commented Feb 25, 2021

@bors r+

@bors
Copy link
Contributor

bors commented Feb 25, 2021

📌 Commit fcae5a7 has been approved by Amanieu

@bors
Copy link
Contributor

bors commented Feb 25, 2021

⌛ Testing commit fcae5a7 with merge 58118e3...

bors added a commit that referenced this pull request Feb 25, 2021
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.

Currently rustc is not building on mips64-linux-musl because of this error.
@Amanieu
Copy link
Member

Amanieu commented Feb 25, 2021

(retry doesn't pick up new commits)

@workingjubilee
Copy link
Member Author

Ahh, thank you!

@bors
Copy link
Contributor

bors commented Feb 25, 2021

💔 Test failed - checks-actions

@workingjubilee
Copy link
Member Author

Looks like it does block on doc generation. It's not obvious to me what changed in the last week to make that fail now, but it appears to be pretty stateful and error-prone. I made some changes to the shell script to fix this. It should error less often in the future.

@JohnTitor
Copy link
Member

@bors r=Amanieu

@bors
Copy link
Contributor

bors commented Feb 26, 2021

📌 Commit 9807fad has been approved by Amanieu

@bors
Copy link
Contributor

bors commented Feb 26, 2021

⌛ Testing commit 9807fad with merge 8a88b7d...

@bors
Copy link
Contributor

bors commented Feb 26, 2021

☀️ Test successful - checks-actions, checks-cirrus-freebsd-11, checks-cirrus-freebsd-12, checks-cirrus-freebsd-13
Approved by: Amanieu
Pushing 8a88b7d to master...

@bors bors merged commit 8a88b7d into rust-lang:master Feb 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants