1507: Forbid dead code again r=asomers a=asomers
The old problems with bitflags no longer apply
1508: More rust docs r=asomers a=asomers
Switch from allow(missing_docs) to deny(missing_docs), which should
gradually help us moving forward. Also, add a few missing docs, such as
for sched and aio.
Co-authored-by: Alan Somers <asomers@gmail.com>
Switch from allow(missing_docs) to deny(missing_docs), which should
gradually help us moving forward. Also, add a few missing docs, such as
for sched and aio.
Apparently AWS Graviton containers don't support it. socket() retunrs
EAFNOSUPPORT in that environment.
Also, be more selective about skipping tests under QEMU
Instead of skipping them on architectures where we happen to use QEMU,
only skip them when QEMU is actually being used.
1499: Print function name and missing capability when skipping tests r=asomers a=rtzoeller
Currently when a test is skipped due to missing capabilities, a nondescript message is logged to stderr.
Improve that message to include both the function name and missing capability, making it possible to inspect stderr to see which capabilities are missing, and which tests they impact.
Co-authored-by: Ryan Zoeller <rtzoeller@rtzoeller.com>
1503: Add TcpRepair to sockopt r=asomers a=tazz4843
This PR adds the `TCP_REPAIR` flag to `nix::sys::socket::sockopt` under the name `TcpRepair`.
Co-authored-by: 0/0 <zero@imaskeleton.me>
1501: Mark x86_64-unknown-illumos as Tier 2 r=asomers a=rtzoeller
Illumos support is automatically built, but the README does not reflect this.
1505: Fix build for DragonFlyBSD r=asomers a=rtzoeller
The build for DragonFlyBSD is currently failing, due to a missing field when initializing `passwd`.
Fix warnings due to types being referenced which are marked as deprecated in libc. These constants are unused by DragonFlyBSD and can be removed: e0d27d0105
Co-authored-by: Ryan Zoeller <rtzoeller@rtzoeller.com>
* Install cross the easy way, via cargo
* Don't test in release mode. Nix contains no release-dependent paths,
and release mode testing has to my knowledge never revealed a bug in
Nix.
* Add Linux powerpc back to CI, fixed by the latest cross.
* Check the tests even on platforms that can't run them.
* DRY for the Illumos and Redox sections
* Cross-check iOS from a Linux VM instead of OSX
* Revert the workaround for rust-lang/rustup issue 2774
1447: Expose SockAddr::from_raw_sockaddr r=asomers a=coolreader18
I also noticed the `SockAddr/InetAddr::to_str` functions were entirely redundant - `ToString` exists for that, & has a blanket impl on `T: Display`.
Co-authored-by: Noah <33094578+coolreader18@users.noreply.github.com>
1335: Add `PTRACE_EVENT_STOP` enum variant r=asomers a=GabrielMajeri
Adds the `PTRACE_EVENT_STOP` variant to the `ptrace::Event` enum.
Smaller part of #1279Closes#1334
Co-authored-by: Gabriel Majeri <gabriel.majeri6@gmail.com>
1486: Relax assertions in sockaddr_storage_to_addr to match the documentation. r=asomers a=khuey
Fixes#1479
1490: add libc::IP6T_SO_ORIGINAL_DST to socket opt r=asomers a=bearice
the original PR #1410 was stalled for a while
let's make it happen.
this should closes#1410 and #938
1493: Fix crates.io badge r=asomers a=atouchet
Co-authored-by: Kyle Huey <khuey@kylehuey.com>
Co-authored-by: Icemic <bingfeng.web@gmail.com>
Co-authored-by: Bearice Ren <bearice@icybear.net>
Co-authored-by: Alex Touchet <alextouchet@outlook.com>
1489: Don't use mem::transmute in SignalFd r=asomers a=asomers
There was a better case for using it before mem::uninitialized was
available, but not great. Even before then, mem::zeroed could've been
used instead.
Issue #373
Co-authored-by: Alan Somers <asomers@gmail.com>
* I never removed 32-bit OSX and iOS targets that were removed from
Cirrus in PR #1492 .
* I never added Fuchsia (PR #1285) .
* I never added illumos (PR #1394) .
* never added Linux x32 (PR #1366) .
There was a better case for using it before mem::uninitialized was
available, but not great. Even before then, mem::zeroed could've been
used instead.
Issue #373
These ranges of rustc are pickier about where to place
an #[allow(unused_doc_comments)] attribute. It caused warnings when
building for BSD-based targets.
1482: Add support for LOCAL_PEER_CRED r=asomers a=asomers
On FreeBSD and its derivatives, this socket option gets the credentials
of the connected peer.
Co-authored-by: Alan Somers <asomers@gmail.com>
1484: Optionally implement TryFrom in libc_enum! r=asomers a=asomers
This saves code in several separate places that need to do this
separately. At the same time, remove a few uses of mem::transmute that
were implementing TryFrom or similar functionality.
Issue #373
Co-authored-by: Alan Somers <asomers@gmail.com>
This saves code in several separate places that need to do this
separately. At the same time, remove a few uses of mem::transmute that
were implementing TryFrom or similar functionality.
Issue #373
1422: Add PTRACE_INTERRUPT call as `ptrace::interrupt(pid)` r=asomers a=blaind
I've based the test on `fn test_ptrace_cont`. Removed some parts, but not 100% sure what's the proper way of testing in nix context.
From ptrace-man page:
```
PTRACE_INTERRUPT (since Linux 3.4)
Stop a tracee. If the tracee is running or sleeping in
kernel space and PTRACE_SYSCALL is in effect, the system
call is interrupted and syscall-exit-stop is reported.
(The interrupted system call is restarted when the tracee
is restarted.) If the tracee was already stopped by a
signal and PTRACE_LISTEN was sent to it, the tracee stops
with PTRACE_EVENT_STOP and WSTOPSIG(status) returns the
stop signal. If any other ptrace-stop is generated at the
same time (for example, if a signal is sent to the
tracee), this ptrace-stop happens. If none of the above
applies (for example, if the tracee is running in user
space), it stops with PTRACE_EVENT_STOP with
WSTOPSIG(status) == SIGTRAP. PTRACE_INTERRUPT only works
on tracees attached by PTRACE_SEIZE.
```
Co-authored-by: Mika Vatanen <blaind@blaind.net>
1483: Remove some actually unsupported termios iflags on redox r=asomers a=coolreader18
Related to rust-lang/libc#2327
Co-authored-by: Noah <33094578+coolreader18@users.noreply.github.com>