So far, we are testing memory-hotplug-dimm-addr against a set of
explicitly listed capabilities. While this works, lets switch it
to DO_TEST_CAPS_LATEST() so that the latest capabilities are
used. This in turn means, we have to update the <emulator/>
because the latest capabilities don't contain caps for
qemu-system-i386.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
...mory-hotplug-dimm-addr.x86_64-latest.args} | 30 +++++++++++--------
.../memory-hotplug-dimm-addr.xml | 2 +-
tests/qemuxml2argvtest.c | 3 +-
3 files changed, 19 insertions(+), 16 deletions(-)
rename tests/qemuxml2argvdata/{memory-hotplug-dimm-addr.args =>
memory-hotplug-dimm-addr.x86_64-latest.args} (32%)
diff --git a/tests/qemuxml2argvdata/memory-hotplug-dimm-addr.args
b/tests/qemuxml2argvdata/memory-hotplug-dimm-addr.x86_64-latest.args
similarity index 32%
rename from tests/qemuxml2argvdata/memory-hotplug-dimm-addr.args
rename to tests/qemuxml2argvdata/memory-hotplug-dimm-addr.x86_64-latest.args
index 110b1a32b7..ac24c77a2b 100644
--- a/tests/qemuxml2argvdata/memory-hotplug-dimm-addr.args
+++ b/tests/qemuxml2argvdata/memory-hotplug-dimm-addr.x86_64-latest.args
@@ -6,17 +6,18 @@ 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-i386 \
+/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
\
+-object
'{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tmp/lib/domain--1-QEMUGuest1/master-key.aes"}'
\
-machine pc,usb=off,dump-guest-core=off \
-accel tcg \
+-cpu qemu64 \
-m size=219136k,slots=16,maxmem=1099511627776k \
-overcommit mem-lock=off \
--smp 2,sockets=2,cores=1,threads=1 \
--numa node,nodeid=0,cpus=0-1,mem=214 \
+-smp 2,sockets=2,dies=1,cores=1,threads=1 \
+-object
'{"qom-type":"memory-backend-ram","id":"ram-node0","size":224395264}'
\
+-numa node,nodeid=0,cpus=0-1,memdev=ram-node0 \
-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
-display none \
-no-user-config \
@@ -27,12 +28,15 @@ QEMU_AUDIO_DRV=none \
-no-shutdown \
-no-acpi \
-boot strict=on \
--usb \
--object
memory-backend-file,id=memdimm0,mem-path=/dev/hugepages2M/libvirt/qemu/-1-QEMUGuest1,prealloc=on,size=536870912,host-nodes=1-3,policy=bind
\
--device pc-dimm,node=0,memdev=memdimm0,id=dimm0,slot=0,addr=4294967296 \
--object memory-backend-ram,id=memdimm2,size=536870912 \
--device pc-dimm,node=0,memdev=memdimm2,id=dimm2,slot=2 \
--drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \
--device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \
--device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2 \
+-device
'{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}'
\
+-object
'{"qom-type":"memory-backend-file","id":"memdimm0","mem-path":"/dev/hugepages2M/libvirt/qemu/-1-QEMUGuest1","prealloc":true,"size":536870912,"host-nodes":[1,2,3],"policy":"bind"}'
\
+-device
'{"driver":"pc-dimm","node":0,"memdev":"memdimm0","id":"dimm0","slot":0,"addr":4294967296}'
\
+-object
'{"qom-type":"memory-backend-ram","id":"memdimm2","size":536870912}'
\
+-device
'{"driver":"pc-dimm","node":0,"memdev":"memdimm2","id":"dimm2","slot":2}'
\
+-blockdev
'{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}'
\
+-blockdev
'{"node-name":"libvirt-1-format","read-only":false,"driver":"raw","file":"libvirt-1-storage"}'
\
+-device
'{"driver":"ide-hd","bus":"ide.0","unit":0,"drive":"libvirt-1-format","id":"ide0-0-0","bootindex":1}'
\
+-audiodev
'{"id":"audio1","driver":"none"}' \
+-device
'{"driver":"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/memory-hotplug-dimm-addr.xml
b/tests/qemuxml2argvdata/memory-hotplug-dimm-addr.xml
index ea4f4fd745..92ea679bbe 100644
--- a/tests/qemuxml2argvdata/memory-hotplug-dimm-addr.xml
+++ b/tests/qemuxml2argvdata/memory-hotplug-dimm-addr.xml
@@ -20,7 +20,7 @@
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
- <emulator>/usr/bin/qemu-system-i386</emulator>
+ <emulator>/usr/bin/qemu-system-x86_64</emulator>
<disk type='block' device='disk'>
<source dev='/dev/HostVG/QEMUGuest1'/>
<target dev='hda' bus='ide'/>
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index b72d61c3bc..d1a36f653c 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -3083,8 +3083,7 @@ mymain(void)
DO_TEST("memory-hotplug", QEMU_CAPS_DEVICE_PC_DIMM, QEMU_CAPS_NUMA);
DO_TEST("memory-hotplug-dimm", QEMU_CAPS_DEVICE_PC_DIMM, QEMU_CAPS_NUMA,
QEMU_CAPS_OBJECT_MEMORY_RAM, QEMU_CAPS_OBJECT_MEMORY_FILE);
- DO_TEST("memory-hotplug-dimm-addr", QEMU_CAPS_DEVICE_PC_DIMM,
QEMU_CAPS_NUMA,
- QEMU_CAPS_OBJECT_MEMORY_RAM, QEMU_CAPS_OBJECT_MEMORY_FILE);
+ DO_TEST_CAPS_LATEST("memory-hotplug-dimm-addr");
DO_TEST("memory-hotplug-ppc64-nonuma", QEMU_CAPS_KVM,
QEMU_CAPS_DEVICE_PC_DIMM, QEMU_CAPS_NUMA,
QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE,
QEMU_CAPS_OBJECT_MEMORY_RAM, QEMU_CAPS_OBJECT_MEMORY_FILE);
--
2.35.1