<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/meta-virtualization.git/tests/conftest.py, branch wrynose</title>
<subtitle>Mirror of git.yoctoproject.org/meta-virtualization</subtitle>
<id>https://git.enea.com/cgit/linux/meta-virtualization.git/atom?h=wrynose</id>
<link rel='self' href='https://git.enea.com/cgit/linux/meta-virtualization.git/atom?h=wrynose'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/meta-virtualization.git/'/>
<updated>2026-04-22T23:10:15+00:00</updated>
<entry>
<title>tests: fix FD inheritance in test harness for all vdkr/vpdmn commands</title>
<updated>2026-04-22T23:10:15+00:00</updated>
<author>
<name>Bruce Ashfield</name>
<email>bruce.ashfield@gmail.com</email>
</author>
<published>2026-04-22T20:18:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/meta-virtualization.git/commit/?id=2e0704ee9282e4e86c13180334cb7ce118e55dd9'/>
<id>urn:sha1:2e0704ee9282e4e86c13180334cb7ce118e55dd9</id>
<content type='text'>
Change VdkrRunner.run() and VpdmnRunner.run() to use Popen with
start_new_session=True, stdin=DEVNULL, and file-based stdout instead
of subprocess.run(capture_output=True). This prevents daemon background
processes from inheriting pipe FDs, which causes communicate() to hang
in CI/test harness environments (e.g., buildbot).

The fix applies to all commands, not just memres start, because any
vdkr command can auto-start the daemon (auto-daemon is enabled by
default).

Also fix test_volume_mount_requires_memres to check both stdout and
stderr for the error message, since stderr is now merged into stdout
by the Popen approach.

Signed-off-by: Bruce Ashfield &lt;bruce.ashfield@gmail.com&gt;
</content>
</entry>
<entry>
<title>tests: fix memres start hanging in subprocess.run</title>
<updated>2026-04-22T19:14:52+00:00</updated>
<author>
<name>Bruce Ashfield</name>
<email>bruce.ashfield@gmail.com</email>
</author>
<published>2026-04-22T19:14:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/meta-virtualization.git/commit/?id=b02e400b63849991c1590a3572e711740758583f'/>
<id>urn:sha1:b02e400b63849991c1590a3572e711740758583f</id>
<content type='text'>
memres start spawns background processes (QEMU VM, idle watchdog)
that persist after the vrunner script exits. When invoked via
subprocess.run(capture_output=True), these background processes
inherit the pipe file descriptors, preventing communicate() from
returning until all pipe holders exit — which can be 30+ minutes
(the idle timeout).

Fix by using Popen with:
- stdin=subprocess.DEVNULL (no inherited stdin pipe)
- file-based stdout (no pipe FDs to inherit)
- start_new_session=True (new process group, so wait() only
  waits for the parent script, not the background children)

This matches the behavior when running from a shell, where the
daemon processes are fully detached from the caller's FD table.

Applied to both VdkrRunner and VpdmnRunner memres_start methods.

Signed-off-by: Bruce Ashfield &lt;bruce.ashfield@gmail.com&gt;
</content>
</entry>
<entry>
<title>vruntime, vrunner, conftest: fix multiconfig and batch import issues</title>
<updated>2026-04-06T23:48:37+00:00</updated>
<author>
<name>Bruce Ashfield</name>
<email>bruce.ashfield@gmail.com</email>
</author>
<published>2026-04-05T02:10:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/meta-virtualization.git/commit/?id=4b0789cbb615c29ad7a0d072ab88b5fa81099605'/>
<id>urn:sha1:4b0789cbb615c29ad7a0d072ab88b5fa81099605</id>
<content type='text'>
vruntime.conf:
- Reset all VIRTUAL-RUNTIME_container_* variables to prevent
  CONTAINER_PROFILE selections from leaking into vruntime multiconfigs
  (e.g., podman profile pulling netavark into vruntime builds)
- Disable ptest for glib-2.0 — its -ptest RDEPENDS chain
  (python3-dbusmock -&gt; python3-pygobject -&gt; cairo -&gt; fontconfig)
  pulls the entire graphics stack which is masked in vruntime
- OE-core commit 159148f4de2 replaced DISTRO_FEATURES_BACKFILL_CONSIDERED
  with DISTRO_FEATURES_OPTED_OUT. The old variable no longer has any
  effect, which meant ptest, gobject-introspection-data, wayland, and
  other features were no longer being blocked in vruntime builds. This
  caused glib-2.0's ptest RDEPENDS to pull in the cairo → fontconfig →
  freetype graphics stack, which is masked by the vruntime BBMASK.
- Set PREFERRED_PROVIDER_virtual/runc with strong assignment to
  ensure the unified runc recipe is used

vrunner.sh:
- Fix batch import exit code handling: wrap import chain in subshell
  and make the images listing best-effort. The previous '&amp;&amp; podman
  images' caused false failures when podman images couldn't initialize
  its network backend. Using 'exit' was also wrong as the command runs
  inside PID 1 init's eval — exit kills init causing kernel panic.

