]> git.ipfire.org Git - thirdparty/systemd.git/commit
vmspawn: add integration test for multi-drive and ephemeral QMP setup
authorChristian Brauner <brauner@kernel.org>
Tue, 7 Apr 2026 19:40:40 +0000 (21:40 +0200)
committerChristian Brauner <brauner@kernel.org>
Wed, 15 Apr 2026 08:14:48 +0000 (10:14 +0200)
commitd73628e85deec6c58eb18e608f8969d685b282f7
treebaa48c20079ad70be0c04d8910d89b5e31976232
parentd32bc9cd07e61e852c624f228dda8669f540bf6d
vmspawn: add integration test for multi-drive and ephemeral QMP setup

Test the async QMP drive pipeline with real QEMU:

Test 1 (multi-drive): launches vmspawn with --image plus two
--extra-drive flags. This exercises multiple fdset allocations,
pipelined blockdev-add commands relying on FIFO ordering, io_uring
retry callbacks, and multiple device_add commands — all fired
without waiting for responses.

Test 2 (ephemeral): launches vmspawn with --image --ephemeral. This
exercises the most complex async path: blockdev-create fires a
background job, JOB_STATUS_CHANGE events are watched via the event
callback, and when the job concludes the deferred continuation fires
the overlay format node + device_add. If the continuation fails, the
root drive is never attached, the kernel panics, and vmspawn exits
without registering — so successful registration proves the pipeline
works.

Both tests use a raw ext4 image with a minimal init (sleep infinity)
and direct kernel boot. No virtiofsd needed.

Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
test/units/TEST-87-AUX-UTILS-VM.vmspawn-drives.sh [new file with mode: 0755]