summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-12-07Fix a use-after-free in execve_test_factoryAlan Somers
Ensure that the exec functions' arguments are valid for 'static. Previously they were short-lived temporaries.
2020-12-06Switch all builds from Travis to CirrusAlan Somers
Travis has been super-slow lately (> 6 hours per build). Cirrus is much faster: about 20 minutes. Cirrus also has slightly better test coverage, mainly because it doesn't use SECCOMP. Also, * Fix the Redox CI build. The old Travis configuration didn't actually build for Redox, so we never noticed that Redox can't be built with a stable compiler. Thanks to @coolreader18 for finding this. * Disable the udp_offload tests on cross-tested platforms. These tests are failing with ENOPROTOOPT in Cirrus-CI. I suspect it's due to a lack of support in QEMU. These tests were skipped on Travis because its kernel was too old. * Fix require_kernel_version on Cirrus-CI. Cirrus reports the Linux kernel version as 4.19.112+, which the semver crate can't handle. * Fix test_setfsuid on Cirrus. When run on Cirrus, it seems like the file in /tmp gets deleted as soon as it's closed. Probably an overzealous temporary file cleaner. Use /var/tmp, because no temporary file cleaner should run in there. * Skip mount tests on Cirrus. They fail for an unknown reason. Issue #1351 * Skip the AF_ALG tests on Cirrus-CI Issue #1352
2020-12-06Handle SIGRT_1 in test_alarmAlan Somers
When run in Cirrus-CI's environment, the tests generate copious SIGRT_1 signals. This commit ensures that test_alarm will ignore them.
2020-12-06Make the poll tests resilient against signalsAlan Somers
When run in Cirrus-CI's environment, the tests generate copious SIGRT_1 signals. This commit ensures that the poll tests will retry on EINTR.
2020-12-06Disable clock_getres on redoxNoah
2020-12-06Demote i686-apple-darwin to Tier 2Alan Somers
It's deprecated by Xcode, and the version of Xcode installed by Cirrus-CI doesn't include 32 bit libraries.
2020-11-28[skip ci] Add v0.19.1 release notes to CHANGELOGAlan Somers
2020-11-29Merge #1345bors[bot]
1345: Disable test-aio-drop in GNU environments r=asomers a=asomers This test occasionally fails in Travis on x86_64-unknown-linux-gnu. The failure takes the form of the test executable receiving a random signal. Sometimes SIGHUP, sometimes SIGKILL, etc. I think this must be a bug in glibc, even though I can't reproduce it in my development environment. But it interferes with CI too much to leave enabled. Co-authored-by: Alan Somers <asomers@gmail.com>
2020-11-28[skip ci] update CHANGELOG for PR #1341Alan Somers
2020-11-28Merge #1341bors[bot]
1341: Fix recvmmsg(2) implementation r=asomers a=codeslinger There were two problems discovered with the `recvmmsg(2)` implementation that this changeset attempts to fix: 1. As mentioned in nix-rust/issues/1325, `recvmmsg(2)` can return fewer messages than requested, and 2. Passing the return value of `recvmmsg(2)` as the number of bytes in the messages received is incorrect. This changeset incorporates the proposed fix from nix-rust/issues/1325, as well as passing the correct value (`mmsghdr.msg_len`) for the number of bytes in a given message. Co-authored-by: Toby DiPasquale <toby@cbcg.net>
2020-11-28Disable test-aio-drop in GNU environmentsAlan Somers
This test occasionally fails in Travis on x86_64-unknown-linux-gnu. The failure takes the form of the test executable receiving a random signal. Sometimes SIGHUP, sometimes SIGKILL, etc. I think this must be a bug in glibc, even though I can't reproduce it in my development environment. But it interferes with CI too much to leave enabled.
2020-11-27Fix recvmmsg(2) implementationToby DiPasquale
There were two problems discovered with the `recvmmsg(2)` implementation that this changeset attempts to fix: 1. As mentioned in nix-rust/issues/1325, `recvmmsg(2)` can return fewer messages than requested, and 2. Passing the return value of `recvmmsg(2)` as the number of bytes in the messages received is incorrect. This changeset incorporates the proposed fix from nix-rust/issues/1325, as well as passing the correct value (`mmsghdr.msg_len`) for the number of bytes in a given message.
2020-11-19Merge #1337bors[bot]
1337: Add docs.rs target list r=asomers a=myfreeweb ref: https://blog.rust-lang.org/2020/03/15/docs-rs-opt-into-fewer-targets.html Makes sense to build docs for all supported OSes (BSD, Redox) rather than completely empty docs for Windows :) Co-authored-by: myfreeweb <greg@unrelenting.technology>
2020-11-17Add docs.rs target listmyfreeweb
ref: https://blog.rust-lang.org/2020/03/15/docs-rs-opt-into-fewer-targets.html
2020-11-16Merge #1332bors[bot]
1332: Suppress temporary libc deprecations r=asomers a=tamird See individual commits. This PR is an alternative to #1329. @asomers Co-authored-by: Tamir Duberstein <tamird@gmail.com>
2020-11-15Suppress time_t musl "deprecation"Tamir Duberstein
See https://github.com/rust-lang/libc/issues/1848 in which this type is changing from i32 to i64; the change is being announced via this deprecation.
2020-11-15Suppress af_alg_iv "deprecation"Tamir Duberstein
See https://github.com/rust-lang/libc/issues/1501 in which this type's trait implementations are being removed; the change is being announced via this deprecation.
2020-10-18Merge #1318bors[bot]
1318: KEEPCNT/KEEPINTVL aren't available on OpenBSD. r=asomers a=ltratt Without this commit, nix doesn't currently compile on OpenBSD. Some keepalive settings can be set globally, but not per-socket (see e.g. https://bugzilla.mozilla.org/show_bug.cgi?id=970550 for some digging into this). Since it seems that NetBSD and DragonflyBSD have these settings, it makes more sense to only exclude them on OpenBSD rather than include them on (pretty much every) other operating systems. Co-authored-by: Laurence Tratt <laurie@tratt.net>
2020-10-18KEEPCNT/KEEPINTVL aren't available on OpenBSD.Laurence Tratt
Without this commit, nix doesn't currently compile on OpenBSD. Some keepalive settings can be set globally, but not per-socket (see e.g. https://bugzilla.mozilla.org/show_bug.cgi?id=970550 for some digging into this). Since it seems that NetBSD and DragonflyBSD have these settings, it makes more sense to only exclude them on OpenBSD rather than include them on (pretty much every) other operating systems.
2020-10-16Merge #1316bors[bot]
1316: update require_kernel_version string to handle "_" in version string r=asomers a=ritzk test code breaks on fc333 ``` $ cargo test failures: ---- sys::test_socket::recvfrom::udp_offload::gro stdout ---- thread 'sys::test_socket::recvfrom::udp_offload::gro' panicked at 'called `Result::unwrap()` on an `Err` value: ParseError("Extra junk after valid version: _64")', test/sys/test_socket.rs:292:13 ``` this is due underscore in release string( arch/x86_64), which is not supported by semver. ``` $ uname -r 5.8.14-300.fc33.x86_64 ``` Co-authored-by: Ritesh Khadgaray <khadgaray@gmail.com>
2020-10-16update require_kernel_version to handle "_" in version stringRitesh Khadgaray
test code breaks on fedora 33 ``` $ cargo test failures: ---- sys::test_socket::recvfrom::udp_offload::gro stdout ---- thread 'sys::test_socket::recvfrom::udp_offload::gro' panicked at 'called `Result::unwrap()` on an `Err` value: ParseError("Extra junk after valid version: _64")', test/sys/test_socket.rs:292:13 ``` this is due underscore in release string( arch/x86_64), which is not supported by semver. ``` $ uname -r 5.8.14-300.fc33.x86_64 ``` Replace the underscore with hypen to provide a consistent sematic.
2020-10-15Merge #1313bors[bot]
1313: Update to cfg-if 1.0 r=asomers a=mbrubeck Co-authored-by: Matt Brubeck <mbrubeck@limpet.net>
2020-10-15Update to cfg-if 1.0Matt Brubeck
2020-10-13Merge #1306bors[bot]
1306: Add wrapper for mremap r=asomers a=sporksmith Fixes #1295 Co-authored-by: Jim Newsome <jnewsome@torproject.org>
2020-10-13Add wrapper for mremapJim Newsome
2020-10-12add Cirrus CI badge to readmeMax Blachman
2020-10-12Merge #1307bors[bot]
1307: Release v0.19.0. r=kamalmarhubi a=qwandor-google I'd like to get a new version of the crate released including #1301 so that I can get the vsock crate building on Android, and get both imported into the Android tree. Co-authored-by: Andrew Walbran <qwandor@google.com>
2020-10-10Merge #1283bors[bot]
1283: Add support for TCP_KEEPCNT and TCP_KEEPINTVL TCP keepalive options. r=asomers a=yoav-steinberg Co-authored-by: Yoav Steinberg <yoav@monfort.co.il>
2020-10-10Add support for TCP_KEEPCNT and TCP_KEEPINTVL TCP keepalive options.Yoav Steinberg
2020-10-10Merge #1303bors[bot]
1303: Renable the ScmTimestamp test on FreeBSD i386 r=posborne a=asomers The relevant bug was fixed in 11.3-RELEASE https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=222039 Co-authored-by: Alan Somers <asomers@gmail.com>
2020-10-06Release v0.19.0.Andrew Walbran
2020-10-06Merge #1301bors[bot]
1301: Support vsock on Android as well as Linux. r=asomers a=qwandor-google This change depends on rust-lang/libc#1905 so can't be merged until that is merged and released. Co-authored-by: Andrew Walbran <qwandor@google.com>
2020-10-04Support vsock on Android as well as Linux.Andrew Walbran
Fix deprecation warning from libc update.
2020-10-03Renable the ScmTimestamp test on FreeBSD i386Alan Somers
The relevant bug was fixed in 11.3-RELEASE https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=222039
2020-10-03Merge #1296bors[bot]
1296: DragonFlyBSD: use __errno_location now provided by the libc crate r=asomers a=cmusser Dragonfly recently (in Dfly 5.8) added an `__errno_location()` function to make it easy to access the thread-local `errno` variable. This has been exposed in rust-libc as of 0.2.77. This PR uses that functionality instead of the locally compiled C language shim, which the PR removes. One issue is backwards compatibilty. It requires 0.2.77 libc and DragonFly 5.8. Not sure how to gracefully handle older DragonFly versions, although I'm also not sure doing so is worth it. Co-authored-by: Chuck Musser <cmusser@sonic.net>
2020-10-03Merge #1300bors[bot]
1300: Add PTRACE_SYSEMU and PTRACE_SYSEMU_SINGLESTEP support r=asomers a=voidc Closes #1249. I think @jabedude was working on this, but as there was no progress since May I went ahead and implemented it myself. I'm not completely sure about the cfg gates. Could we enable the functions for more targets? I'm also open for suggestions of better names for the new functions. Co-authored-by: Dominik Stolz <d.stolz@tum.de>
2020-10-03Merge #1293bors[bot]
1293: Mark nix::unistd::fork as unsafe. r=asomers a=vi Fix tests. No change in documentation. Resolves #1030. Don't forget to bump major version number to `0.19`. Co-authored-by: Vitaly _Vi Shukela <vi0oss@gmail.com>
2020-10-03Add PTRACE_SYSEMU and PTRACE_SYSEMU_SINGLESTEP supportDominik Stolz
2020-10-03Merge #1281bors[bot]
1281: Added clock_gettime, clock_getres, clock_settime, clock_getcpuclockid r=asomers a=xonatius Picked up #1100 and added `clock_getcpuclockid` call as well. Credits to @kevinwern for the initial version. https://www.man7.org/linux/man-pages/man2/clock_gettime.2.html https://www.man7.org/linux/man-pages/man3/clock_getcpuclockid.3.html Closes #1275 Co-authored-by: Daniil Bondarev <xonatius@gmail.com>
2020-09-28Added clock_gettime, clock_getres, clock_settime, clock_getcpuclockidDaniil Bondarev
2020-09-21DragonFlyBSD: use __errno_location now provided by the libc crateChuck Musser
This obviates the need for the C language shim for this variable, which this commit removes.
2020-09-20Add CHANGELOG.md entry about unsafe fork.Vitaly _Vi Shukela
2020-09-20Mark nix::unistd::fork as unsafe.Vitaly _Vi Shukela
Fix tests. No change in documentation. Resolves #1030.
2020-09-19Merge #1294bors[bot]
1294: Add allow(unused_unsafe) to some functions. r=asomers a=vi Co-authored-by: Vitaly _Vi Shukela <vi0oss@gmail.com>
2020-09-13Adapt for safe-isation of some libc functions.Vitaly _Vi Shukela
(https://github.com/rust-lang/libc/pull/1870) Denied lint being overridden instead of unsafe block removed to preserve compatibility with old `libc` versions.
2020-09-06Merge #1290bors[bot]
1290: use subordinate terminal device for termios calls r=asomers a=jclulow The pseudo-terminal device handling tests in some places make tcgetattr(3C) and tcsetattr(3C) calls using the control/manager file descriptor rather than the subordinate terminal descriptor. This works on some systems, but not all; others such as illumos (and presumably Solaris) are more strict and require the termios requests be made against the terminal descriptor only. Co-authored-by: Joshua M. Clulow <jmc@oxide.computer>
2020-08-22Merge #1284bors[bot]
1284: Expose SeekData and SeekHole on all Linux targets r=asomers a=Amanieu These were previously missing on musl and mips targets because of missing definitions in the libc crate. Co-authored-by: Amanieu d'Antras <amanieu@gmail.com> Co-authored-by: Alan Somers <asomers@gmail.com>
2020-08-22Merge branch 'master' into musl_seekAlan Somers
2020-08-22Add changelog entryAmanieu d'Antras
2020-08-22Expose SeekData and SeekHole on all Linux targetsAmanieu d'Antras
These were previously missing on musl and mips targets because of missing definitions in the libc crate.