Age | Commit message (Collapse) | Author |
|
Fixes #329
|
|
unistd: Add pause(2)
|
|
Replace a busy loop with a call to `pause(2)`.
|
|
|
|
doc: Minor whitespace fix in CONVENTIONS.md
|
|
|
|
epoll: Add EPOLLEXCLUSIVE flag.
EPOLLEXCLUSIVE flag is available in Linux4.5.
|
|
EPOLLEXCLUSIVE flag is available in Linux4.5.
|
|
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.
|
|
Signed-off-by: Paul Osborne <osbpau@gmail.com>
|
|
Signed-off-by: Paul Osborne <osbpau@gmail.com>
|
|
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>
|
|
Use getuid(2) from nix instead of libc in test_mount
|
|
|
|
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
|
|
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
|
|
travis: only require sudo on docker/i686 builds
Signed-off-by: Paul Osborne <osbpau@gmail.com>
|
|
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>
|
|
Signed-off-by: Paul Osborne <osbpau@gmail.com>
|
|
contributing: Add R- architecture-specific label prefix
|
|
|
|
Add context module.
The module wraps context handling related functions and structs.
|
|
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
|
|
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>
|
|
This serves as an example use of the libc_bitflags macro.
|
|
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>
|
|
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
|
|
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.
|
|
The module wraps context handling related functions and structs.
|
|
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>
|
|
Signed-off-by: Paul Osborne <osbpau@gmail.com>
|
|
Signed-off-by: Paul Osborne <osbpau@gmail.com>
|
|
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>
|
|
Based on code review feedback.
Signed-off-by: Paul Osborne <osbpau@gmail.com>
|
|
Signed-off-by: Paul Osborne <osbpau@gmail.com>
|
|
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>
|
|
This is based on libc and the new docker-based testing infrastructure
via posborne/rust-cross.
Signed-off-by: Paul Osborne <osbpau@gmail.com>
|
|
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>
|
|
Rename flags to conform to conventions.
Resolves #290.
|
|
Resolves #290.
|
|
There are also changes in the upstream docker images to support
more targets (android on ARM, etc).
|
|
We already need to test cargo about gcc locations so it can perfom
linking -- we just parse this information out to tell rust where
gcc is for complation (nix-test compiles some C code for testing).
Signed-off-by: Paul Osborne <osbpau@gmail.com>
|
|
Signed-off-by: Paul Osborne <osbpau@gmail.com>
|
|
Signed-off-by: Paul Osborne <osbpau@gmail.com>
|
|
Later on, it will probably make sense to stop on failure -- given
that most targets currently fail, however, this works a bit better
for the time being.
Signed-off-by: Paul Osborne <osbpau@gmail.com>
|
|
Signed-off-by: Paul Osborne <osbpau@gmail.com>
|
|
This is handy for trying out changes to the docker image for
testing things out.
Signed-off-by: Paul Osborne <osbpau@gmail.com>
|
|
There is now a published docker image (if a bit large) making
it possible for others to start using the new test ingfrastructure.
There seems to be no shortage of compile problems right now.
Signed-off-by: Paul Osborne <osbpau@gmail.com>
|
|
Signed-off-by: Paul Osborne <osbpau@gmail.com>
|
|
Signed-off-by: Paul Osborne <osbpau@gmail.com>
|