diff options
| author | Bruce Ashfield <bruce.ashfield@gmail.com> | 2026-04-22 19:14:52 +0000 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2026-04-22 19:14:52 +0000 |
| commit | b02e400b63849991c1590a3572e711740758583f (patch) | |
| tree | 517eed03d0bb1f1d4b05039c6dcd9baef611f82f /recipes-containers/k3s | |
| parent | 5f512359af5d02c037f85887bf5a428af05d4fb3 (diff) | |
| download | meta-virtualization-b02e400b63849991c1590a3572e711740758583f.tar.gz | |
tests: fix memres start hanging in subprocess.run
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 <bruce.ashfield@gmail.com>
Diffstat (limited to 'recipes-containers/k3s')
0 files changed, 0 insertions, 0 deletions
