From a6ea77e0a5aaeecd2284a858a17f11179f8bfe50 Mon Sep 17 00:00:00 2001 From: Andrea Bolognani Date: Fri, 13 May 2022 16:05:26 +0200 Subject: [PATCH] tests: Introduce smm=off test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This complements the existing smm=on tests. Looking at the output files, one can immediately see how this case is currently not being handled correctly. We're going to fix that in the next commit. Signed-off-by: Andrea Bolognani Reviewed-by: Ján Tomko --- .../machine-smm-off.x86_64-latest.args | 32 +++++++++++++++++++ tests/qemuxml2argvdata/machine-smm-off.xml | 17 ++++++++++ tests/qemuxml2argvtest.c | 1 + .../machine-smm-off.x86_64-latest.xml | 30 +++++++++++++++++ tests/qemuxml2xmltest.c | 1 + 5 files changed, 81 insertions(+) create mode 100644 tests/qemuxml2argvdata/machine-smm-off.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/machine-smm-off.xml create mode 100644 tests/qemuxml2xmloutdata/machine-smm-off.x86_64-latest.xml diff --git a/tests/qemuxml2argvdata/machine-smm-off.x86_64-latest.args b/tests/qemuxml2argvdata/machine-smm-off.x86_64-latest.args new file mode 100644 index 0000000000..b5a685524e --- /dev/null +++ b/tests/qemuxml2argvdata/machine-smm-off.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,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-off.xml b/tests/qemuxml2argvdata/machine-smm-off.xml new file mode 100644 index 0000000000..c7857ec46a --- /dev/null +++ b/tests/qemuxml2argvdata/machine-smm-off.xml @@ -0,0 +1,17 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219100 + 1 + + hvm + + + + + + /usr/bin/qemu-system-x86_64 + + + + diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index c0c18ef1dc..7708e3ba3e 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1062,6 +1062,7 @@ mymain(void) DO_TEST_NOCAPS("machine-core-off"); driver.config->dumpGuestCore = false; DO_TEST_CAPS_LATEST("machine-smm-on"); + DO_TEST_CAPS_LATEST("machine-smm-off"); DO_TEST("machine-vmport-opt", QEMU_CAPS_MACHINE_VMPORT_OPT); DO_TEST_NOCAPS("default-kvm-host-arch"); diff --git a/tests/qemuxml2xmloutdata/machine-smm-off.x86_64-latest.xml b/tests/qemuxml2xmloutdata/machine-smm-off.x86_64-latest.xml new file mode 100644 index 0000000000..1d58c22892 --- /dev/null +++ b/tests/qemuxml2xmloutdata/machine-smm-off.x86_64-latest.xml @@ -0,0 +1,30 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219100 + 219100 + 1 + + hvm + + + + qemu64 + + + destroy + restart + destroy + + /usr/bin/qemu-system-x86_64 + + +
+ + + + +