qemuhotplugtest: Move all XMLs to one directory

This makes the search for related XMLs easier, plus they are not used in
the xml2argv tests anyway.  This also makes future patches cleaner.
While on that remove unnecessary '-hotplug' from the filenames.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
Tomasz Flendrich 2016-07-08 00:52:41 +02:00 committed by Martin Kletzander
parent 1cbb8d4a5e
commit ec5dcf2a5d
19 changed files with 208 additions and 37 deletions

View File

@ -225,7 +225,7 @@ testQemuHotplug(const void *data)
qemuMonitorTestPtr test_mon = NULL; qemuMonitorTestPtr test_mon = NULL;
qemuDomainObjPrivatePtr priv = NULL; qemuDomainObjPrivatePtr priv = NULL;
if (virAsprintf(&domain_filename, "%s/qemuxml2argvdata/qemuxml2argv-%s.xml", if (virAsprintf(&domain_filename, "%s/qemuhotplugtestdata/qemuhotplug-%s.xml",
abs_srcdir, test->domain_filename) < 0 || abs_srcdir, test->domain_filename) < 0 ||
virAsprintf(&device_filename, "%s/qemuhotplugtestdata/qemuhotplug-%s.xml", virAsprintf(&device_filename, "%s/qemuhotplugtestdata/qemuhotplug-%s.xml",
abs_srcdir, test->device_filename) < 0 || abs_srcdir, test->device_filename) < 0 ||
@ -423,7 +423,7 @@ mymain(void)
DO_TEST_UPDATE("graphics-spice-timeout", "graphics-spice-timeout-password", false, false, DO_TEST_UPDATE("graphics-spice-timeout", "graphics-spice-timeout-password", false, false,
"set_password", QMP_OK, "expire_password", QMP_OK); "set_password", QMP_OK, "expire_password", QMP_OK);
DO_TEST_UPDATE("graphics-spice", "graphics-spice-listen", true, false, NULL); DO_TEST_UPDATE("graphics-spice", "graphics-spice-listen", true, false, NULL);
DO_TEST_UPDATE("graphics-spice-listen-network", "graphics-spice-listen-network", false, false, DO_TEST_UPDATE("graphics-spice-listen-network", "graphics-spice-listen-network-password", false, false,
"set_password", QMP_OK, "expire_password", QMP_OK); "set_password", QMP_OK, "expire_password", QMP_OK);
/* Strange huh? Currently, only graphics can be updated :-P */ /* Strange huh? Currently, only graphics can be updated :-P */
DO_TEST_UPDATE("disk-cdrom", "disk-cdrom-nochange", true, false, NULL); DO_TEST_UPDATE("disk-cdrom", "disk-cdrom-nochange", true, false, NULL);
@ -436,58 +436,58 @@ mymain(void)
"device_del", QMP_OK, "device_del", QMP_OK,
"chardev-remove", QMP_OK); "chardev-remove", QMP_OK);
DO_TEST_ATTACH("hotplug-base-live", "disk-virtio", false, true, DO_TEST_ATTACH("base-live", "disk-virtio", false, true,
"human-monitor-command", HMP("OK\\r\\n"), "human-monitor-command", HMP("OK\\r\\n"),
"device_add", QMP_OK); "device_add", QMP_OK);
DO_TEST_DETACH("hotplug-base-live", "disk-virtio", false, false, DO_TEST_DETACH("base-live", "disk-virtio", false, false,
"device_del", QMP_OK, "device_del", QMP_OK,
"human-monitor-command", HMP("")); "human-monitor-command", HMP(""));
DO_TEST_ATTACH_EVENT("hotplug-base-live", "disk-virtio", false, true, DO_TEST_ATTACH_EVENT("base-live", "disk-virtio", false, true,
"human-monitor-command", HMP("OK\\r\\n"), "human-monitor-command", HMP("OK\\r\\n"),
"device_add", QMP_OK); "device_add", QMP_OK);
DO_TEST_DETACH("hotplug-base-live", "disk-virtio", true, true, DO_TEST_DETACH("base-live", "disk-virtio", true, true,
"device_del", QMP_OK, "device_del", QMP_OK,
"human-monitor-command", HMP("")); "human-monitor-command", HMP(""));
DO_TEST_DETACH("hotplug-base-live", "disk-virtio", false, false, DO_TEST_DETACH("base-live", "disk-virtio", false, false,
"device_del", QMP_DEVICE_DELETED("virtio-disk4") QMP_OK, "device_del", QMP_DEVICE_DELETED("virtio-disk4") QMP_OK,
"human-monitor-command", HMP("")); "human-monitor-command", HMP(""));
DO_TEST_ATTACH("hotplug-base-live", "disk-usb", false, true, DO_TEST_ATTACH("base-live", "disk-usb", false, true,
"human-monitor-command", HMP("OK\\r\\n"), "human-monitor-command", HMP("OK\\r\\n"),
"device_add", QMP_OK); "device_add", QMP_OK);
DO_TEST_DETACH("hotplug-base-live", "disk-usb", false, false, DO_TEST_DETACH("base-live", "disk-usb", false, false,
"device_del", QMP_OK, "device_del", QMP_OK,
"human-monitor-command", HMP("")); "human-monitor-command", HMP(""));
DO_TEST_ATTACH_EVENT("hotplug-base-live", "disk-usb", false, true, DO_TEST_ATTACH_EVENT("base-live", "disk-usb", false, true,
"human-monitor-command", HMP("OK\\r\\n"), "human-monitor-command", HMP("OK\\r\\n"),
"device_add", QMP_OK); "device_add", QMP_OK);
DO_TEST_DETACH("hotplug-base-live", "disk-usb", true, true, DO_TEST_DETACH("base-live", "disk-usb", true, true,
"device_del", QMP_OK, "device_del", QMP_OK,
"human-monitor-command", HMP("")); "human-monitor-command", HMP(""));
DO_TEST_DETACH("hotplug-base-live", "disk-usb", false, false, DO_TEST_DETACH("base-live", "disk-usb", false, false,
"device_del", QMP_DEVICE_DELETED("usb-disk16") QMP_OK, "device_del", QMP_DEVICE_DELETED("usb-disk16") QMP_OK,
"human-monitor-command", HMP("")); "human-monitor-command", HMP(""));
DO_TEST_ATTACH("hotplug-base-live", "disk-scsi", false, true, DO_TEST_ATTACH("base-live", "disk-scsi", false, true,
"human-monitor-command", HMP("OK\\r\\n"), "human-monitor-command", HMP("OK\\r\\n"),
"device_add", QMP_OK); "device_add", QMP_OK);
DO_TEST_DETACH("hotplug-base-live", "disk-scsi", false, false, DO_TEST_DETACH("base-live", "disk-scsi", false, false,
"device_del", QMP_OK, "device_del", QMP_OK,
"human-monitor-command", HMP("")); "human-monitor-command", HMP(""));
DO_TEST_ATTACH_EVENT("hotplug-base-live", "disk-scsi", false, true, DO_TEST_ATTACH_EVENT("base-live", "disk-scsi", false, true,
"human-monitor-command", HMP("OK\\r\\n"), "human-monitor-command", HMP("OK\\r\\n"),
"device_add", QMP_OK); "device_add", QMP_OK);
DO_TEST_DETACH("hotplug-base-live", "disk-scsi", true, true, DO_TEST_DETACH("base-live", "disk-scsi", true, true,
"device_del", QMP_OK, "device_del", QMP_OK,
"human-monitor-command", HMP("")); "human-monitor-command", HMP(""));
DO_TEST_DETACH("hotplug-base-live", "disk-scsi", false, false, DO_TEST_DETACH("base-live", "disk-scsi", false, false,
"device_del", QMP_DEVICE_DELETED("scsi0-0-0-5") QMP_OK, "device_del", QMP_DEVICE_DELETED("scsi0-0-0-5") QMP_OK,
"human-monitor-command", HMP("")); "human-monitor-command", HMP(""));
DO_TEST_ATTACH("hotplug-base-without-scsi-controller-live", "disk-scsi-2", false, true, DO_TEST_ATTACH("base-without-scsi-controller-live", "disk-scsi-2", false, true,
/* Four controllers added */ /* Four controllers added */
"device_add", QMP_OK, "device_add", QMP_OK,
"device_add", QMP_OK, "device_add", QMP_OK,
@ -496,11 +496,11 @@ mymain(void)
"human-monitor-command", HMP("OK\\r\\n"), "human-monitor-command", HMP("OK\\r\\n"),
/* Disk added */ /* Disk added */
"device_add", QMP_OK); "device_add", QMP_OK);
DO_TEST_DETACH("hotplug-base-with-scsi-controller-live", "disk-scsi-2", false, false, DO_TEST_DETACH("base-with-scsi-controller-live", "disk-scsi-2", false, false,
"device_del", QMP_OK, "device_del", QMP_OK,
"human-monitor-command", HMP("")); "human-monitor-command", HMP(""));
DO_TEST_ATTACH_EVENT("hotplug-base-without-scsi-controller-live", "disk-scsi-2", false, true, DO_TEST_ATTACH_EVENT("base-without-scsi-controller-live", "disk-scsi-2", false, true,
/* Four controllers added */ /* Four controllers added */
"device_add", QMP_OK, "device_add", QMP_OK,
"device_add", QMP_OK, "device_add", QMP_OK,
@ -509,17 +509,17 @@ mymain(void)
"human-monitor-command", HMP("OK\\r\\n"), "human-monitor-command", HMP("OK\\r\\n"),
/* Disk added */ /* Disk added */
"device_add", QMP_OK); "device_add", QMP_OK);
DO_TEST_DETACH("hotplug-base-with-scsi-controller-live", "disk-scsi-2", true, true, DO_TEST_DETACH("base-with-scsi-controller-live", "disk-scsi-2", true, true,
"device_del", QMP_OK, "device_del", QMP_OK,
"human-monitor-command", HMP("")); "human-monitor-command", HMP(""));
DO_TEST_DETACH("hotplug-base-with-scsi-controller-live", "disk-scsi-2", false, false, DO_TEST_DETACH("base-with-scsi-controller-live", "disk-scsi-2", false, false,
"device_del", QMP_DEVICE_DELETED("scsi3-0-5-7") QMP_OK, "device_del", QMP_DEVICE_DELETED("scsi3-0-5-7") QMP_OK,
"human-monitor-command", HMP("")); "human-monitor-command", HMP(""));
DO_TEST_ATTACH("hotplug-base-live", "qemu-agent", false, true, DO_TEST_ATTACH("base-live", "qemu-agent", false, true,
"chardev-add", QMP_OK, "chardev-add", QMP_OK,
"device_add", QMP_OK); "device_add", QMP_OK);
DO_TEST_DETACH("hotplug-base-live", "qemu-agent-detach", false, false, DO_TEST_DETACH("base-live", "qemu-agent-detach", false, false,
"device_del", QMP_OK, "device_del", QMP_OK,
"chardev-remove", QMP_OK); "chardev-remove", QMP_OK);

