* [PATCH 0/3] Improve reliability of vcontainer-tests
@ 2026-07-27 0:21 tim.orling
2026-07-27 0:21 ` [PATCH 1/3] vrunner: add /sbin,/usr/sbin to PATH tim.orling
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: tim.orling @ 2026-07-27 0:21 UTC (permalink / raw)
To: meta-virtualization
From: Tim Orling <tim.orling@konsulko.com>
Running the tests locally highlighted some issues -- including
timing issues -- with additional timing sensitivity highlighted
on the Yocto Project autobuilder [1].
The full test suite, without memres passed on local host Debian 13.6 (trixie):
pytest tests/test_vdkr.py -v \
--vdkr-dir /tmp/vcontainer \
--oci-image .../build/tmp/deploy/images/qemux86-64/app-container-curl-latest-oci
With these changes, the test suites pass on the Yocto Project
autobuilder [2].
[1] https://autobuilder.yoctoproject.org/valkyrie/#/builders/118/builds/6
[2] https://autobuilder.yoctoproject.org/valkyrie/#/builders/118/builds/7
The following changes since commit a4987f0af6f30883e1dcd52cec66311343241d6f:
grub-efi: Ensure changes only apply with the selected DISTRO_FEATURES (2026-07-21 12:41:02 +0000)
are available in the Git repository at:
https://github.com/moto-timo/meta-virtualization contrib/timo/vcontainer-tests
https://github.com/moto-timo/meta-virtualization/tree/contrib/timo/vcontainer-tests
for you to fetch changes up to 76663da09cf268817d875971c8fd11cf4820ed96:
tests/conftest.py: memrest_stop timeout=120 (2026-07-26 16:48:47 -0700)
----------------------------------------------------------------
Tim Orling (3):
vrunner: add /sbin,/usr/sbin to PATH
vrunner.sh: fix daemon_stop() shutdown reliability
tests/conftest.py: memrest_stop timeout=120
recipes-containers/vcontainer/files/vrunner.sh | 11 ++++++++++-
tests/conftest.py | 4 ++--
2 files changed, 12 insertions(+), 3 deletions(-)
--
2.47.3
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/3] vrunner: add /sbin,/usr/sbin to PATH
2026-07-27 0:21 [PATCH 0/3] Improve reliability of vcontainer-tests tim.orling
@ 2026-07-27 0:21 ` tim.orling
2026-07-27 0:21 ` [PATCH 2/3] vrunner.sh: fix daemon_stop() shutdown reliability tim.orling
2026-07-27 0:21 ` [PATCH 3/3] tests/conftest.py: memrest_stop timeout=120 tim.orling
2 siblings, 0 replies; 4+ messages in thread
From: tim.orling @ 2026-07-27 0:21 UTC (permalink / raw)
To: meta-virtualization
From: Tim Orling <tim.orling@konsulko.com>
mke2fs (state disk creation) and iptables (Xen backend port forwarding)
live in /sbin or /usr/sbin, which many non-root interactive shells (e.g.
Debian/Ubuntu) don't put on PATH. Under `set -e` a missing command here
kills the script silently (no output reaches the caller), so make sure
these are reachable regardless of the caller's PATH.
Signed-off-by: Tim Orling <tim.orling@konsulko.com>
---
recipes-containers/vcontainer/files/vrunner.sh | 1 +
1 file changed, 1 insertion(+)
diff --git a/recipes-containers/vcontainer/files/vrunner.sh b/recipes-containers/vcontainer/files/vrunner.sh
index a32a005d..3de48abf 100755
--- a/recipes-containers/vcontainer/files/vrunner.sh
+++ b/recipes-containers/vcontainer/files/vrunner.sh
@@ -28,6 +28,7 @@ set -e
VERSION="3.5.0"
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+PATH="$PATH:/sbin:/usr/sbin"
# Runtime selection: docker or podman
# This affects blob directory, cmdline prefix, state directory, and log prefix
--
2.47.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/3] vrunner.sh: fix daemon_stop() shutdown reliability
2026-07-27 0:21 [PATCH 0/3] Improve reliability of vcontainer-tests tim.orling
2026-07-27 0:21 ` [PATCH 1/3] vrunner: add /sbin,/usr/sbin to PATH tim.orling
@ 2026-07-27 0:21 ` tim.orling
2026-07-27 0:21 ` [PATCH 3/3] tests/conftest.py: memrest_stop timeout=120 tim.orling
2 siblings, 0 replies; 4+ messages in thread
From: tim.orling @ 2026-07-27 0:21 UTC (permalink / raw)
To: meta-virtualization
From: Tim Orling <tim.orling@konsulko.com>
Hold the connection open briefly after sending the kill command
so the guest's "===SHUTTING_DOWN===" ack has somewhere to land
(mirrors the ===PING===/===PONG=== handshake). A bare `echo | socat`
closes the connection the instant echo's stdin hits EOF; the
guest's write of its ack into that already-closed channel then
never returns, so it never reaches `break` and graceful_shutdown()
never runs -- every stop was silently burning the full 60s and
falling through to QMP quit / SIGKILL instead.
Signed-off-by: Tim Orling <tim.orling@konsulko.com>
---
recipes-containers/vcontainer/files/vrunner.sh | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/recipes-containers/vcontainer/files/vrunner.sh b/recipes-containers/vcontainer/files/vrunner.sh
index 3de48abf..7ce71a4e 100755
--- a/recipes-containers/vcontainer/files/vrunner.sh
+++ b/recipes-containers/vcontainer/files/vrunner.sh
@@ -669,7 +669,15 @@ daemon_stop() {
# Error: reading blob sha256:<hash>: file integrity checksum
# failed for "<file>"
if [ -S "$DAEMON_SOCKET" ]; then
- echo "===SHUTDOWN===" | socat - "UNIX-CONNECT:$DAEMON_SOCKET" 2>/dev/null || true
+ # Hold the connection open briefly after sending the command so the
+ # guest's "===SHUTTING_DOWN===" ack has somewhere to land (mirrors
+ # the ===PING===/===PONG=== handshake above). A bare `echo | socat`
+ # closes the connection the instant echo's stdin hits EOF; the
+ # guest's write of its ack into that already-closed channel then
+ # never returns, so it never reaches `break` and graceful_shutdown()
+ # never runs -- every stop was silently burning the full 60s poll
+ # below and falling through to QMP quit / SIGKILL instead.
+ { echo "===SHUTDOWN==="; sleep 3; } | timeout 10 socat - "UNIX-CONNECT:$DAEMON_SOCKET" 2>/dev/null || true
# Poll up to 60s (120 * 0.5s). Generous enough to cover heavy
# ext4 journal commits; short enough that a truly hung guest
# doesn't block the caller indefinitely.
--
2.47.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 3/3] tests/conftest.py: memrest_stop timeout=120
2026-07-27 0:21 [PATCH 0/3] Improve reliability of vcontainer-tests tim.orling
2026-07-27 0:21 ` [PATCH 1/3] vrunner: add /sbin,/usr/sbin to PATH tim.orling
2026-07-27 0:21 ` [PATCH 2/3] vrunner.sh: fix daemon_stop() shutdown reliability tim.orling
@ 2026-07-27 0:21 ` tim.orling
2 siblings, 0 replies; 4+ messages in thread
From: tim.orling @ 2026-07-27 0:21 UTC (permalink / raw)
To: meta-virtualization
From: Tim Orling <tim.orling@konsulko.com>
Match the documented daemon_stop() worst case already used
elsewhere in test_vcontainer_daemon_lifecycle.py.
Signed-off-by: Tim Orling <tim.orling@konsulko.com>
---
tests/conftest.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/conftest.py b/tests/conftest.py
index 6258611b..67718dcf 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -495,7 +495,7 @@ class VdkrRunner:
cmd, proc.returncode, stdout=output, stderr="")
return result
- def memres_stop(self, timeout=30):
+ def memres_stop(self, timeout=120):
"""Stop memory resident mode."""
return self.run("memres", "stop", timeout=timeout, check=False)
@@ -794,7 +794,7 @@ class VpdmnRunner:
cmd, proc.returncode, stdout=output, stderr="")
return result
- def memres_stop(self, timeout=30):
+ def memres_stop(self, timeout=120):
"""Stop memory resident mode."""
return self.run("memres", "stop", timeout=timeout, check=False)
--
2.47.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-07-27 0:21 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-27 0:21 [PATCH 0/3] Improve reliability of vcontainer-tests tim.orling
2026-07-27 0:21 ` [PATCH 1/3] vrunner: add /sbin,/usr/sbin to PATH tim.orling
2026-07-27 0:21 ` [PATCH 2/3] vrunner.sh: fix daemon_stop() shutdown reliability tim.orling
2026-07-27 0:21 ` [PATCH 3/3] tests/conftest.py: memrest_stop timeout=120 tim.orling
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.