mirror of https://github.com/aya-rs/aya
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This uses a mix of rust-script, bash, qemu and a test runner called RTF to add a regression test suite... and wires it into GitHub Actions Signed-off-by: Dave Tucker <dave@dtucker.co.uk> |
4 years ago | |
|---|---|---|
| .. | ||
| cases | 4 years ago | |
| .gitignore | 4 years ago | |
| README.md | 4 years ago | |
README.md
Aya Regression Tests
The aya regression test suite is a set of tests to ensure that common usage behaviours work on real Linux distros
Prerequisites
This assumes you have a working Rust and Go toolchain on the host machine
rustup toolcahin add x86_64-unknown-linux-musl- Install
rtf:go install github.com/linuxkit/rtf@latest - Install rust-script:
cargo install rust-script - Install
qemuandcloud-init-utilspackage - or any package that providescloud-localds
It is not required, but the tests run significantly faster if you use sccache
Usage
To read more about how to use rtf, see the documentation
Run the tests with verbose output
rtf -vvv run
Run the tests using an older kernel
AYA_TEST_IMAGE=centos8 rtf -vvv run
Writing a test
Tests should follow this pattern:
- The eBPF code should be in a file named
${NAME}.ebpf.rs - The userspace code should be in a file named
${NAME}.rs - The userspace program should make assertions and exit with a non-zero return code to signal failure
- VM start and stop is handled by the framework
- Any files copied to the VM should be cleaned up afterwards
See ./cases for examples