Skip to content

cyberus-technology/libvirt-tests

Repository files navigation

Libvirt NixOS Tests

A minimal set of NixOS integration tests for validating specific Libvirt features and supporting libvirt development.

These tests provide a convenient environment for:

  • Running automated checks against Libvirt.
  • Testing patches to virtualization backends (e.g., Cloud Hypervisor) by running the libvirt test suite in a reproducible NixOS VM environment.

Running Tests

  1. Launch the test driver:

    nix run -L .#tests.x86_64-linux.default.driverInteractive

    This starts the NixOS integration test driver (a Bash script generated by the NixOS test framework).

  2. Execute the test script inside the Python REPL:

    test_script()

It might happen that the integration test runs out of resources when the user's tmp directory space is too small. You can try to mitigate this by setting XDG_RUNTIME_DIR=/tmp/libvirt before invoking the test script.

Long tests

If you want to perform a long running migration series with a VM that is under memory load use:

nix run -L .#tests.x86_64-linux.long_migration_with_load.driverInteractive

Using a Custom Libvirt or Cloud Hypervisor

To test against a specific version or local build:

  • Edit flake.nix and override the corresponding inputs.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •