]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemuxmlconftest: Use real FD for iommufd object in tests
authorPeter Krempa <pkrempa@redhat.com>
Wed, 20 May 2026 08:46:58 +0000 (10:46 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 25 May 2026 11:28:59 +0000 (13:28 +0200)
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
tests/qemuxmlconfdata/iommufd-q35.x86_64-latest.args
tests/qemuxmlconfdata/iommufd-virt-pci-bus-single.aarch64-latest.args
tests/qemuxmlconfdata/iommufd-virt.aarch64-latest.args
tests/qemuxmlconfdata/iommufd.x86_64-latest.args
tests/qemuxmlconftest.c

index 22c811bfb75cb59f0be687896fa26efefdaa4b9a..52f705f21c13e8d11aedad6508dc9b83712e1d7a 100644 (file)
@@ -35,7 +35,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-q35-test/.config \
 -device '{"driver":"qxl-vga","id":"video0","max_outputs":1,"ram_size":67108864,"vram_size":33554432,"vram64_size_mb":0,"vgamem_mb":8,"bus":"pcie.0","addr":"0x1"}' \
 -global ICH9-LPC.noreboot=off \
 -watchdog-action reset \
--object '{"qom-type":"iommufd","id":"iommufd0","fd":"XXXXXXX"}' \
+-object '{"qom-type":"iommufd","id":"iommufd0","fd":"@iommufd-fd@"}' \
 -device '{"driver":"vfio-pci","id":"hostdev0","iommufd":"iommufd0","fd":"@hostdev-hostdev0-fd@","bus":"pcie.0","addr":"0x3"}' \
 -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
 -msg timestamp=on
index 9c04fb6523d4c07bb052a0110dcd6db50f8a12e6..9ab3b0f8f11bbb702c448f263896f7bef7aa138f 100644 (file)
@@ -26,7 +26,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-foo/.config \
 -no-shutdown \
 -boot strict=on \
 -audiodev '{"id":"audio1","driver":"none"}' \
--object '{"qom-type":"iommufd","id":"iommufd0","fd":"XXXXXXX"}' \
+-object '{"qom-type":"iommufd","id":"iommufd0","fd":"@iommufd-fd@"}' \
 -device '{"driver":"vfio-pci","id":"hostdev0","iommufd":"iommufd0","fd":"@hostdev-hostdev0-fd@","bus":"pcie.0","addr":"0x1"}' \
 -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
 -msg timestamp=on
index 659ac65eeedf5c7368ed87e5a6c0c2b765337e21..513c537041c64734f6da99e4eadbf121632f69c4 100644 (file)
@@ -29,7 +29,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-foo/.config \
 -device '{"driver":"pcie-root-port","port":9,"chassis":2,"id":"pci.2","bus":"pcie.0","addr":"0x1.0x1"}' \
 -device '{"driver":"pcie-root-port","port":10,"chassis":3,"id":"pci.3","bus":"pcie.0","addr":"0x1.0x2"}' \
 -audiodev '{"id":"audio1","driver":"none"}' \
--object '{"qom-type":"iommufd","id":"iommufd0","fd":"XXXXXXX"}' \
+-object '{"qom-type":"iommufd","id":"iommufd0","fd":"@iommufd-fd@"}' \
 -device '{"driver":"vfio-pci","id":"hostdev0","iommufd":"iommufd0","fd":"@hostdev-hostdev0-fd@","bus":"pci.1","addr":"0x0"}' \
 -device '{"driver":"vfio-pci","id":"hostdev1","iommufd":"iommufd0","fd":"@hostdev-hostdev1-fd@","bus":"pci.2","addr":"0x0"}' \
 -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
index e04b4e5836e2c21573baa16a13e81c7c007c2915..123f816e3d544108034342c84923180dec81e4e8 100644 (file)
@@ -28,7 +28,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-foo/.config \
 -boot strict=on \
 -device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \
 -audiodev '{"id":"audio1","driver":"none"}' \
--object '{"qom-type":"iommufd","id":"iommufd0","fd":"XXXXXXX"}' \
+-object '{"qom-type":"iommufd","id":"iommufd0","fd":"@iommufd-fd@"}' \
 -device '{"driver":"vfio-pci","id":"hostdev0","iommufd":"iommufd0","fd":"@hostdev-hostdev0-fd@","bus":"pci.0","addr":"0x3"}' \
 -device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x2"}' \
 -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
index e13347fe92cf36d9fb9cd7fb1ee2d8ca7f38f1f8..8e0f4bcb4fb6d1d40c3bc2dc20f21eafaa64ac7c 100644 (file)
@@ -110,7 +110,7 @@ testQemuPrepareHostdev(virDomainObj *vm)
     if (vm->def->iommufd_fdgroup) {
         ignore_value(qemuProcessGetPassedIommuFd(vm));
     } else if (virDomainDefHasPCIHostdevWithIOMMUFD(vm->def)) {
-        int iommufd = 0;
+        int iommufd = virTestMakeDummyFD(g_strdup("@iommufd-fd@"));
         priv->iommufd = qemuFDPassDirectNew("iommufd", &iommufd);
     }
 }