These test check all kvm CPU features that could be passed to the -cpu
option by libvirt.
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
...ed.args => eoi-disabled.x86_64-2.7.0.args} | 12 ++++---
.../eoi-disabled.x86_64-latest.args | 33 +++++++++++++++++++
...led.args => eoi-enabled.x86_64-2.7.0.args} | 12 ++++---
.../eoi-enabled.x86_64-latest.args | 33 +++++++++++++++++++
...> kvmclock+eoi-disabled.x86_64-2.7.0.args} | 12 ++++---
.../kvmclock+eoi-disabled.x86_64-latest.args | 33 +++++++++++++++++++
...=> pv-spinlock-disabled.x86_64-2.7.0.args} | 12 ++++---
.../pv-spinlock-disabled.x86_64-latest.args | 33 +++++++++++++++++++
... => pv-spinlock-enabled.x86_64-2.7.0.args} | 12 ++++---
.../pv-spinlock-enabled.x86_64-latest.args | 33 +++++++++++++++++++
tests/qemuxml2argvtest.c | 15 ++++++---
11 files changed, 215 insertions(+), 25 deletions(-)
rename tests/qemuxml2argvdata/{eoi-disabled.args => eoi-disabled.x86_64-2.7.0.args}
(65%)
create mode 100644 tests/qemuxml2argvdata/eoi-disabled.x86_64-latest.args
rename tests/qemuxml2argvdata/{eoi-enabled.args => eoi-enabled.x86_64-2.7.0.args}
(65%)
create mode 100644 tests/qemuxml2argvdata/eoi-enabled.x86_64-latest.args
rename tests/qemuxml2argvdata/{kvmclock+eoi-disabled.args =>
kvmclock+eoi-disabled.x86_64-2.7.0.args} (66%)
create mode 100644 tests/qemuxml2argvdata/kvmclock+eoi-disabled.x86_64-latest.args
rename tests/qemuxml2argvdata/{pv-spinlock-disabled.args =>
pv-spinlock-disabled.x86_64-2.7.0.args} (66%)
create mode 100644 tests/qemuxml2argvdata/pv-spinlock-disabled.x86_64-latest.args
rename tests/qemuxml2argvdata/{pv-spinlock-enabled.args =>
pv-spinlock-enabled.x86_64-2.7.0.args} (66%)
create mode 100644 tests/qemuxml2argvdata/pv-spinlock-enabled.x86_64-latest.args
diff --git a/tests/qemuxml2argvdata/eoi-disabled.args
b/tests/qemuxml2argvdata/eoi-disabled.x86_64-2.7.0.args
similarity index 65%
rename from tests/qemuxml2argvdata/eoi-disabled.args
rename to tests/qemuxml2argvdata/eoi-disabled.x86_64-2.7.0.args
index 57fad2b666..5596739288 100644
--- a/tests/qemuxml2argvdata/eoi-disabled.args
+++ b/tests/qemuxml2argvdata/eoi-disabled.x86_64-2.7.0.args
@@ -8,9 +8,11 @@ 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-2.7,accel=tcg,usb=off,dump-guest-core=off \
-cpu qemu32,-kvm_pv_eoi \
-m 214 \
-realtime mlock=off \
@@ -24,5 +26,7 @@ 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 \
+-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/eoi-disabled.x86_64-latest.args
b/tests/qemuxml2argvdata/eoi-disabled.x86_64-latest.args
new file mode 100644
index 0000000000..e59d0ab29b
--- /dev/null
+++ b/tests/qemuxml2argvdata/eoi-disabled.x86_64-latest.args
@@ -0,0 +1,33 @@
+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,-kvm_pv_eoi \
+-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/eoi-enabled.args
b/tests/qemuxml2argvdata/eoi-enabled.x86_64-2.7.0.args
similarity index 65%
rename from tests/qemuxml2argvdata/eoi-enabled.args
rename to tests/qemuxml2argvdata/eoi-enabled.x86_64-2.7.0.args
index 04836db5fd..03b3d05582 100644
--- a/tests/qemuxml2argvdata/eoi-enabled.args
+++ b/tests/qemuxml2argvdata/eoi-enabled.x86_64-2.7.0.args
@@ -8,9 +8,11 @@ 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-2.7,accel=tcg,usb=off,dump-guest-core=off \
-cpu qemu32,+kvm_pv_eoi \
-m 214 \
-realtime mlock=off \
@@ -24,5 +26,7 @@ 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 \
+-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/eoi-enabled.x86_64-latest.args
b/tests/qemuxml2argvdata/eoi-enabled.x86_64-latest.args
new file mode 100644
index 0000000000..fed8deb688
--- /dev/null
+++ b/tests/qemuxml2argvdata/eoi-enabled.x86_64-latest.args
@@ -0,0 +1,33 @@
+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,+kvm_pv_eoi \
+-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/kvmclock+eoi-disabled.args
b/tests/qemuxml2argvdata/kvmclock+eoi-disabled.x86_64-2.7.0.args
similarity index 66%
rename from tests/qemuxml2argvdata/kvmclock+eoi-disabled.args
rename to tests/qemuxml2argvdata/kvmclock+eoi-disabled.x86_64-2.7.0.args
index 5ef3f07f0e..1a566358c0 100644
--- a/tests/qemuxml2argvdata/kvmclock+eoi-disabled.args
+++ b/tests/qemuxml2argvdata/kvmclock+eoi-disabled.x86_64-2.7.0.args
@@ -8,9 +8,11 @@ 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-2.7,accel=tcg,usb=off,dump-guest-core=off \
-cpu qemu32,-kvmclock,-kvm_pv_eoi \
-m 214 \
-realtime mlock=off \
@@ -24,5 +26,7 @@ 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 \
+-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/kvmclock+eoi-disabled.x86_64-latest.args
b/tests/qemuxml2argvdata/kvmclock+eoi-disabled.x86_64-latest.args
new file mode 100644
index 0000000000..c1c6e2b621
--- /dev/null
+++ b/tests/qemuxml2argvdata/kvmclock+eoi-disabled.x86_64-latest.args
@@ -0,0 +1,33 @@
+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,-kvmclock,-kvm_pv_eoi \
+-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/pv-spinlock-disabled.args
b/tests/qemuxml2argvdata/pv-spinlock-disabled.x86_64-2.7.0.args
similarity index 66%
rename from tests/qemuxml2argvdata/pv-spinlock-disabled.args
rename to tests/qemuxml2argvdata/pv-spinlock-disabled.x86_64-2.7.0.args
index cda812d89c..5e8f4f62e4 100644
--- a/tests/qemuxml2argvdata/pv-spinlock-disabled.args
+++ b/tests/qemuxml2argvdata/pv-spinlock-disabled.x86_64-2.7.0.args
@@ -8,9 +8,11 @@ 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-2.7,accel=tcg,usb=off,dump-guest-core=off \
-cpu qemu32,-kvm_pv_unhalt \
-m 214 \
-realtime mlock=off \
@@ -24,5 +26,7 @@ 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 \
+-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/pv-spinlock-disabled.x86_64-latest.args
b/tests/qemuxml2argvdata/pv-spinlock-disabled.x86_64-latest.args
new file mode 100644
index 0000000000..52a36ca075
--- /dev/null
+++ b/tests/qemuxml2argvdata/pv-spinlock-disabled.x86_64-latest.args
@@ -0,0 +1,33 @@
+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,-kvm_pv_unhalt \
+-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/pv-spinlock-enabled.args
b/tests/qemuxml2argvdata/pv-spinlock-enabled.x86_64-2.7.0.args
similarity index 66%
rename from tests/qemuxml2argvdata/pv-spinlock-enabled.args
rename to tests/qemuxml2argvdata/pv-spinlock-enabled.x86_64-2.7.0.args
index 3f27b57bb7..79e097e554 100644
--- a/tests/qemuxml2argvdata/pv-spinlock-enabled.args
+++ b/tests/qemuxml2argvdata/pv-spinlock-enabled.x86_64-2.7.0.args
@@ -8,9 +8,11 @@ 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-2.7,accel=tcg,usb=off,dump-guest-core=off \
-cpu qemu32,+kvm_pv_unhalt \
-m 214 \
-realtime mlock=off \
@@ -24,5 +26,7 @@ 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 \
+-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/pv-spinlock-enabled.x86_64-latest.args
b/tests/qemuxml2argvdata/pv-spinlock-enabled.x86_64-latest.args
new file mode 100644
index 0000000000..4f1ab219af
--- /dev/null
+++ b/tests/qemuxml2argvdata/pv-spinlock-enabled.x86_64-latest.args
@@ -0,0 +1,33 @@
+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,+kvm_pv_unhalt \
+-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/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index 49220733ae..55267ddedc 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -873,11 +873,16 @@ mymain(void)
QEMU_CAPS_USB_HUB,
QEMU_CAPS_DEVICE_ISA_SERIAL,
QEMU_CAPS_DEVICE_CIRRUS_VGA);
- DO_TEST("eoi-disabled", NONE);
- DO_TEST("eoi-enabled", NONE);
- DO_TEST("pv-spinlock-disabled", NONE);
- DO_TEST("pv-spinlock-enabled", NONE);
- DO_TEST("kvmclock+eoi-disabled", NONE);
+ DO_TEST_CAPS_VER("eoi-disabled", "2.7.0");
+ DO_TEST_CAPS_LATEST("eoi-disabled");
+ DO_TEST_CAPS_VER("eoi-enabled", "2.7.0");
+ DO_TEST_CAPS_LATEST("eoi-enabled");
+ DO_TEST_CAPS_VER("pv-spinlock-disabled", "2.7.0");
+ DO_TEST_CAPS_LATEST("pv-spinlock-disabled");
+ DO_TEST_CAPS_VER("pv-spinlock-enabled", "2.7.0");
+ DO_TEST_CAPS_LATEST("pv-spinlock-enabled");
+ DO_TEST_CAPS_VER("kvmclock+eoi-disabled", "2.7.0");
+ DO_TEST_CAPS_LATEST("kvmclock+eoi-disabled");
DO_TEST("hyperv", NONE);
DO_TEST("hyperv-off", NONE);
--
2.22.0