vpdmn-rootfs-image.bb:
- Switch from netavark to CNI networking — netavark's dependency chain
  (nmap -&gt; libpcap -&gt; bluez5 -&gt; python3-pygobject -&gt; cairo) cannot be
  built under the vruntime BBMASK environment
- Add nsswitch.conf override (files-only backend) to prevent
  libnss_systemd segfaults — the vruntime VM uses busybox init with
  no systemd running, but libnss_systemd.so is pulled in as a
  dependency and segfaults on NSS resolution

vdkr-rootfs-image.bb:
- Document skopeo requirement for batch import

conftest.py:
- Add --k3s-timeout option and k3s/multinode markers for upcoming
  K3s test suite

Signed-off-by: Bruce Ashfield &lt;bruce.ashfield@gmail.com&gt;
</content>
</entry>
<entry>
<title>xen: add runtime boot tests for hypervisor, guest bundling, vxn and containerd</title>
<updated>2026-02-26T01:05:02+00:00</updated>
<author>
<name>Bruce Ashfield</name>
<email>bruce.ashfield@gmail.com</email>
</author>
<published>2026-02-24T16:53:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/meta-virtualization.git/commit/?id=efccccda627426319d4ced3b8c8467962a69e30c'/>
<id>urn:sha1:efccccda627426319d4ced3b8c8467962a69e30c</id>
<content type='text'>
New test_xen_runtime.py boots xen-image-minimal via runqemu and verifies:
- Xen hypervisor running (xl list, dmesg, Dom0 memory cap)
- Bundled guest autostart (alpine visible in xl list)
- vxn standalone (vxn run --rm alpine echo hello)
- containerd/vctr integration (ctr pull + vctr run)

Uses pexpect-based XenRunner with module-scoped fixture (boot once,
run all tests). TERM=dumb set after login to suppress terminal UI
from ctr/vxn progress bars. Free memory check skips vxn/vctr tests
gracefully when insufficient Xen memory available.

Also registers 'boot' marker in conftest.py and documents build
prerequisites, test options and skip behavior in README.md.

Signed-off-by: Bruce Ashfield &lt;bruce.ashfield@gmail.com&gt;
</content>
</entry>
<entry>
<title>container-registry: add tests and documentation for secure registry</title>
<updated>2026-02-09T03:34:12+00:00</updated>
<author>
<name>Bruce Ashfield</name>
<email>bruce.ashfield@gmail.com</email>
</author>
<published>2026-02-09T03:19:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/meta-virtualization.git/commit/?id=ff406688aef6eb0e89cfcb6698734a7e9e1e001c'/>
<id>urn:sha1:ff406688aef6eb0e89cfcb6698734a7e9e1e001c</id>
<content type='text'>
Add comprehensive test coverage and documentation for the secure
registry infrastructure.

Tests added:
  TestRegistryAuthentication - auth modes (none, home, authfile,
    credsfile, env, creds, token) for push and import
  TestSecureRegistryTLSOnly - TLS-only mode using running registry
  TestSecureRegistryWithAuth - isolated TLS+auth instance on port 5001
  TestDockerRegistryConfig - static analysis of bbclass/recipe logic
  TestContainerCrossInstallSecure - auto IMAGE_INSTALL verification
  TestVcontainerSecureRegistry - script pattern verification for
    virtio-9p CA transport, daemon _9p=1, shared folder reads

README.md: Document authentication modes (none, home, authfile,
credsfile, env), secure registry setup, PKI generation, target
integration, and CI/CD examples.

conftest.py: Add --secure-registry pytest option and skip_secure
fixture for tests requiring openssl/htpasswd.

Signed-off-by: Bruce Ashfield &lt;bruce.ashfield@gmail.com&gt;
</content>
</entry>
<entry>
<title>vcontainer: add multi-arch OCI support</title>
<updated>2026-02-09T03:32:52+00:00</updated>
<author>
<name>Bruce Ashfield</name>
<email>bruce.ashfield@gmail.com</email>
</author>
<published>2026-01-15T21:50:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/meta-virtualization.git/commit/?id=25acb056c37b85fc76961cf8b477f006455b11d3'/>
<id>urn:sha1:25acb056c37b85fc76961cf8b477f006455b11d3</id>
<content type='text'>
Add functions to detect and handle multi-architecture OCI Image Index
format with automatic platform selection during import. Also add
oci-multiarch.bbclass for build-time multi-arch OCI creation.

Runtime support (vcontainer-common.sh):
- is_oci_image_index() - detect multi-arch OCI images
- get_oci_platforms() - list available platforms
- select_platform_manifest() - select manifest for target architecture
- extract_platform_oci() - extract single platform to new OCI dir
- normalize_arch_to_oci/from_oci() - architecture name mapping
- Update vimport to auto-select platform from multi-arch images