View File

@ -0,0 +1,37 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
<memory unit='KiB'>219100</memory>
<currentMemory unit='KiB'>219100</currentMemory>
<vcpu placement='static'>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
<boot dev='hd'/>
</os>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/bin/qemu</emulator>
<disk type='block' device='disk'>
<driver name='qemu' type='raw'/>
<source dev='/dev/HostVG/QEMUGuest1'/>
<target dev='hda' bus='ide'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
<disk type='file' device='cdrom'>
<driver name='qemu' type='raw'/>
<source file='/root/boot.iso'/>
<target dev='hdc' bus='ide'/>
<readonly/>
<address type='drive' controller='0' bus='1' target='0' unit='0'/>
</disk>
<controller type='usb' index='0'/>
<controller type='ide' index='0'/>
<controller type='pci' index='0' model='pci-root'/>
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<memballoon model='none'/>
</devices>
</domain>

View File

@ -0,0 +1,11 @@
<graphics autoport='yes' connected='disconnect' keymap='en-us' passwd='password2' passwdValidTo='2013-06-20T01:34:37' port='5900' tlsPort='5901' type='spice'>
<listen address='10.65.210.231' network='vdsm-rhevm' type='network'/>
<channel mode='secure' name='main'/>
<channel mode='secure' name='display'/>
<channel mode='secure' name='inputs'/>
<channel mode='secure' name='cursor'/>
<channel mode='secure' name='playback'/>
<channel mode='secure' name='record'/>
<channel mode='secure' name='smartcard'/>
<channel mode='secure' name='usbredir'/>
</graphics>

