From 320042d01eddd06fdeeb7393bc3e9135194a9454 Mon Sep 17 00:00:00 2001 From: Vitaly Kuznetsov Date: Fri, 9 Aug 2019 16:31:38 +0200 Subject: [PATCH] tests: qemuxml2argv: switch to DO_TEST_CAPS for Hyper-V tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In particular, use DO_TEST_CAPS_LATEST which tests the canonical 'hv-feature' syntax instead of 'hv_feature' aliases and DO_TEST_CAPS_VER with 4.0.0 to also test the old syntax. Suggested-by: Ján Tomko Signed-off-by: Vitaly Kuznetsov Reviewed-by: Ján Tomko Signed-off-by: Ján Tomko --- .../hyperv-off.x86_64-4.0.0.args | 32 +++++++++++++++++ ...off.args => hyperv-off.x86_64-latest.args} | 17 ++++++---- .../hyperv-panic.x86_64-4.0.0.args | 32 +++++++++++++++++ ...c.args => hyperv-panic.x86_64-latest.args} | 15 +++++--- .../{hyperv.args => hyperv.x86_64-4.0.0.args} | 17 ++++++---- .../hyperv.x86_64-latest.args | 34 +++++++++++++++++++ tests/qemuxml2argvtest.c | 9 +++-- 7 files changed, 136 insertions(+), 20 deletions(-) create mode 100644 tests/qemuxml2argvdata/hyperv-off.x86_64-4.0.0.args rename tests/qemuxml2argvdata/{hyperv-off.args => hyperv-off.x86_64-latest.args} (56%) create mode 100644 tests/qemuxml2argvdata/hyperv-panic.x86_64-4.0.0.args rename tests/qemuxml2argvdata/{hyperv-panic.args => hyperv-panic.x86_64-latest.args} (60%) rename tests/qemuxml2argvdata/{hyperv.args => hyperv.x86_64-4.0.0.args} (61%) create mode 100644 tests/qemuxml2argvdata/hyperv.x86_64-latest.args diff --git a/tests/qemuxml2argvdata/hyperv-off.x86_64-4.0.0.args b/tests/qemuxml2argvdata/hyperv-off.x86_64-4.0.0.args new file mode 100644 index 0000000000..d99bfb4d4e --- /dev/null +++ b/tests/qemuxml2argvdata/hyperv-off.x86_64-4.0.0.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 \ +QEMU_AUDIO_DRV=none \ +/usr/bin/qemu-system-i686 \ +-name guest=QEMUGuest1,debug-threads=on \ +-S \ +-object secret,id=masterKey0,format=raw,\ +file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ +-machine pc-i440fx-4.0,accel=tcg,usb=off,dump-guest-core=off \ +-m 214 \ +-overcommit mem-lock=off \ +-smp 6,sockets=6,cores=1,threads=1 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,fd=1729,server,nowait \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-boot strict=on \ +-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \ +-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2 \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\ +resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/hyperv-off.args b/tests/qemuxml2argvdata/hyperv-off.x86_64-latest.args similarity index 56% rename from tests/qemuxml2argvdata/hyperv-off.args rename to tests/qemuxml2argvdata/hyperv-off.x86_64-latest.args index 59a79376d1..52f7473e14 100644 --- a/tests/qemuxml2argvdata/hyperv-off.args +++ b/tests/qemuxml2argvdata/hyperv-off.x86_64-latest.args @@ -8,20 +8,25 @@ 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-i686 \ --name QEMUGuest1 \ +-name guest=QEMUGuest1,debug-threads=on \ -S \ +-object secret,id=masterKey0,format=raw,\ +file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ -machine pc,accel=tcg,usb=off,dump-guest-core=off \ -m 214 \ --realtime mlock=off \ +-overcommit mem-lock=off \ -smp 6,sockets=6,cores=1,threads=1 \ -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ -display none \ -no-user-config \ -nodefaults \ --chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\ -server,nowait \ +-chardev socket,id=charmonitor,fd=1729,server,nowait \ -mon chardev=charmonitor,id=monitor,mode=control \ -rtc base=utc \ -no-shutdown \ --usb \ --device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 +-boot strict=on \ +-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \ +-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2 \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\ +resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/hyperv-panic.x86_64-4.0.0.args b/tests/qemuxml2argvdata/hyperv-panic.x86_64-4.0.0.args new file mode 100644 index 0000000000..5a16ac97ee --- /dev/null +++ b/tests/qemuxml2argvdata/hyperv-panic.x86_64-4.0.0.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 \ +QEMU_AUDIO_DRV=none \ +/usr/bin/qemu-system-i686 \ +-name guest=QEMUGuest1,debug-threads=on \ +-S \ +-object secret,id=masterKey0,format=raw,\ +file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ +-machine pc-i440fx-4.0,accel=tcg,usb=off,dump-guest-core=off \ +-cpu qemu32,hv-crash \ +-m 214 \ +-overcommit mem-lock=off \ +-smp 6,sockets=6,cores=1,threads=1 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,fd=1729,server,nowait \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-boot strict=on \ +-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\ +resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/hyperv-panic.args b/tests/qemuxml2argvdata/hyperv-panic.x86_64-latest.args similarity index 60% rename from tests/qemuxml2argvdata/hyperv-panic.args rename to tests/qemuxml2argvdata/hyperv-panic.x86_64-latest.args index 1ef5068aca..c92df8b79f 100644 --- a/tests/qemuxml2argvdata/hyperv-panic.args +++ b/tests/qemuxml2argvdata/hyperv-panic.x86_64-latest.args @@ -8,20 +8,25 @@ 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-i686 \ --name QEMUGuest1 \ +-name guest=QEMUGuest1,debug-threads=on \ -S \ +-object secret,id=masterKey0,format=raw,\ +file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ -machine pc,accel=tcg,usb=off,dump-guest-core=off \ -cpu qemu32,hv-crash \ -m 214 \ --realtime mlock=off \ +-overcommit mem-lock=off \ -smp 6,sockets=6,cores=1,threads=1 \ -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ -display none \ -no-user-config \ -nodefaults \ --chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\ -server,nowait \ +-chardev socket,id=charmonitor,fd=1729,server,nowait \ -mon chardev=charmonitor,id=monitor,mode=control \ -rtc base=utc \ -no-shutdown \ --usb +-boot strict=on \ +-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\ +resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/hyperv.args b/tests/qemuxml2argvdata/hyperv.x86_64-4.0.0.args similarity index 61% rename from tests/qemuxml2argvdata/hyperv.args rename to tests/qemuxml2argvdata/hyperv.x86_64-4.0.0.args index 086adaa349..7966cebdc1 100644 --- a/tests/qemuxml2argvdata/hyperv.args +++ b/tests/qemuxml2argvdata/hyperv.x86_64-4.0.0.args @@ -8,22 +8,27 @@ 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-i686 \ --name QEMUGuest1 \ +-name guest=QEMUGuest1,debug-threads=on \ -S \ --machine pc,accel=tcg,usb=off,dump-guest-core=off \ +-object secret,id=masterKey0,format=raw,\ +file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ +-machine pc-i440fx-4.0,accel=tcg,usb=off,dump-guest-core=off \ -cpu 'qemu32,hv_relaxed,hv_vapic,hv-spinlocks=0x2fff,hv_vpindex,hv_runtime,\ hv_synic,hv_stimer,hv_reset,hv-vendor-id=KVM Hv,hv_frequencies,\ hv_reenlightenment,hv_tlbflush,hv_ipi,hv_evmcs' \ -m 214 \ --realtime mlock=off \ +-overcommit mem-lock=off \ -smp 6,sockets=6,cores=1,threads=1 \ -uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ -display none \ -no-user-config \ -nodefaults \ --chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\ -server,nowait \ +-chardev socket,id=charmonitor,fd=1729,server,nowait \ -mon chardev=charmonitor,id=monitor,mode=control \ -rtc base=utc \ -no-shutdown \ --usb +-boot strict=on \ +-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\ +resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvdata/hyperv.x86_64-latest.args b/tests/qemuxml2argvdata/hyperv.x86_64-latest.args new file mode 100644 index 0000000000..33c70bb7e7 --- /dev/null +++ b/tests/qemuxml2argvdata/hyperv.x86_64-latest.args @@ -0,0 +1,34 @@ +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-i686 \ +-name guest=QEMUGuest1,debug-threads=on \ +-S \ +-object secret,id=masterKey0,format=raw,\ +file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ +-machine pc,accel=tcg,usb=off,dump-guest-core=off \ +-cpu 'qemu32,hv-relaxed,hv-vapic,hv-spinlocks=0x2fff,hv-vpindex,hv-runtime,\ +hv-synic,hv-stimer,hv-reset,hv-vendor-id=KVM Hv,hv-frequencies,\ +hv-reenlightenment,hv-tlbflush,hv-ipi,hv-evmcs' \ +-m 214 \ +-overcommit mem-lock=off \ +-smp 6,sockets=6,cores=1,threads=1 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=charmonitor,fd=1729,server,nowait \ +-mon chardev=charmonitor,id=monitor,mode=control \ +-rtc base=utc \ +-no-shutdown \ +-boot strict=on \ +-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \ +-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\ +resourcecontrol=deny \ +-msg timestamp=on diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 26b512d246..784316e816 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -911,9 +911,12 @@ mymain(void) DO_TEST_CAPS_VER("kvmclock+eoi-disabled", "4.0.0"); DO_TEST_CAPS_LATEST("kvmclock+eoi-disabled"); - DO_TEST("hyperv", NONE); - DO_TEST("hyperv-off", NONE); - DO_TEST("hyperv-panic", NONE); + DO_TEST_CAPS_VER("hyperv", "4.0.0"); + DO_TEST_CAPS_LATEST("hyperv"); + DO_TEST_CAPS_VER("hyperv-off", "4.0.0"); + DO_TEST_CAPS_LATEST("hyperv-off"); + DO_TEST_CAPS_VER("hyperv-panic", "4.0.0"); + DO_TEST_CAPS_LATEST("hyperv-panic"); DO_TEST("kvm-features", NONE); DO_TEST("kvm-features-off", NONE); -- GitLab