Build and test Karyos
How to build the Karyos workspace and run its tests, Loom models, Miri and the deterministic simulator on your machine or in a Linux container.
The Karyos workspace builds with the Rust toolchain pinned in
rust-toolchain.toml; rustup installs it. Nothing is published to
crates.io yet, so you build from the source.
Requirements
- The Rust toolchain pinned in
rust-toolchain.toml. - Python 3, for the dependency inventory check that
make pre-pushruns. - For
make miri, the nightly toolchain pinned in the Makefile, with its Miri component. - Docker, to run the Linux tests from macOS.
Run the tests
On the host
make test # cargo test --workspace --locked
make lint # clippy, warnings denied
make loom # Loom models of the atomic protocols
make miri # Miri on karyos-sys
make sim # deterministic simulator scenarios
make pre-push # the full local gateIn a Linux container
scripts/linux-test.sh
scripts/linux-test.sh -p karyos-driver --lockedNote
make bench runs the benchmark harness. Its results are indicative only.
The cross-process control path
The Linux tests of karyos-driver exercise the cross-process control path:
admission in one process, child processes that are killed, stopped and
restarted, and the platform checks on modes, owners, stale files, backlog,
size seals and descriptor counts. There is no example binary yet.
A driver opens its admission socket with EmbeddedDriver::with_ipc and
serves it from do_work. A client process attaches with
karyos_client::ipc::attach.