Signed-off-by: Nitesh Konkar <nitkon12(a)linux.vnet.ibm.com>
---
.../qemuxml2argv-memory-hotplug-dimm-alias.args | 35 ++++++++
.../qemuxml2argv-memory-hotplug-dimm-alias.xml | 94 ++++++++++++++++++++++
tests/qemuxml2argvtest.c | 2 +
3 files changed, 131 insertions(+)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-memory-hotplug-dimm-alias.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-memory-hotplug-dimm-alias.xml
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-memory-hotplug-dimm-alias.args
b/tests/qemuxml2argvdata/qemuxml2argv-memory-hotplug-dimm-alias.args
new file mode 100644
index 0000000..0e9f8e0
--- /dev/null
+++ b/tests/qemuxml2argvdata/qemuxml2argv-memory-hotplug-dimm-alias.args
@@ -0,0 +1,35 @@
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/home/usr/qemu/x86_64-softmmu/qemu-system-x86_64 \
+-name Fedora \
+-S \
+-M pc-i440fx-2.7 \
+-m size=1048576k,slots=32,maxmem=3145728k \
+-smp 8,maxcpus=160,sockets=40,cores=2,threads=2 \
+-numa node,nodeid=0,cpus=0-3,mem=512 \
+-numa node,nodeid=1,cpus=4-7,mem=512 \
+-object memory-backend-ram,id=memdimm2,size=134217728 \
+-device pc-dimm,node=0,memdev=memdimm2,id=dimm2,slot=2,addr=4563402752 \
+-object memory-backend-ram,id=memdimm4,size=134217728 \
+-device pc-dimm,node=0,memdev=memdimm4,id=dimm4,slot=4,addr=4966055936 \
+-object memory-backend-ram,id=memdimm0,size=134217728 \
+-device pc-dimm,node=0,memdev=memdimm0,id=dimm0,slot=0,addr=4294967296 \
+-object memory-backend-ram,id=memdimm1,size=134217728 \
+-device pc-dimm,node=0,memdev=memdimm1,id=dimm1,slot=1,addr=4429185024 \
+-object memory-backend-ram,id=memdimm3,size=134217728 \
+-device pc-dimm,node=0,memdev=memdimm3,id=dimm3,slot=3,addr=4697620480 \
+-uuid aecf3e5e-6f9a-42a3-9d6a-223a75569a66 \
+-nographic \
+-nodefaults \
+-monitor unix:/tmp/lib/domain--1-Fedora/monitor.sock,server,nowait \
+-boot c \
+-usb \
+-drive file=/home/nitesh/Fedora24.qcow2,format=qcow2,if=none,id=drive-ide0-0-0 \
+-device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 \
+-serial pty \
+-device usb-mouse,id=input0,bus=usb.0,port=1 \
+-vga cirrus \
+-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x6
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-memory-hotplug-dimm-alias.xml
b/tests/qemuxml2argvdata/qemuxml2argv-memory-hotplug-dimm-alias.xml
new file mode 100644
index 0000000..9c0625d
--- /dev/null
+++ b/tests/qemuxml2argvdata/qemuxml2argv-memory-hotplug-dimm-alias.xml
@@ -0,0 +1,94 @@
+<domain type='kvm'>
+ <name>Fedora</name>
+ <uuid>aecf3e5e-6f9a-42a3-9d6a-223a75569a66</uuid>
+ <maxMemory slots='32' unit='KiB'>3145728</maxMemory>
+ <memory unit='KiB'>1703936</memory>
+ <currentMemory unit='KiB'>1572864</currentMemory>
+ <vcpu placement='static' current='8'>160</vcpu>
+ <os>
+ <type arch='x86_64' machine='pc-i440fx-2.7'>hvm</type>
+ <boot dev='hd'/>
+ <bootmenu enable='yes'/>
+ </os>
+ <features>
+ <acpi/>
+ </features>
+ <cpu>
+ <topology sockets='40' cores='2' threads='2'/>
+ <numa>
+ <cell id='0' cpus='0-3' memory='524288'
unit='KiB'/>
+ <cell id='1' cpus='4-7' memory='524288'
unit='KiB'/>
+ </numa>
+ </cpu>
+ <clock offset='utc'/>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>destroy</on_crash>
+ <devices>
+ <emulator>/home/usr/qemu/x86_64-softmmu/qemu-system-x86_64</emulator>
+ <disk type='file' device='disk'>
+ <driver name='qemu' type='qcow2'/>
+ <source file='/home/nitesh/Fedora24.qcow2'/>
+ <target dev='hda' bus='ide'/>
+ <address type='drive' controller='0' bus='0'
target='0' unit='0'/>
+ </disk>
+ <controller type='pci' index='0' model='pci-root'/>
+ <controller type='ide' index='0'>
+ <address type='pci' domain='0x0000' bus='0x00'
slot='0x01' function='0x1'/>
+ </controller>
+ <serial type='pty'>
+ <target port='0'/>
+ </serial>
+ <console type='pty'>
+ <target type='serial' port='0'/>
+ </console>
+ <input type='mouse' bus='usb'>
+ <address type='usb' bus='0' port='1'/>
+ </input>
+ <input type='mouse' bus='ps2'/>
+ <input type='keyboard' bus='ps2'/>
+ <video>
+ <model type='cirrus' vram='16384' heads='1'
primary='yes'/>
+ <address type='pci' domain='0x0000' bus='0x00'
slot='0x02' function='0x0'/>
+ </video>
+ <memballoon model='virtio'>
+ <address type='pci' domain='0x0000' bus='0x00'
slot='0x06' function='0x0'/>
+ </memballoon>
+ <memory model='dimm'>
+ <target>
+ <size unit='KiB'>131072</size>
+ <node>0</node>
+ </target>
+ <address type='dimm' slot='2' base='0x110000000'/>
+ </memory>
+ <memory model='dimm'>
+ <target>
+ <size unit='KiB'>131072</size>
+ <node>0</node>
+ </target>
+ <address type='dimm' slot='4' base='0x128000000'/>
+ </memory>
+ <memory model='dimm'>
+ <target>
+ <size unit='KiB'>131072</size>
+ <node>0</node>
+ </target>
+ <address type='dimm' slot='0' base='0x100000000'/>
+ </memory>
+ <memory model='dimm'>
+ <target>
+ <size unit='KiB'>131072</size>
+ <node>0</node>
+ </target>
+ <address type='dimm' slot='1' base='0x108000000'/>
+ </memory>
+ <memory model='dimm'>
+ <target>
+ <size unit='KiB'>131072</size>
+ <node>0</node>
+ </target>
+ <address type='dimm' slot='3' base='0x118000000'/>
+ </memory>
+ </devices>
+ <seclabel type='none' model='none'/>
+</domain>
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index aaf00c2..a592c40 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -1992,6 +1992,8 @@ mymain(void)
QEMU_CAPS_OBJECT_MEMORY_FILE);
DO_TEST("memory-hotplug-ppc64-nonuma", QEMU_CAPS_KVM,
QEMU_CAPS_DEVICE_PC_DIMM, QEMU_CAPS_NUMA,
QEMU_CAPS_OBJECT_MEMORY_RAM, QEMU_CAPS_OBJECT_MEMORY_FILE);
+ DO_TEST("memory-hotplug-dimm-alias", QEMU_CAPS_KVM,
QEMU_CAPS_DEVICE_PC_DIMM, QEMU_CAPS_NUMA,
+ QEMU_CAPS_OBJECT_MEMORY_RAM, QEMU_CAPS_OBJECT_MEMORY_FILE);
DO_TEST("machine-aeskeywrap-on-caps",
QEMU_CAPS_MACHINE_OPT, QEMU_CAPS_AES_KEY_WRAP,
--
1.9.3