From: Andrea Bolognani Date: Fri, 11 Jul 2025 13:39:01 +0000 (+0200) Subject: tests: Add coverage for PCI use with isapc and microvm X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=205e131f971a870c88398caee179edb71ba41c83;p=thirdparty%2Flibvirt.git tests: Add coverage for PCI use with isapc and microvm Neither machine type supports PCI, so attempting to add a PCI controller should fail. It currently doesn't, and we're going to address that in an upcoming commit. Note that the domain gets a PCI memballoon device added automatically. That also shouldn't happen, and will similarly be fixed. Signed-off-by: Andrea Bolognani Reviewed-by: Michal Privoznik Reviewed-by: Peter Krempa Reviewed-by: Ján Tomko --- diff --git a/tests/qemuxmlconfdata/isapc-pci.x86_64-latest.args b/tests/qemuxmlconfdata/isapc-pci.x86_64-latest.args new file mode 100644 index 0000000000..f1d443a0cc --- /dev/null +++ b/tests/qemuxmlconfdata/isapc-pci.x86_64-latest.args @@ -0,0 +1,32 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/var/lib/libvirt/qemu/domain--1-test \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-test/.local/share \ +XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-test/.cache \ +XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-test/.config \ +/usr/bin/qemu-system-x86_64 \ +-name guest=test,debug-threads=on \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-test/master-key.aes"}' \ +-machine isapc,usb=off,dump-guest-core=off,memory-backend=pc.ram,acpi=off \ +-accel tcg \ +-cpu 486 \ +-m size=2097152k \ +-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":2147483648}' \ +-overcommit mem-lock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid 11dbdcdd-4c3b-482b-8903-9bdb8c0a2774 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-boot strict=on \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x1"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxmlconfdata/isapc-pci.x86_64-latest.xml b/tests/qemuxmlconfdata/isapc-pci.x86_64-latest.xml new file mode 100644 index 0000000000..d4c04045dc --- /dev/null +++ b/tests/qemuxmlconfdata/isapc-pci.x86_64-latest.xml @@ -0,0 +1,28 @@ + + test + 11dbdcdd-4c3b-482b-8903-9bdb8c0a2774 + 2097152 + 2097152 + 1 + + hvm + + + + 486 + + + destroy + restart + destroy + + /usr/bin/qemu-system-x86_64 + + + +