Expand description
Test helper and attribute macro for VM-backed integration tests.
The public entry point is the test attribute:
ⓘ
#[vmrunner::test(system = "fedora")]
fn smoke(setup: vmrunner::TestSetup) -> anyhow::Result<()> {
assert_eq!(setup.test_name(), "smoke");
Ok(())
}Structs§
- Test
Setup - Per-test setup generated by
#[vmrunner::test(...)].
Functions§
- run_
current_ test_ in_ unshare_ child - Re-run the current test in a child process created by
unshare(1). - run_
current_ test_ in_ userns_ child - Re-run the current test with only a user namespace root mapping.
Attribute Macros§
- test
- Expand a VM-backed test function into a zero-argument Rust test that constructs a
vmrunner::TestSetupbefore invoking the user body.