Age | Commit message (Collapse) | Author |
|
The test was disabling the signal handler before disabling the timer.
Fix intermittent failures by:
* Reversing the cleanup order.
* Sleeping for a while before removing the signal handler, since POSIX
does not guarantee that timer_delete will clear pending signals.
Also, speed up the timer to make the test suite complete faster.
|
|
This commit adds support for the signal timer mechanism in POSIX, the
mirror to timerfd on Linux.
Resolves #1424
Signed-off-by: Brian L. Troutwine <brian@troutwine.us>
|
|
|
|
1596: Add NetBSD configuration for supported process resources r=asomers a=schctl
In addition to existing resources, NetBSD supports `RLIMIT_MEMLOCK`, `RLIMIT_NPROC` and `RLIMIT_RSS`.
https://man.netbsd.org/setrlimit.2
`RLIMIT_AS` is also supported, but it looks like it was added [after version 5.0](https://mail-index.netbsd.org/tech-kern/2009/03/28/msg004702.html), so I'm not sure if that should be enabled.
1621: Add posix_fallocate on DragonFly r=asomers a=rtzoeller
Enable the existing `posix_fallocate()` tests as they are passing locally.
Co-authored-by: Sachin Cherian <sachinctl@protonmail.com>
Co-authored-by: Ryan Zoeller <rtzoeller@rtzoeller.com>
|
|
|
|
|
|
1547: feat: Add glibc::SOF_TIMESTAMPING_* support r=asomers a=pacak
Support for kernel and hardware receive timestamps
Co-authored-by: Michael Baikov <manpacket@gmail.com>
|
|
|
|
|
|
|
|
Enable epoll tests on Android, because they are passing.
|
|
|
|
This was an oversight from PR #1511
|
|
|
|
parking_lot provides synchronization primitives which aren't
poisoned on panic. This makes it easier to determine which tests
are failing, as a test failure no longer causes all subsequent tests
using that mutex to fail.
|
|
Ensure file descriptors are nonnegative and less than `FD_SETSIZE`.
(Fixes #1572.)
|
|
libc::posix_fadvise returns errnos directly rather than in the errno
variable.
|
|
Test: `cargo test --test test test_pollfd_events`
|
|
This was an oversight from #1306.
Reported-by: @ocadaruma
|
|
And this time, start running Clippy in CI
|
|
1496: Rework UnixAddr to fix soundness issues r=asomers a=coolreader18
Fixes #1494
I went with making `sun_path` always nul-terminated since that just seems to make things easier, since (at least according to linux man pages) `sockaddr_un`s returned by the kernel will always be nul-terminated.
Co-authored-by: Noa <33094578+coolreader18@users.noreply.github.com>
|
|
|
|
1509: Allow Android to use timerfd r=asomers a=rtzoeller
This is a continuation of #1336 which also enables the timerfd tests.
```
running 3 tests
test sys::test_timerfd::test_timerfd_unset ... ok
test sys::test_timerfd::test_timerfd_oneshot ... ok
test sys::test_timerfd::test_timerfd_interval ... ok
```
1515: Add IP_TTL/IPV6_UNICAST_HOPS SockOpts r=asomers a=cemeyer
Test: `cargo test --test test test_ttl_opts`
Co-authored-by: Ryan Zoeller <rtzoeller@rtzoeller.com>
Co-authored-by: Conrad Meyer <cem@FreeBSD.org>
|
|
Test: `cargo test --test test test_ttl_opts`
|
|
|
|
1516: Implement AsRawFd for PollFd r=asomers a=cemeyer
Implement the trait on PollFd, providing an `as_raw_fd()` accessor to
get the RawFd associated with the PollFd.
Subsumes #1147, #1286. Closes #1146.
Test: `cargo test --test test test_pollfd_fd`
Co-authored-by: Conrad Meyer <cem@FreeBSD.org>
|
|
1317: test_af_alg_aead waits indefinitely r=asomers a=ritzk
Starting with linux kernel 4.9, the crypto interface changed slightly such that the authentication tag memory is only needed in the output buffer for encryption and in the input buffer for decryption. Thus, we have fewer bytes to read than the buffer size. Do not block on read.
alternatively, we can adjust the decrypted buffer size based on kernel version ( ">= 4.9") to not include auth_size .
```
if kernel_version >= "4.9":
let mut decrypted = vec![0u8; payload_len + (assoc_size as usize) ];
```
before
```
test sys::test_socket::test_af_alg_aead ... test sys::test_socket::test_af_alg_aead has been running for over 60 seconds
```
after
```
test sys::test_socket::test_af_alg_aead ... ok
```
Co-authored-by: Ritesh Khadgaray <khadgaray@gmail.com>
|
|
Implement the trait on PollFd, providing an `as_raw_fd()` accessor to
get the RawFd associated with the PollFd.
Subsumes #1147, #1286. Closes #1146.
Test: `cargo test --test test test_pollfd_fd`
|
|
Setting these options enables receiving errors, such as ICMP errors from
the network, via `recvmsg()` with `MSG_ERRQUEUE`.
Adds new `Ipv{4,6}RecvErr` variants to `ControlMessageOwned`. These
control messages are produced when `Ipv4RecvErr` or `Ipv6RecvErr`
options are enabled on a raw or datagram socket.
New tests for the functionality can be run with `cargo test --test test
test_recverr`.
This commit builds on an earlier draft of the functionality authored by
Matthew McPherrin <git@mcpherrin.ca>.
|
|
|
|
|
|
Co-authored-by: zachoverflow <zach@zachjohnson.net>
|
|
|
|
1506: Test Linux aarch64 on real aarch64 hardware. r=asomers a=asomers
Co-authored-by: Alan Somers <asomers@gmail.com>
|
|
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.
|
|
|
|
Also, split the overbroad test_mknod_family into two tests
|
|
|
|
Fixes #1479
|
|
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>
|
|
On FreeBSD and its derivatives, this socket option gets the credentials
of the connected peer.
|
|
|
|
This work is a continutation on previou contribution by @kpcyrd and @j1ah0ng.
|
|
This introduces a new `mknodat` helper.
Ref: https://pubs.opengroup.org/onlinepubs/9699919799/functions/mknod.html
|
|
Add From<User> for libc::passwd trait implementation to convert
a User into a libc::passwd
Implementation consumes the User struct, giving ownership over
the internal members to the libc::passwd struct
Add the User::gecos field to 64-bit Android builds, since it is
supported by libc::passwd for those builds
|
|
|
|
This PR implements support of RXQ_OVFL flag and parsing ControlMessage
to get the packet drop counter of UDP socket.
|
|
|
|
Now that Nix's weird error types are eliminated, there's no reason not
to simply use Errno as the Error type.
|
|
For many of Nix's consumers it be convenient to easily convert a Nix
error into a std::io::Error. That's currently not possible because of
the InvalidPath, InvalidUtf8, and UnsupportedOperation types that have
no equivalent in std::io::Error.
However, very few of Nix's public APIs actually return those unusual
errors. So a more useful API would be for Nix's standard error type to
implement Into<std::io::Error>.
This commit makes Error a simple NewType around Errno. For most
functions it's a drop-in replacement. There are only three exceptions:
* clearenv now returns a bespoke error type. It was the only Nix
function whose error couldn't be cleanly mapped onto an Errno.
* sys::signal::signal now returns Error(Errno::ENOTSUP) instead of
Error::UnsupportedOperation when the user passes an incompatible
argument to `handler`.
* When a NixPath exceeds PATH_MAX, it will now return
Error(Errno::ENAMETOOLONG) instead of Error::InvalidPath.
In the latter two cases there is now some abiguity about whether the
error code was generated by Nix or by the OS. But I think the ambiguity
is worth it for the sake of being able to implement Into<io::Error>.
This commit also introduces Error::Sys() as a migration aid. Previously
that as an enum variant. Now it's a function, but it will work in many
of the same contexts as the original.
Fixes #1155
|