Fix "virtio_block_test_util" build on GNU/Linux systems.

libc::ioctl has a "c_ulong" type on native GNU/Linux x86_64 systems,
but a "c_int" type on Fuchsia systems. We can avoid specifying the
type and allow Rust to infer it to allow the tool to build in both
environments.

Change-Id: Iddff2ef4549f6c0bf6c6b1532ca785eb452204d0
1 file changed
tree: 2ede9ed4f8eca09379b47945ff724f31db4d5397
  1. .cargo/
  2. src/
  3. .gitignore
  4. build.sh
  5. Cargo.toml
  6. LICENSE
  7. README.md
README.md

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

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}