diff options
| author | Bruce Ashfield <bruce.ashfield@gmail.com> | 2026-06-14 03:57:14 +0000 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2026-06-14 03:57:14 +0000 |
| commit | 3d242c4c38a2b7d056b3c4e2af1c43b0d02d02ec (patch) | |
| tree | a50b7d3bbb0970d9b2ac8fd2a05559556cd606a8 /recipes-devtools/python/python3-docker_4.3.1.bb | |
| parent | 8599dba96a5ac81bdac269e95e8498b84def98ce (diff) | |
| download | meta-virtualization-3d242c4c38a2b7d056b3c4e2af1c43b0d02d02ec.tar.gz | |
tests: add lxc runtime tests with download-template regressionmaster-next
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 <bruce.ashfield@gmail.com>
Diffstat (limited to 'recipes-devtools/python/python3-docker_4.3.1.bb')
0 files changed, 0 insertions, 0 deletions
