summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-06-07Merge #1079bors[bot]
1079: socket: expose MSG_WAITALL in MsgFlags r=asomers a=stefano-garzarella MSG_WAITALL can be useful with recv() to wait the full amount of data requested. Co-authored-by: Stefano Garzarella <sgarzare@redhat.com>
2019-06-07socket: expose MSG_WAITALL in MsgFlagsStefano Garzarella
MSG_WAITALL can be useful with recv() to wait the full amount of data requested. Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
2019-06-06Start the next dev cycleAlan Somers
2019-06-07Merge #1081bors[bot]
1081: Release v0.14.1 r=asomers a=asomers Co-authored-by: Alan Somers <asomers@gmail.com>
2019-06-06Release v0.14.1Alan Somers
2019-06-06[skip ci] update CHANGELOG for PR #1072Alan Somers
2019-06-06Merge #1076bors[bot]
1076: Miscellaneous test fixes r=asomers a=asomers Miscellaneous fixes needed to get the tests working more reliably when --test-threads > 1 , or when run inside of Linux containers. Co-authored-by: Alan Somers <asomers@gmail.com>
2019-06-06Restrict rand dependency to < 0.7Alan Somers
The rand team briefly published (and then yanked) release 0.7.0, which raises the MSRV to 1.32.0, breaking some of our tests. This commit restricts rand to < 0.7 so we won't run into that problem again.
2019-06-06Use Cirrus' Cargo cacheAlan Somers
2019-06-06Fix an "unused use statement" warning on non-musl platformsAlan Somers
This was an oversight from 974320d09fbd1fae79da537383c2144ed9aa4967
2019-06-06Fix some bugs with multithreaded tests:Alan Somers
* kmod tests must run exclusively, because they load and unload a module with a constant name. * A few tests were doing some variant of chdir, but weren't taking the CWD_MTX. * The kmod tests read files by path relative to CWD, so they need the CWD_MTX. But they don't need it exclusively, so convert the CWD_MTX into an RwLock. * Tests that do change the cwd need to change it back when they're done.
2019-06-06Fix multiple problems with the test_acct testAlan Somers
* On Linux, it requires the CAP_SYS_PACCT capability. * Reenable the test on FreeBSD, because our FreeBSD CI environment is no longer jailed (since we switched from BuildBot to CirrusCI), but check at runtime whether the process is jailed. * test_acct needs the FORK_MTX because it uses Command::new . * Fix a race condition. acct(2) isn't synchronous. It starts a kernel thread but does not wait for it to become ready. Fix it by running the test command within the polling loop.
2019-06-06Fix kmod tests on in Linux containersAlan Somers
It's not sufficient to check for root privileges, because a containerized process may have root's euid but still lack important capabilities. Fix these tests by checking for the CAP_SYS_MOD capability.
2019-06-06Fix the is_so_mark_functional test in Linux containersAlan Somers
It's not sufficient to check for root privileges. In a container, the euid may be root even though the user lacks some capabilities. Replace this test's root check with a check for the CAP_NET_ADMIN capability instead.
2019-06-03Check euid, not uid, for socket testsAlan Somers
2019-06-03Remove deploy steps from Travis configuration.Alan Somers
They've never been used, anyway.
2019-06-03[skip ci] Update comments in .travis.ymlAlan Somers
2019-06-03Merge #1072bors[bot]
1072: Fix libc deprecations r=asomers a=dario23 The `libc` crate now uses rust types in some places where previously types like `libc::uint8_t` had been defined. This PR adjusts nix's code to reflect these simplifications. Co-authored-by: Johannes Schilling <dario@deaktualisierung.org> Co-authored-by: Alan Somers <asomers@gmail.com>
2019-06-02Update libc dependency to 0.2.57Alan Somers
There were some breaking changes between 0.2.55 and 0.2.57. Now Nix will only work with the later version.
2019-06-02Fix build on Android with recent libcAlan Somers
libc just changed the signedness of sigaction.sa_flags for Android. https://github.com/rust-lang/libc/commit/841b3eb01644283c3c41ac1d1a2ddcec141f15f2
2019-06-02Fix the build on Linux/mips with recent libcAlan Somers
libc just undefined MADV_SOFT_OFFLINE on mips. https://github.com/rust-lang/libc/pull/1365 Fixes #1074
2019-06-02Fix test_pthread_self on muslAlan Somers
On musl, pthread_t is a pointer type.
2019-05-31fix more uintXY_t instancesJohannes Schilling
2019-05-31libc::uint32_t -> rust u32Johannes Schilling
2019-05-31libc::uint8_t deprecated in favor of rust u8Johannes Schilling
2019-05-25Merge #1066bors[bot]
1066: Allow import of Linux macros in Rust2018 r=asomers a=Susurrus Finish off the work started in 8c9ac5a70 allowing the use of macros without needing to import local inner macros for Linux targets. Co-authored-by: Bryant Mairs <bryant@mai.rs>
2019-05-24Allow import of Linux macros in Rust2018Bryant Mairs
Finish off the work started in 8c9ac5a70 allowing the use of macros without needing to import local inner macros.
2019-05-23Merge #1065bors[bot]
1065: Update fcntl.rs r=asomers a=kubkon Just a minor typo in the docs of `O_RDWR`. It read: ``` /// Allow both reading and writing. /// /// This should not be combined with `O_WRONLY` or `O_RDWR`. O_RDWR; ``` but I believe it should read ``` /// Allow both reading and writing. /// /// This should not be combined with `O_WRONLY` or `O_RDONLY`. O_RDWR; ``` instead :-) Co-authored-by: Jakub Konka <kubkon@jakubkonka.com>
2019-05-23Update fcntl.rsJakub Konka
Just a minor typo in the docs of `O_RDWR`. It read: ``` /// Allow both reading and writing. /// /// This should not be combined with `O_WRONLY` or `O_RDWR`. O_RDWR; ``` but I believe it should read ``` /// Allow both reading and writing. /// /// This should not be combined with `O_WRONLY` or `O_RDONLY`. O_RDWR; ``` instead :-)
2019-05-22Merge #1061bors[bot]
1061: Release v0.14.0 r=asomers a=asomers Co-authored-by: Alan Somers <asomers@gmail.com>
2019-05-21Release v0.14.0Alan Somers
2019-05-18Merge #1050bors[bot]
1050: Implement `sched_yield`. r=asomers a=sunfishcode This adds the `sched_yield` function, which is part of POSIX: http://pubs.opengroup.org/onlinepubs/9699919799/functions/sched_yield.html and widely implemented on Unix-family platforms. Co-authored-by: Dan Gohman <sunfish@mozilla.com>
2019-05-17[skip ci] add missing CHANGELOG entry for PR #1055Alan Somers
2019-05-18Merge #1054bors[bot]
1054: Remove a redundant "use libc" r=asomers a=asomers Co-authored-by: Alan Somers <asomers@gmail.com>
2019-05-17Implement `sched_yield`.Dan Gohman
This adds the `sched_yield` function, which is part of POSIX: http://pubs.opengroup.org/onlinepubs/9699919799/functions/sched_yield.html and widely implemented on Unix-family platforms.
2019-05-17Remove a redundant "use libc"Alan Somers
2019-05-17Merge #1055bors[bot]
1055: Fix build on arm and s390x after recent libc changes r=asomers a=asomers libc just removed some symbols on linux/arm32 and linux/s390x that never should've been defined in the first place. https://github.com/rust-lang/libc/commit/24f8972b8d2d915b1687fc8197e1ed95e349a82e https://github.com/rust-lang/libc/commit/d2695436ba5072078796c76f727a296e0f43caa6 Co-authored-by: Alan Somers <asomers@gmail.com>
2019-05-17Fix build on arm and s390x after recent libc changesAlan Somers
libc just removed some symbols on linux/arm32 and linux/s390x that never should've been defined in the first place. https://github.com/rust-lang/libc/commit/24f8972b8d2d915b1687fc8197e1ed95e349a82e https://github.com/rust-lang/libc/commit/d2695436ba5072078796c76f727a296e0f43caa6
2019-05-05Merge #1048bors[bot]
1048: Restored the bytes field on RecvMsg r=asomers a=vdagonneau This pull request restores the `bytes` field on the `RecvMsg` structure in order to be able to know the amount of bytes read during a call to `recvmsg`. Co-authored-by: Vincent Dagonneau <vincentdagonneau@gmail.com>
2019-04-29Restored the bytes field on RecvMsg in order to know the amount of bytes ↵Vincent Dagonneau
received using recvmsg.
2019-04-23Merge #1042bors[bot]
1042: pty: Add forkpty r=asomers a=keur Co-authored-by: Kevin Kuehler <keur@ocf.berkeley.edu>
2019-04-23pty: Add forkptyKevin Kuehler
2019-04-22Merge #1046bors[bot]
1046: Remove duplicate use statements on macOS. r=asomers a=pusateri nix current compiles on 1.34.0 stable but not on 1.36.0 nightly because of duplicate use statements. This trivial change removes the duplicates so it compiles and the tests run successfully on 1.36.0 nightly (33fe1131c 2019-04-20) Co-authored-by: Tom Pusateri <pusateri@bangj.com>
2019-04-21Remove duplicate use statements on macOS.Tom Pusateri
2019-04-20Merge #1045bors[bot]
1045: Add a access(2) wrapper r=asomers a=snsmac Co-authored-by: jr <semi1@posteo.de>
2019-04-20Add a access(2) wrapperjr
2019-04-14Merge #1044bors[bot]
1044: Add unistd::{seteuid,setegid} r=asomers a=jmmv This is for the benefit of those platforms that do not provide setresuid nor setresgid, like macOS. Co-authored-by: Julio Merino <julio@meroh.net>
2019-04-12Merge #1041bors[bot]
1041: allow importing macros without helpers in the 2018 edition r=asomers a=euclio ~This PR adds the `$crate::` prefix to all uses of helper macros, which will allow users of the 2018 edition to import the macros without needing to also import their helpers.~ See https://doc.rust-lang.org/edition-guide/rust-2018/macros/macro-changes.html#macros-with-crate-prefix for more info. ~While this is a cleaner solution than using `#[macro_export(local_inner_macros)]`, it also requires bumping the minimum supported compiler version to 1.30. If this is acceptable, I'll add a commit to update the Travis configuration and docs.~ This PR now uses `local_inner_macros` to preserve compatibility with the current minimum Rust version. Co-authored-by: Andy Russell <arussell123@gmail.com>
2019-04-11Add unistd::{seteuid,setegid}Julio Merino
This is for the benefit of those platforms that do not provide setresuid nor setresgid, like macOS.
2019-04-11Merge #1043bors[bot]
1043: Uncomment to_std and from_std methods for IpAddr r=asomers a=rabbott99 These were commented out in 2b60633c8bdd5359c317bb74e698777106befb85, apparently because `std::net::IpAddr` had been removed from the standard library. However, `IpAddr` has since been re-added to the standard library (https://github.com/rust-lang/rust/pull/23711) and stabilized (https://github.com/rust-lang/rust/pull/31438), so it seems there is no reason to keep them commented out. Co-authored-by: rabbott99 <rabbott4927@gmail.com>