summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-04-14Auto merge of #350 - llogiq:clippy, r=posborneHomu
fixed a few clippy warnings Just a few style nits. Hope it'll be useful anyway :smile:
2016-04-14Auto merge of #351 - kamalmarhubi:sleep, r=posborneHomu
unistd: Add sleep(3)
2016-04-13unistd: Add sleep(3)Kamal Marhubi
2016-04-14fixed a few clippy warningsAndre Bogus
2016-04-07Auto merge of #342 - tillarnold:master, r=utkarshkukretiHomu
Add the repository field to Cargo.toml
2016-04-07Add the repository field to Cargo.tomlTill Arnold
2016-04-03Auto merge of #340 - kamalmarhubi:allow-raw-pointer-derive-warning, r=posborneHomu
Fix raw_pointer_derive warning This commit adds a small build script to detect if we need to `#[allow(raw_pointer_derive)]` and makes the attribute conditional. Refs #337
2016-04-02Fix raw_pointer_derive warningKamal Marhubi
This commit adds a small build script to detect if we need to `#[allow(raw_pointer_derive)]` and makes the attribute conditional. Refs #337
2016-03-31Auto merge of #332 - kamalmarhubi:fork-enum, r=fiveopHomu
unistd: Redesign the enum returned by fork() This changes the name of the enum returned by `fork()` to `ForkResult`, and changes the `Parent` variant to be struct-like. The result can be matched like use nix::unistd::ForkResult::*; match fork().unwrap() { Parent { child } => { ... } Child => { ... } } using the shorthand matching syntax for struct-like enum variants. This is a breaking change.
2016-03-31Auto merge of #335 - kamalmarhubi:sin6-flowinfo-scope-id, r=fiveopHomu
socket: Respect IPv6 flowinfo and scope_id in InetAddr::from_std Fixes #329
2016-03-30unistd: Mark fork() and related methods as #[inline]Kamal Marhubi
2016-03-30unistd: Redesign the enum returned by fork()Kamal Marhubi
This commit changes the name of the enum returned by `fork()` to `ForkResult`, and changes the `Parent` variant to be struct-like. The result can be matched like use nix::unistd::ForkResult::*; match fork().unwrap() { Parent { child } => { ... } Child => { ... } } using the shorthand matching syntax for struct-like enum variants. This is a breaking change.
2016-03-30socket: Respect IPv6 flowinfo and scope_id in InetAddr::from_stdKamal Marhubi
Fixes #329
2016-03-30Auto merge of #336 - kamalmarhubi:pause, r=fiveopHomu
unistd: Add pause(2)
2016-03-30Use pause(2) in test_wait_signalKamal Marhubi
Replace a busy loop with a call to `pause(2)`.
2016-03-30unistd: Add pause(2)Kamal Marhubi
2016-03-29Auto merge of #331 - kamalmarhubi:conventions-whitespace, r=utkarshkukretiHomu
doc: Minor whitespace fix in CONVENTIONS.md
2016-03-28doc: Minor whitespace fix in CONVENTIONS.mdKamal Marhubi
2016-03-29Auto merge of #330 - kubo39:epollexclusive, r=kamalmarhubiHomu
epoll: Add EPOLLEXCLUSIVE flag. EPOLLEXCLUSIVE flag is available in Linux4.5.
2016-03-28epoll: Add EPOLLEXCLUSIVE flag.kubo39
EPOLLEXCLUSIVE flag is available in Linux4.5.
2016-03-22Auto merge of #326 - posborne:fix-arm-and-x86-ci, r=kamalmarhubiHomu
Fix arm and x86 ci See the individual commit message for more detail. ARM is now passing (but we don't run mount tests any more when in the docker container). For x86_64/i686, there were some changes in the posborne/rust-cross stuff.
2016-03-21testing: failing on arm is no longer an allowed failure!Paul Osborne
Signed-off-by: Paul Osborne <osbpau@gmail.com>
2016-03-21testing: specify a few extra environment variablesPaul Osborne
Signed-off-by: Paul Osborne <osbpau@gmail.com>
2016-03-21testing: use posborne/rust-cross:x86 for x86_64/i686Paul Osborne
Previously, std for x86_64 and i686 was included in the base image. To reduce size, those contents are now in the x86 image instead. Signed-off-by: Paul Osborne <osbpau@gmail.com>
2016-03-22Auto merge of #328 - kamalmarhubi:test_mount-getuid, r=posborneHomu
Use getuid(2) from nix instead of libc in test_mount
2016-03-21Use getuid(2) from nix instead of libc in test_mountKamal Marhubi
2016-03-22Auto merge of #327 - kamalmarhubi:allow-test_mount_failure, r=fiveopHomu
mount: Do not treat unshare(2) failure as test failure The mount test runner uses unprivileged user namespaces. Previously, failure from `unshare(2)` to create the user namespace would fail the test. This changes that to simply print an error and exit successfully. Refs https://github.com/nix-rust/nix/pull/326
2016-03-21mount: Do not treat unshare(2) failure as test failureKamal Marhubi
The mount test runner uses unprivileged user namespaces. Previously, failure from `unshare(2)` to create the user namespace would fail the test. This changes that to simply print an error and exit successfully. Refs https://github.com/nix-rust/nix/pull/326
2016-03-19Auto merge of #322 - posborne:travis-mixed-sudo-environment, r=kamalmarhubiHomu
travis: only require sudo on docker/i686 builds Signed-off-by: Paul Osborne <osbpau@gmail.com>
2016-03-17travis: add back testing on all rust versions (for linux)Paul Osborne
We are using containers for a majority of builds again, so perform those builds on more platforms (as travis seems to handle this much better). For OSX, we now testing i686/x86_64 on 1.1.0 as well for added coverage. Signed-off-by: Paul Osborne <osbpau@gmail.com>
2016-03-17travis: only require sudo on docker/i686 buildsPaul Osborne
Signed-off-by: Paul Osborne <osbpau@gmail.com>
2016-03-17Auto merge of #321 - kamalmarhubi:r-architecture-label, r=fiveopHomu
contributing: Add R- architecture-specific label prefix
2016-03-17contributing: Add R- architecture-specific label prefixKamal Marhubi
2016-03-17Auto merge of #311 - fiveop:context, r=@kamalmarhubiHomu
Add context module. The module wraps context handling related functions and structs.
2016-03-17Auto merge of #315 - kamalmarhubi:libc-bitflags, r=kamalmarhubiHomu
Add libc_bitflags convenience macro We define many bitflags types with values from the libc crate. Currently these look like this: bitflags!{ flags ProtFlags: libc::c_int { const PROT_NONE = libc::PROT_NONE, const PROT_READ = libc::PROT_READ, const PROT_WRITE = libc::PROT_WRITE, const PROT_EXEC = libc::PROT_EXEC, #[cfg(any(target_os = "linux", target_os = "android"))] const PROT_GROWSDOWN = libc::PROT_GROWSDOWN, #[cfg(any(target_os = "linux", target_os = "android"))] const PROT_GROWSUP = libc::PROT_GROWSUP, } } There's some repetition which is tedious. With the new macro, the above can instead be written libc_bitflags!{ flags ProtFlags: libc::c_int { PROT_NONE, PROT_READ, PROT_WRITE, PROT_EXEC, #[cfg(any(target_os = "linux", target_os = "android"))] PROT_GROWSDOWN, #[cfg(any(target_os = "linux", target_os = "android"))] PROT_GROWSUP, } } Thanks to Daniel Keep for the Little Book of Rust Macros, and for helping with this macro. Refs https://github.com/nix-rust/nix/issues/264
2016-03-17Auto merge of #318 - posborne:fix-runall, r=kamalmarhubiHomu
testing: remove refs to test_nix in run-all.sh Somewhere in the last set of changes, a few references to `test_nix` were not removed. Since that function doesn't exist, the tests would never be run on those targets. This script is only used when testing locally right now. Signed-off-by: Paul Osborne <osbpau@gmail.com>
2016-03-16mman: Use libc_bitflags macro for ProtFlagsKamal Marhubi
This serves as an example use of the libc_bitflags macro.
2016-03-16testing: remove refs to test_nix in run-all.shPaul Osborne
Somewhere in the last set of changes, a few references to `test_nix` were not removed. Since that function doesn't exist, the tests would never be run on those targets. This script is only used when testing locally right now. Signed-off-by: Paul Osborne <osbpau@gmail.com>
2016-03-16Add libc_bitflags convenience macroKamal Marhubi
We define many bitflags types with values from the libc crate. Currently these look like this: bitflags!{ flags ProtFlags: libc::c_int { const PROT_NONE = libc::PROT_NONE, const PROT_READ = libc::PROT_READ, const PROT_WRITE = libc::PROT_WRITE, const PROT_EXEC = libc::PROT_EXEC, #[cfg(any(target_os = "linux", target_os = "android"))] const PROT_GROWSDOWN = libc::PROT_GROWSDOWN, #[cfg(any(target_os = "linux", target_os = "android"))] const PROT_GROWSUP = libc::PROT_GROWSUP, } } There's some repetition which is tedious. With the new macro, the above can instead be written libc_bitflags!{ flags ProtFlags: libc::c_int { PROT_NONE, PROT_READ, PROT_WRITE, PROT_EXEC, #[cfg(any(target_os = "linux", target_os = "android"))] PROT_GROWSDOWN, #[cfg(any(target_os = "linux", target_os = "android"))] PROT_GROWSUP, } } Thanks to Daniel Keep for the Little Book of Rust Macros, and for helping with this macro. Refs https://github.com/nix-rust/nix/issues/264
2016-03-15Auto merge of #297 - posborne:docker-cross-test-infrastructure, r=kamalmarhubiHomu
Docker cross test infrastructure These commits contain the first portion of new infrastructure that will allow us to build for and test on a much larger set of platforms. Nix and the tests are *not* compiling on many platforms right now, but I believe at this point that most of those problems are issues with nix (or libc) rather than the test infrastructure. I want to get this out there so we can start filing issues and other people can start doing testing and development to resolve the issues popping up on various platforms. None of this is integrated in with travis at this point -- that will be phase 3. Phase 2 will be getting qemu going to run the tests for non-host platforms (this might be tricky when running in a container as `/dev/kvm` might need to be passed through). This is based on the testing infrastructure in libc but modified quite a bit -- The libc infrastructure doesn't seem to be a great experience for testing locally. If this approach works out, we might want to push this approach toward libc. The Dockerfile/Image that goes along with this is currently here: * https://github.com/posborne/docker-rust-cross * https://hub.docker.com/r/posborne/rust-cross/ I would have no problem moving this into the org if that makes sense down the line.
2016-03-14Add context module.Philipp Matthias Schaefer
The module wraps context handling related functions and structs.
2016-03-14testing: ensure run.sh is executing in docker containerPaul Osborne
On the host, some undesired things could end up happening if this is executed, so we now exit and log if that is attempted. In addition, we now backup the previous cargo config if present. This will never be the case in the current build setup, but that could change if we decide to do builds in a data volume in the future. Signed-off-by: Paul Osborne <osbpau@gmail.com>
2016-03-14testing: explicitly check TRAVIS_OS_NAME is osxPaul Osborne
Signed-off-by: Paul Osborne <osbpau@gmail.com>
2016-03-14testing: update documentation related to testingPaul Osborne
Signed-off-by: Paul Osborne <osbpau@gmail.com>
2016-03-14testing: use default linker for appropriate platformsPaul Osborne
For platforms where the host ${CC} is appropriate, use the default implicitly rather than matching it explictly. This will allow for the llvm linker to be used if/when that happens. Signed-off-by: Paul Osborne <osbpau@gmail.com>
2016-03-14testing: move echo statement within docker run scriptPaul Osborne
Based on code review feedback. Signed-off-by: Paul Osborne <osbpau@gmail.com>
2016-03-14libc: revert change to libc versionPaul Osborne
Signed-off-by: Paul Osborne <osbpau@gmail.com>
2016-03-13testing: docker tests now work on travisPaul Osborne
All of the platforms tested currently fail in some way currently, but the infrastructure itself appears to be working. As we have moved to the legacy infrastructure (required in order to use docker), the tests do run slower now. To compensate for that, i686 builds are only done on stable and we do not test every version between the current stable and the oldest version we support. Signed-off-by: Paul Osborne <osbpau@gmail.com>
2016-03-13testing: first shot at testing with travis for arm, mips, android, ...Paul Osborne
This is based on libc and the new docker-based testing infrastructure via posborne/rust-cross. Signed-off-by: Paul Osborne <osbpau@gmail.com>
2016-03-13testing: move to new posborne/rust-cross imagesPaul Osborne
The rust-cross image is no longer all-in-one but broken out by architecture class (or platform in the case of android). Signed-off-by: Paul Osborne <osbpau@gmail.com>