Clone this repo:

Branches

  1. 59f6f0d Fix build. by Craig Stout · 2 years, 8 months ago master
  2. a524a7e Use arch specific PCI device filenames by Alex Legg · 4 years ago
  3. 95e906c Use PCI bus and device numbers in block test util by Alex Legg · 4 years, 7 months ago
  4. 21e0ca9 Add 'Find' command to virtio net test util by Alex Legg · 4 years, 8 months ago
  5. 6b3b8c9 Better error messages for "build.sh" without an ARM toolchain. by David Greenaway · 5 years ago

Linux Tests

This repository contains utilities for running integration tests for Linux guests under Machina.

Build

First install rust (follow the instructions of the rustup tool):

$ curl https://sh.rustup.rs -sSf | sh
$ source ~/.cargo/env

Next we add some new targets for cross-compiling and static linking. Rust supports statically linking libc by replacing the usual GNU libc with musl (see The Rust Book: Advanced Linking).

$ rustup target add x86_64-unknown-linux-musl
$ rustup target add aarch64-unknown-linux-musl

To compile to ARM targets, you will also need to have an appropriate cross-compiler in your path. For Debian-based systems, this can be installed by running the following command:

$ sudo apt install gcc-aarch64-linux-gnu

Lastly, run the build script for your desired architecture. This will invoke cargo for you as well as create an ext2 image in out/.

$ ./build.sh {arm64|x64}