Skip to main content

Crate vmrunner

Crate vmrunner 

Source
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§

TestSetup
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::TestSetup before invoking the user body.