Build-time support (oci-multiarch.bbclass):
- Create OCI Image Index from multiconfig builds
- Collect images from vruntime-aarch64, vruntime-x86-64
- Combine blobs and create unified manifest list

Signed-off-by: Bruce Ashfield &lt;bruce.ashfield@gmail.com&gt;
</content>
</entry>
<entry>
<title>tests: add container registry pytest tests</title>
<updated>2026-02-09T03:32:52+00:00</updated>
<author>
<name>Bruce Ashfield</name>
<email>bruce.ashfield@gmail.com</email>
</author>
<published>2026-01-12T16:14:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/meta-virtualization.git/commit/?id=45a4f2aa1a69bbf2f084d8d56a4c2812aea26b51'/>
<id>urn:sha1:45a4f2aa1a69bbf2f084d8d56a4c2812aea26b51</id>
<content type='text'>
Add pytest tests for registry functionality:
- test_vdkr_registry.py: vconfig registry, image commands, CLI override
- test_container_registry_script.py: start/stop/push/import/list/tags
- conftest.py: --registry-url, --registry-script options

Signed-off-by: Bruce Ashfield &lt;bruce.ashfield@gmail.com&gt;
</content>
</entry>
<entry>
<title>tests: add --network=host backward compatibility test</title>
<updated>2026-02-09T03:32:52+00:00</updated>
<author>
<name>Bruce Ashfield</name>
<email>bruce.ashfield@gmail.com</email>
</author>
<published>2026-01-08T19:36:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/meta-virtualization.git/commit/?id=cfd997d1c2366a4e61c39846d4d83715824302dd'/>
<id>urn:sha1:cfd997d1c2366a4e61c39846d4d83715824302dd</id>
<content type='text'>
Add test_network_host_backward_compat to verify that explicit --network=host
still works with the new bridge networking default. Uses busybox httpd with
configurable port since static port forwards now map host_port -&gt; host_port
on VM (for bridge networking's Docker -p handling).

Also update test docstrings to reflect bridge networking as the new default
and add port 8082 to TEST_PORTS for orphan cleanup.

Signed-off-by: Bruce Ashfield &lt;bruce.ashfield@gmail.com&gt;
</content>
</entry>
<entry>
<title>tests: add cleanup for orphan QEMU and stale test state</title>
<updated>2026-02-09T03:32:52+00:00</updated>
<author>
<name>Bruce Ashfield</name>
<email>bruce.ashfield@gmail.com</email>
</author>
<published>2026-01-08T18:03:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/meta-virtualization.git/commit/?id=dd13b2b6df049df622838aa3e5303ddbe1446fde'/>
<id>urn:sha1:dd13b2b6df049df622838aa3e5303ddbe1446fde</id>
<content type='text'>
Add session-scoped autouse fixture that at session start:
1. Kills any QEMU processes holding ports used by tests (8080, 8081,
   8888, etc.) - handles orphans from manual testing or crashed runs
2. Cleans up corrupt test state directories (docker-state.img with
   "needs journal recovery") to ensure tests start fresh

This ensures tests don't fail due to leftover state from previous
runs or manual testing.

Signed-off-by: Bruce Ashfield &lt;bruce.ashfield@gmail.com&gt;
</content>
</entry>
<entry>
<title>tests: add tests for auto-start and dynamic port forwarding</title>
<updated>2026-02-09T03:32:52+00:00</updated>
<author>
<name>Bruce Ashfield</name>
<email>bruce.ashfield@gmail.com</email>
</author>
<published>2026-01-08T04:56:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/meta-virtualization.git/commit/?id=3f0745b4e3c0d2dbfb6a0c0e21467a5853c6a9e7'/>
<id>urn:sha1:3f0745b4e3c0d2dbfb6a0c0e21467a5853c6a9e7</id>
<content type='text'>
Add test coverage for new vmemres features:

TestAutoStartDaemon:
- test_auto_start_on_first_command: Verify daemon auto-starts
- test_no_daemon_flag: Verify --no-daemon uses ephemeral mode
- test_vconfig_auto_daemon: Test auto-daemon config setting
- test_vconfig_idle_timeout: Test idle-timeout config setting

TestDynamicPortForwarding:
- test_dynamic_port_forward_run: Run -d -p adds forward dynamically
- test_port_forward_cleanup_on_stop: Forwards removed on stop
- test_port_forward_cleanup_on_rm: Forwards removed on rm
- test_multiple_dynamic_port_forwards: Multiple containers work

TestPortForwardRegistry:
- test_port_forward_cleared_on_memres_stop: Registry cleared

Also add ensure_busybox() helper to both VdkrRunner and VpdmnRunner.

Signed-off-by: Bruce Ashfield &lt;bruce.ashfield@gmail.com&gt;
</content>
</entry>
</feed>
