Skip to content

test(e2e): add reusable QEMU infrastructure for E2E tests#2471

Draft
drew wants to merge 5 commits into
mainfrom
drew/e2e-vm-example
Draft

test(e2e): add reusable QEMU infrastructure for E2E tests#2471
drew wants to merge 5 commits into
mainfrom
drew/e2e-vm-example

Conversation

@drew

@drew drew commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

Add reusable Nix and QEMU infrastructure for running OpenShell tests in disposable Linux VMs. The harness provides pinned native-architecture cloud guests, composable runtime and security configurations, artifact installation, predictable cleanup, and retained diagnostics for failures.

This is the base infrastructure PR for the VM-backed release and E2E test integrations in the child PRs below.

Stack

This is the parent PR.

Related Issue

Prototype alternative to #2254.

Changes

  • Add pinned Ubuntu 24.04, Fedora 44, CentOS Stream 10, and Rocky Linux 9 cloud-image definitions for ARM64 and AMD64
  • Add a nix run .#test-vm interface with disposable QCOW2 overlays, cloud-init SSH bootstrap, hardware acceleration where available, cleanup, and retained debug state
  • Add composable Ansible configurations for Docker, rootless Podman, and SELinux enforcing mode
  • Support repeatable package installation and direct executable copying into guests
  • Add automatic KVM-to-TCG fallback for Linux hosts without accessible hardware virtualization
  • Add dpkg to the Nix development shell and keep Debian package creation artifact-only
  • Document requirements, supported combinations, package workflows, lifecycle, and current limitations

Testing

  • bash -n nix/vm/run.sh tasks/scripts/package-deb.sh
  • shellcheck nix/vm/run.sh tasks/scripts/package-deb.sh
  • Parsed all Ansible playbooks as YAML
  • nix fmt reports no changes
  • Evaluated the flake app for aarch64-darwin, aarch64-linux, and x86_64-linux
  • CentOS Stream 10: installed rootless Podman and verified SELinux enforcing
  • Rocky Linux 9: installed Docker and verified SELinux enforcing
  • Fedora 44 ARM64: installed the release RPMs and reached the Podman-backed gateway with SELinux enforcing
  • Ubuntu 24.04 ARM64: installed the release Debian package and reached the Docker-backed gateway
  • mise run pre-commit passes
  • Unit tests added/updated (not applicable to this test infrastructure)
  • Automated E2E integration is added in the stacked child PRs

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)
  • Architecture and VM usage documentation updated

Signed-off-by: Drew Newberry <anewberry@nvidia.com>
@copy-pr-bot

copy-pr-bot Bot commented Jul 24, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

drew added 3 commits July 24, 2026 11:05
Signed-off-by: Drew Newberry <anewberry@nvidia.com>
Signed-off-by: Drew Newberry <anewberry@nvidia.com>
Signed-off-by: Drew Newberry <anewberry@nvidia.com>
@drew drew changed the title test(vm): add composable QEMU test guests test(vm): add reusable QEMU infrastructure for E2E tests Jul 24, 2026
@drew drew changed the title test(vm): add reusable QEMU infrastructure for E2E tests test(e2e): add reusable QEMU infrastructure for E2E tests Jul 24, 2026
Signed-off-by: Drew Newberry <anewberry@nvidia.com>
@drew
drew force-pushed the drew/e2e-vm-example branch from a9988d0 to 41f2720 Compare July 24, 2026 23:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant