]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemuxmlconftest: Stabilize 'vfio-pci' hostdev fds
authorPeter Krempa <pkrempa@redhat.com>
Wed, 20 May 2026 08:05:53 +0000 (10:05 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 25 May 2026 11:28:58 +0000 (13:28 +0200)
Prepare to use real FDs in tests.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
tests/qemuxmlconfdata/iommufd-q35-fd.x86_64-latest.args
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 f88e0197703df62181cbcded99173a4386f1a126..730855afe140514d17bc6fd6ed06d8038c5e1676 100644 (file)
@@ -36,6 +36,6 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-q35-test/.config \
 -global ICH9-LPC.noreboot=off \
 -watchdog-action reset \
 -object '{"qom-type":"iommufd","id":"iommufd0","fd":"XXXXXXX"}' \
--device '{"driver":"vfio-pci","id":"hostdev0","iommufd":"iommufd0","fd":"0","bus":"pcie.0","addr":"0x3"}' \
+-device '{"driver":"vfio-pci","id":"hostdev0","iommufd":"iommufd0","fd":"XXXXXXX","bus":"pcie.0","addr":"0x3"}' \
 -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
 -msg timestamp=on
index f88e0197703df62181cbcded99173a4386f1a126..730855afe140514d17bc6fd6ed06d8038c5e1676 100644 (file)
@@ -36,6 +36,6 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-q35-test/.config \
 -global ICH9-LPC.noreboot=off \
 -watchdog-action reset \
 -object '{"qom-type":"iommufd","id":"iommufd0","fd":"XXXXXXX"}' \
--device '{"driver":"vfio-pci","id":"hostdev0","iommufd":"iommufd0","fd":"0","bus":"pcie.0","addr":"0x3"}' \
+-device '{"driver":"vfio-pci","id":"hostdev0","iommufd":"iommufd0","fd":"XXXXXXX","bus":"pcie.0","addr":"0x3"}' \
 -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
 -msg timestamp=on
index 28d8a47c314bd3de541195f330fb01b1637d9f1c..e92b7b44fd31b55d5e895e9505413c2516ed612a 100644 (file)
@@ -27,6 +27,6 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-foo/.config \
 -boot strict=on \
 -audiodev '{"id":"audio1","driver":"none"}' \
 -object '{"qom-type":"iommufd","id":"iommufd0","fd":"XXXXXXX"}' \
--device '{"driver":"vfio-pci","id":"hostdev0","iommufd":"iommufd0","fd":"0","bus":"pcie.0","addr":"0x1"}' \
+-device '{"driver":"vfio-pci","id":"hostdev0","iommufd":"iommufd0","fd":"XXXXXXX","bus":"pcie.0","addr":"0x1"}' \
 -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
 -msg timestamp=on
index e910ccc76022471fe7606e0d613919591d57c24b..6719b771c4caae4b8b4cd44db3de112ab9e73c27 100644 (file)
@@ -30,7 +30,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-foo/.config \
 -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"}' \
--device '{"driver":"vfio-pci","id":"hostdev0","iommufd":"iommufd0","fd":"0","bus":"pci.1","addr":"0x0"}' \
--device '{"driver":"vfio-pci","id":"hostdev1","iommufd":"iommufd0","fd":"0","bus":"pci.2","addr":"0x0"}' \
+-device '{"driver":"vfio-pci","id":"hostdev0","iommufd":"iommufd0","fd":"XXXXXXX","bus":"pci.1","addr":"0x0"}' \
+-device '{"driver":"vfio-pci","id":"hostdev1","iommufd":"iommufd0","fd":"XXXXXXX","bus":"pci.2","addr":"0x0"}' \
 -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
 -msg timestamp=on
index f7e53ac3882fcb004d7dd123cebe5e1c797e3486..8ee6b976155521506897905ce43e2d0fb5b77fe0 100644 (file)
@@ -29,7 +29,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-foo/.config \
 -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"}' \
--device '{"driver":"vfio-pci","id":"hostdev0","iommufd":"iommufd0","fd":"0","bus":"pci.0","addr":"0x3"}' \
+-device '{"driver":"vfio-pci","id":"hostdev0","iommufd":"iommufd0","fd":"XXXXXXX","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 \
 -msg timestamp=on
index 0b0bcdea9284d01ab5be86f429fa8c62af6b103a..6ccafcde0e029e35784ee86cf4ab16fafa606d3b 100644 (file)
@@ -540,6 +540,8 @@ testCompareXMLToArgvStabilizeArgs(virCommand *cmd,
         } else if (STREQ(args[a], "-device")) {
             if (STRPREFIX(args[a + 1], "{\"driver\":\"vhost-vsock-")) {
                 testCompareXMLToArgvStabilizeOne(&args[a + 1], "vhostfd", fdsubsts, false);
+            } else if (STRPREFIX(args[a + 1], "{\"driver\":\"vfio-pci\"")) {
+                testCompareXMLToArgvStabilizeOne(&args[a + 1], "fd", fdsubsts, false);
             }
 
             a++;