View File

@ -1,4 +1,29 @@
<graphics autoport='yes' connected='disconnect' keymap='en-us' passwd='password2' passwdValidTo='2013-06-20T01:34:37' port='5900' tlsPort='5901' type='spice'> <domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
<memory unit='KiB'>219136</memory>
<currentMemory unit='KiB'>219136</currentMemory>
<vcpu placement='static'>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
<boot dev='hd'/>
</os>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/bin/qemu</emulator>
<disk type='block' device='disk'>
<source dev='/dev/HostVG/QEMUGuest1'/>
<target dev='hda' bus='ide'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
<controller type='usb' index='0'/>
<controller type='ide' index='0'/>
<controller type='pci' index='0' model='pci-root'/>
<input type='mouse' bus='ps2'/>
<graphics autoport='yes' connected='disconnect' keymap='en-us' passwd='password' passwdValidTo='2013-06-20T01:34:37' port='5900' tlsPort='5901' type='spice'>
<listen address='10.65.210.231' network='vdsm-rhevm' type='network'/> <listen address='10.65.210.231' network='vdsm-rhevm' type='network'/>
<channel mode='secure' name='main'/> <channel mode='secure' name='main'/>
<channel mode='secure' name='display'/> <channel mode='secure' name='display'/>
@ -9,3 +34,12 @@
<channel mode='secure' name='smartcard'/> <channel mode='secure' name='smartcard'/>
<channel mode='secure' name='usbredir'/> <channel mode='secure' name='usbredir'/>
</graphics> </graphics>
<video>
<model type='qxl' ram='65536' vram='18432' heads='1'/>
</video>
<video>
<model type='qxl' ram='65536' vram='32768' heads='1'/>
</video>
<memballoon model='virtio'/>
</devices>
</domain>

