Age | Commit message (Collapse) | Author |
|
|
|
This also removes the incorrect TCSASOFT definition as an enum type because it's
actually a bitfield.
|
|
This reduces the boilerplate necessary when wrapping libc constants
into groups via enums
|
|
623: Fix sendmsg on macOS when passing a zero entry cmsgs array. r=Susurrus
On macOS, trying to call `sendmsg` with a zero entry cmsgs buffer, e.g.:
sendmsg(fd, [IoVec::from_slice(buf)], &[], MsgFlags::empty(), None)
...fails with `EINVAL`. This occurs due to the pointer value for zero capacity `Vec`s being 0x1 rather than 0x0, to distinguish allocated-but-zero-size from nullptr. The [kernel validates](https://github.com/opensource-apple/xnu/blob/dc0628e187c3148723505cf1f1d35bb948d3195b/bsd/kern/uipc_syscalls.c#L1304) both the `msghdr.msg_control` and `msghdr.msg_controllen` fields and rejects `msghdr.msg_control == 0x1` as invalid.
This doesn't show up on Linux because the [kernel validates](https://github.com/torvalds/linux/blob/9705596d08ac87c18aee32cc97f2783b7d14624e/net/core/scm.c#L139) `msghdr.msg_controllen` first and ignores the value of `msghdr.msg_control` if the length was 0.
|
|
|
|
|
|
660: Fix double close bugs in test_lseek and test_lseek64 r=asomers
std::fs::File closes the underlying file descriptor on Drop, without
checking for errors. test_lseek and test_lseek64 also manually close
the file descriptor. That works for single threaded test runs. But for
multithreaded runs, it causes EBADF errors in other tests. Fix the
tests by consuming the File with into_raw_fd(), so its drop method will
never be called.
|
|
std::fs::File closes the underlying file descriptor on Drop, without
checking for errors. test_lseek and test_lseek64 also manually close
the file descriptor. That works for single threaded test runs. But for
multithreaded runs, it causes EBADF errors in other tests. Fix the
tests by consuming the File with into_raw_fd(), so its drop method will
never be called.
Also, fix a potential short read bug in the same tests.
|
|
624: Enable ptrace on all Linux platforms r=Susurrus
Nothing that nix currently binds is architecture-specific, and Android
supports ptrace just as much as non-Android Linux.
|
|
662: WIP: Fix tier3s r=Susurrus
This handles the low-hanging fruit. rust-lang/libc#654 needs to land and there's a bit of work necessary for the syscall and ioctl errors.
|
|
|
|
|
|
|
|
|
|
|
|
Nothing that nix currently binds is architecture-specific, and Android
supports ptrace just as much as non-Android Linux.
|
|
658: Prepare for the 0.9.0 release r=asomers
Bump the version to 0.9.0-pre
Update libc dependency to 0.2.25
|
|
657: Add arm/musl, mips64, and s390x linux targets to Tier3 r=asomers
I don't know why these weren't added originally. They should work with `cross`.
|
|
Bump the version to 0.9.0-pre
Update libc dependency to 0.2.25
|
|
|
|
reuse definitions from libc
|
|
the previous definition were linux specific.
|
|
|
|
|
|
626: Use pass by value for write ioctls r=posborne
The kernel expects that the values are passed by value and not by pointer for writing ioctls.
|
|
|
|
625: Use libc_bitflags! for BSD in fcntl.rs r=Susurrus
|
|
|
|
|
|
|
|
631: Allow nix to compile on android r=Susurrus
Fixes #313
|
|
|
|
|
|
This is necessary because certain flags in libc have different types, generally
due to a mistake when adding the flags to the libc. See
https://github.com/rust-lang/libc/pull/511 for an example of such a
discrepency.
|
|
Newtypes for uid_t, gid_t and pid_t.
|
|
|
|
640: Add iOS as a Tier 3 platform r=Susurrus
With this and #639, then we have at least basic testing recurring for all mobile platforms (note that this is more than the `libc` currently tests, so we may have trouble moving the non-x86 targets to Tier2 until that happens).
|
|
645: Use single threads for testing r=asomers
I actually couldn't find a reference to CARGO_TEST_THREADS in the
current cargo codebase, but RUST_TEST_THREADS is definitely correct.
This should reduce some spurious failures on some platforms.
|
|
|
|
I actually couldn't find a reference to CARGO_TEST_THREADS in the
current cargo codebase, but RUST_TEST_THREADS is definitely correct.
This should reduce some spurious failures on some platforms.
|
|
636: Rely on libc for more socket constants r=Susurrus
Not all values are upstreamed, but this covers the vast majority of them.
|
|
|
|
639: Add all Android targets as Tier 3 platforms r=Susurrus
cc @ndusart @roblabla
|
|
642: Handle short reads in pty tests r=Susurrus
Some pty tests would fail intermittently because read(2) occasionally
returns less data than requested.
|
|
|
|
633: Skip the mount tests on kernel 4.4.0 r=asomers
Some versions of that kernel have a known bug with tmpfs in namespaces.
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1659087
Fixes #610
|
|
Starting somewhere in 4.4.0 some versions of Linux have a known bug with
tmpfs in namespaces. It's unknown exactly which versions are affected
(and likely distro-dependent), but easy to detect. When open(2) returns
EOVERFLOW, skip the rest of the test.
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1659087
Fixes #610
|
|
Some pty tests would fail intermittently because read(2) occasionally
returns less data than requested.
|
|
|
|
599: Support powerpc64 r=Susurrus
The test_ioctl values are computed using ioctl-test.c
|