]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemuxml2argvtest: Switch some tests to DO_TEST_CAPS_*
authorJiri Denemark <jdenemar@redhat.com>
Wed, 12 Jun 2019 10:08:06 +0000 (12:08 +0200)
committerJiri Denemark <jdenemar@redhat.com>
Wed, 19 Jun 2019 22:22:38 +0000 (00:22 +0200)
These test check all kvm CPU features that could be passed to the -cpu
option by libvirt.

The 2.7.0 version is the last one for which we use +|-feature syntax for
CPU features, while feature=on|off is used with newer versions. This
is visible in the following patch which changes only the *-latest.args
files.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
tests/qemuxml2argvdata/eoi-disabled.x86_64-2.7.0.args [moved from tests/qemuxml2argvdata/eoi-disabled.args with 65% similarity]
tests/qemuxml2argvdata/eoi-disabled.x86_64-latest.args [new file with mode: 0644]
tests/qemuxml2argvdata/eoi-enabled.x86_64-2.7.0.args [moved from tests/qemuxml2argvdata/eoi-enabled.args with 65% similarity]
tests/qemuxml2argvdata/eoi-enabled.x86_64-latest.args [new file with mode: 0644]
tests/qemuxml2argvdata/kvmclock+eoi-disabled.x86_64-2.7.0.args [moved from tests/qemuxml2argvdata/kvmclock+eoi-disabled.args with 66% similarity]
tests/qemuxml2argvdata/kvmclock+eoi-disabled.x86_64-latest.args [new file with mode: 0644]
tests/qemuxml2argvdata/pv-spinlock-disabled.x86_64-2.7.0.args [moved from tests/qemuxml2argvdata/pv-spinlock-disabled.args with 66% similarity]
tests/qemuxml2argvdata/pv-spinlock-disabled.x86_64-latest.args [new file with mode: 0644]
tests/qemuxml2argvdata/pv-spinlock-enabled.x86_64-2.7.0.args [moved from tests/qemuxml2argvdata/pv-spinlock-enabled.args with 66% similarity]
tests/qemuxml2argvdata/pv-spinlock-enabled.x86_64-latest.args [new file with mode: 0644]
tests/qemuxml2argvtest.c

similarity index 65%
rename from tests/qemuxml2argvdata/eoi-disabled.args
rename to tests/qemuxml2argvdata/eoi-disabled.x86_64-2.7.0.args
index 57fad2b66602f549a0d85f021c02f41e59f02746..5596739288a72a9558df8c8c20082d408fd82faf 100644 (file)
@@ -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 (file)
index 0000000..e59d0ab
--- /dev/null
@@ -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
similarity index 65%
rename from tests/qemuxml2argvdata/eoi-enabled.args
rename to tests/qemuxml2argvdata/eoi-enabled.x86_64-2.7.0.args
index 04836db5fdc2c8c782eb76480e70b008bbada024..03b3d0558234742601cc6f0aec5b0e328a498943 100644 (file)
@@ -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 (file)
index 0000000..fed8deb
--- /dev/null
@@ -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
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 5ef3f07f0e299002efbc8c0c582e0f65641f8882..1a566358c0df516dc7d93a9e2eff0bb1057d93f0 100644 (file)
@@ -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 (file)
index 0000000..c1c6e2b
--- /dev/null
@@ -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
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 cda812d89cb270a7463a96dc7fe1f1d7adce76bd..5e8f4f62e47bdf47ae86b029c015390bf4db50e3 100644 (file)
@@ -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 (file)
index 0000000..52a36ca
--- /dev/null
@@ -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
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 3f27b57bb75d8d54d097569b0f9f7ad28d78f75c..79e097e5542c5b6c90c415c01e96a6088bc83860 100644 (file)
@@ -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 (file)
index 0000000..4f1ab21
--- /dev/null
@@ -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
index 49220733aebaa481867cf885bb0d6566b1cb3082..55267ddedc62119df84de4edbe648bce85ee03d7 100644 (file)
@@ -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);