View File

@ -0,0 +1,87 @@
<domain type='kvm'>
<name>f14</name>
<uuid>553effab-b5e1-2d80-dfe3-da4344826c43</uuid>
<memory unit='KiB'>1048576</memory>
<currentMemory unit='KiB'>1048576</currentMemory>
<vcpu placement='static'>2</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
<boot dev='cdrom'/>
<boot dev='hd'/>
<bootmenu enable='yes'/>
</os>
<features>
<acpi/>
<apic/>
<pae/>
</features>
<cpu match='exact'>
<model>core2duo</model>
<vendor>Intel</vendor>
<topology sockets='1' cores='2' threads='1'/>
<feature policy='require' name='lahf_lm'/>
<feature policy='require' name='xtpr'/>
<feature policy='require' name='cx16'/>
<feature policy='require' name='tm2'/>
<feature policy='require' name='est'/>
<feature policy='require' name='vmx'/>
<feature policy='require' name='ds_cpl'/>
<feature policy='require' name='pbe'/>
<feature policy='require' name='tm'/>
<feature policy='require' name='ht'/>
<feature policy='require' name='ss'/>
<feature policy='require' name='acpi'/>
<feature policy='require' name='ds'/>
</cpu>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<devices>
<emulator>/usr/bin/qemu-kvm</emulator>
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2'/>
<source file='/var/lib/libvirt/images/f14.img'/>
<target dev='vda' bus='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
</disk>
<disk type='file' device='cdrom'>
<driver name='qemu' type='raw'/>
<source file='/var/lib/libvirt/Fedora-14-x86_64-Live-KDE.iso'/>
<target dev='hdc' bus='ide'/>
<readonly/>
<address type='drive' controller='0' bus='1' target='0' unit='0'/>
</disk>
<controller type='ide' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
</controller>
<controller type='virtio-serial' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
</controller>
<interface type='ethernet'>
<mac address='52:54:00:71:70:89'/>
<script path='/etc/qemu-ifup'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
</interface>
<serial type='pty'>
<target port='0'/>
</serial>
<console type='pty'>
<target type='serial' port='0'/>
</console>
<input type='tablet' bus='usb'/>
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<graphics type='spice' port='5900' autoport='no' passwd='sercet' passwdValidTo='2011-05-31T16:11:22' connected='disconnect'/>
<sound model='ac97'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</sound>
<video>
<model type='vga' vram='16384' heads='1'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
</video>
<memballoon model='virtio'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
</memballoon>
</devices>
</domain>

View File

@ -23,22 +23,24 @@
<controller type='ide' index='0'/> <controller type='ide' index='0'/>
<controller type='pci' index='0' model='pci-root'/> <controller type='pci' index='0' model='pci-root'/>
<input type='mouse' bus='ps2'/> <input type='mouse' bus='ps2'/>
<graphics autoport='yes' connected='disconnect' keymap='en-us' passwd='password' passwdValidTo='2013-06-20T01:34:37' port='5900' tlsPort='5901' type='spice'> <input type='keyboard' bus='ps2'/>
<listen address='10.65.210.231' network='vdsm-rhevm' type='network'/> <graphics type='spice' port='5903' tlsPort='5904' autoport='no' listen='127.0.0.1' defaultMode='secure'>
<channel mode='secure' name='main'/> <listen type='address' address='127.0.0.1'/>
<channel mode='secure' name='display'/> <channel name='main' mode='secure'/>
<channel mode='secure' name='inputs'/> <channel name='inputs' mode='insecure'/>
<channel mode='secure' name='cursor'/> <image compression='auto_glz'/>
<channel mode='secure' name='playback'/> <jpeg compression='auto'/>
<channel mode='secure' name='record'/> <zlib compression='auto'/>
<channel mode='secure' name='smartcard'/> <playback compression='on'/>
<channel mode='secure' name='usbredir'/> <streaming mode='filter'/>
<clipboard copypaste='no'/>
<filetransfer enable='no'/>
</graphics> </graphics>
<video> <video>
<model type='qxl' ram='65536' vram='18432' heads='1'/> <model type='qxl' ram='65536' vram='32768' vgamem='8192' heads='1'/>
</video> </video>
<video> <video>
<model type='qxl' ram='65536' vram='32768' heads='1'/> <model type='qxl' ram='65536' vram='32768' vgamem='8192' heads='1'/>
</video> </video>
<memballoon model='virtio'/> <memballoon model='virtio'/>
</devices> </devices>