<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/meta-virtualization.git/tests/test_lxc_runtime.py, branch master-next</title>
<subtitle>Mirror of git.yoctoproject.org/meta-virtualization</subtitle>
<id>https://git.enea.com/cgit/linux/meta-virtualization.git/atom?h=master-next</id>
<link rel='self' href='https://git.enea.com/cgit/linux/meta-virtualization.git/atom?h=master-next'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/meta-virtualization.git/'/>
<updated>2026-06-14T03:57:14+00:00</updated>
<entry>
<title>tests: add lxc runtime tests with download-template regression</title>
<updated>2026-06-14T03:57:14+00:00</updated>
<author>
<name>Bruce Ashfield</name>
<email>bruce.ashfield@gmail.com</email>
</author>
<published>2026-06-14T03:57:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/meta-virtualization.git/commit/?id=3d242c4c38a2b7d056b3c4e2af1c43b0d02d02ec'/>
<id>urn:sha1:3d242c4c38a2b7d056b3c4e2af1c43b0d02d02ec</id>
<content type='text'>
The "lxc was tested" claim during the recent runtime testing sweep was
actually transitive — incus runs against LXC libraries under the hood,
so incus passing was treated as evidence that LXC itself worked. That
inference was wrong: incus uses its own go bindings into liblxc rather
than the lxc-* command-line tools, and the breakage Ferry Toth reported
on 2026-06-13 sat entirely in templates/lxc-download.in (a script
invoked by lxc-create, never reached through incus). The bug would not
have been caught by any existing test in the layer.

Add tests/test_lxc_runtime.py to close the gap. The suite boots
container-image-host with CONTAINER_IMAGE_HOST_EXTRA_INSTALL=lxc, then
runs three groups of checks against the live guest:

  TestLxcInstalled — sanity that lxc-create, lxc-start and lxc --version
    work at all. Catches packaging and PATH-level regressions.

  TestLxcDownloadTemplate — explicit regression for the
    templates-actually-create-DOWNLOAD_TEMP-directory.patch failure
    mode. Runs `lxc-create --template download` and asserts the broken
    early-mktemp error string ("mktemp: failed to create file via
    template '-d…") does not appear in the output. We deliberately do
    not require the download itself to succeed — the bug fires before
    any HTTP request, so the test stays meaningful on air-gapped CI
    where the actual fetch would fail for unrelated reasons.

  TestLxcContainerLifecycle (@pytest.mark.network) — full end-to-end:
    create from images.linuxcontainers.org, start, attach, stop,
    destroy. Marked @network so offline runners deselect it cleanly.
    The regression test above is the primary guard; this is depth.

Also register the lxc marker in pytest.ini so collection doesn't warn.

The test conventions (pexpect-driven runqemu boot, marker-delimited
command runner, TERM=dumb to suppress shell integration escape
sequences) match test_incus_runtime.py and test_xen_runtime.py so the
three suites read consistently.

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