From: Andrea Bolognani Date: Fri, 13 May 2022 14:00:09 +0000 (+0200) Subject: tests: Update smm=on test X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=dd3258da0951dea59a2979d165fdbf03d0a50b7f;p=libvirt.git tests: Update smm=on test Use DO_TEST_CAPS_LATEST() instead of hardcoding capabilities and add the xml2xml part, which was missing; finally, rename it to accomodate the complementary smm=off test that we're about to introduce. Signed-off-by: Andrea Bolognani Reviewed-by: Ján Tomko --- diff --git a/tests/qemuxml2argvdata/machine-smm-on.x86_64-latest.args b/tests/qemuxml2argvdata/machine-smm-on.x86_64-latest.args new file mode 100644 index 0000000000..6fde375523 --- /dev/null +++ b/tests/qemuxml2argvdata/machine-smm-on.x86_64-latest.args @@ -0,0 +1,32 @@ +LC_ALL=C \ +PATH=/bin \ +HOME=/tmp/lib/domain--1-QEMUGuest1 \ +USER=test \ +LOGNAME=test \ +XDG_DATA_HOME=/tmp/lib/domain--1-QEMUGuest1/.local/share \ +XDG_CACHE_HOME=/tmp/lib/domain--1-QEMUGuest1/.cache \ +XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ +/usr/bin/qemu-system-x86_64 \ +-name guest=QEMUGuest1,debug-threads=on \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-QEMUGuest1/master-key.aes"}' \ +-machine q35,usb=off,smm=on,dump-guest-core=off,memory-backend=pc.ram \ +-accel tcg \ +-cpu qemu64 \ +-m 214 \ +-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \ +-overcommit mem-lock=off \ +-smp 1,sockets=1,cores=1,threads=1 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-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 \ +-no-acpi \ +-boot strict=on \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/machine-smm-on.xml b/tests/qemuxml2argvdata/machine-smm-on.xml new file mode 100644 index 0000000000..e24608343a --- /dev/null +++ b/tests/qemuxml2argvdata/machine-smm-on.xml @@ -0,0 +1,17 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219100 + 1 + + hvm + + + + + + /usr/bin/qemu-system-x86_64 + + + + diff --git a/tests/qemuxml2argvdata/machine-smm-opt.args b/tests/qemuxml2argvdata/machine-smm-opt.args deleted file mode 100644 index 39fb447320..0000000000 --- a/tests/qemuxml2argvdata/machine-smm-opt.args +++ /dev/null @@ -1,36 +0,0 @@ -LC_ALL=C \ -PATH=/bin \ -HOME=/tmp/lib/domain--1-QEMUGuest1 \ -USER=test \ -LOGNAME=test \ -XDG_DATA_HOME=/tmp/lib/domain--1-QEMUGuest1/.local/share \ -XDG_CACHE_HOME=/tmp/lib/domain--1-QEMUGuest1/.cache \ -XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \ -QEMU_AUDIO_DRV=none \ -/usr/bin/qemu-system-x86_64 \ --name guest=QEMUGuest1,debug-threads=on \ --S \ --object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ --machine q35,usb=off,smm=on,dump-guest-core=off \ --accel tcg \ --m 214 \ --overcommit mem-lock=off \ --smp 1,sockets=1,cores=1,threads=1 \ --uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ --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 \ --no-acpi \ --boot strict=on \ --device i82801b11-bridge,id=pci.1,bus=pcie.0,addr=0x1e \ --device pci-bridge,chassis_nr=2,id=pci.2,bus=pci.1,addr=0x0 \ --device ioh3420,port=8,chassis=3,id=pci.3,bus=pcie.0,addr=0x1 \ --device virtio-scsi-pci,id=scsi0,bus=pci.2,addr=0x1 \ --drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-scsi0-0-0-0 \ --device scsi-hd,bus=scsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0-0-0-0,id=scsi0-0-0-0,bootindex=1 \ --device virtio-balloon-pci,id=balloon0,bus=pci.2,addr=0x2 \ --msg timestamp=on diff --git a/tests/qemuxml2argvdata/machine-smm-opt.xml b/tests/qemuxml2argvdata/machine-smm-opt.xml deleted file mode 100644 index 053bb5c25f..0000000000 --- a/tests/qemuxml2argvdata/machine-smm-opt.xml +++ /dev/null @@ -1,28 +0,0 @@ - - QEMUGuest1 - c7a5fdbd-edaf-9455-926a-d65c16db1809 - 219100 - 219100 - 1 - - hvm - - - - - - - destroy - restart - destroy - - /usr/bin/qemu-system-x86_64 - - - -
- - - - - diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 829550fbfe..c0c18ef1dc 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1061,12 +1061,7 @@ mymain(void) driver.config->dumpGuestCore = true; DO_TEST_NOCAPS("machine-core-off"); driver.config->dumpGuestCore = false; - DO_TEST("machine-smm-opt", - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, - QEMU_CAPS_DEVICE_PCI_BRIDGE, - QEMU_CAPS_DEVICE_IOH3420, - QEMU_CAPS_ICH9_AHCI, - QEMU_CAPS_VIRTIO_SCSI); + DO_TEST_CAPS_LATEST("machine-smm-on"); DO_TEST("machine-vmport-opt", QEMU_CAPS_MACHINE_VMPORT_OPT); DO_TEST_NOCAPS("default-kvm-host-arch"); diff --git a/tests/qemuxml2xmloutdata/machine-smm-on.x86_64-latest.xml b/tests/qemuxml2xmloutdata/machine-smm-on.x86_64-latest.xml new file mode 100644 index 0000000000..7c7df9e06d --- /dev/null +++ b/tests/qemuxml2xmloutdata/machine-smm-on.x86_64-latest.xml @@ -0,0 +1,33 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219100 + 219100 + 1 + + hvm + + + + + + + qemu64 + + + destroy + restart + destroy + + /usr/bin/qemu-system-x86_64 + + +
+ + + + +