From ec5dcf2a5ded33e17beadd3845c1266260ca9871 Mon Sep 17 00:00:00 2001 From: Tomasz Flendrich Date: Fri, 8 Jul 2016 00:52:41 +0200 Subject: [PATCH] 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 --- tests/qemuhotplugtest.c | 48 +++++----- ...=> qemuhotplug-base+qemu-agent-detach.xml} | 0 ...nt.xml => qemuhotplug-base+qemu-agent.xml} | 0 ...ml => qemuhotplug-base-live+disk-scsi.xml} | 0 ...xml => qemuhotplug-base-live+disk-usb.xml} | 0 ... => qemuhotplug-base-live+disk-virtio.xml} | 0 ...muhotplug-base-live+qemu-agent-detach.xml} | 0 ...l => qemuhotplug-base-live+qemu-agent.xml} | 0 .../qemuhotplug-base-live.xml} | 0 ...with-scsi-controller-live+disk-scsi-2.xml} | 0 ...otplug-base-with-scsi-controller-live.xml} | 0 ...hout-scsi-controller-live+disk-scsi-2.xml} | 0 ...lug-base-without-scsi-controller-live.xml} | 0 .../qemuhotplug-console-compat-2-live.xml} | 0 .../qemuhotplug-disk-cdrom.xml | 37 ++++++++ ...graphics-spice-listen-network-password.xml | 11 +++ ...uhotplug-graphics-spice-listen-network.xml | 36 +++++++- .../qemuhotplug-graphics-spice-timeout.xml | 87 +++++++++++++++++++ .../qemuhotplug-graphics-spice.xml} | 26 +++--- 19 files changed, 208 insertions(+), 37 deletions(-) rename tests/qemuhotplugtestdata/{qemuhotplug-hotplug-base+qemu-agent-detach.xml => qemuhotplug-base+qemu-agent-detach.xml} (100%) rename tests/qemuhotplugtestdata/{qemuhotplug-hotplug-base+qemu-agent.xml => qemuhotplug-base+qemu-agent.xml} (100%) rename tests/qemuhotplugtestdata/{qemuhotplug-hotplug-base-live+disk-scsi.xml => qemuhotplug-base-live+disk-scsi.xml} (100%) rename tests/qemuhotplugtestdata/{qemuhotplug-hotplug-base-live+disk-usb.xml => qemuhotplug-base-live+disk-usb.xml} (100%) rename tests/qemuhotplugtestdata/{qemuhotplug-hotplug-base-live+disk-virtio.xml => qemuhotplug-base-live+disk-virtio.xml} (100%) rename tests/qemuhotplugtestdata/{qemuhotplug-hotplug-base-live+qemu-agent-detach.xml => qemuhotplug-base-live+qemu-agent-detach.xml} (100%) rename tests/qemuhotplugtestdata/{qemuhotplug-hotplug-base-live+qemu-agent.xml => qemuhotplug-base-live+qemu-agent.xml} (100%) rename tests/{qemuxml2argvdata/qemuxml2argv-hotplug-base-live.xml => qemuhotplugtestdata/qemuhotplug-base-live.xml} (100%) rename tests/qemuhotplugtestdata/{qemuhotplug-hotplug-base-with-scsi-controller-live+disk-scsi-2.xml => qemuhotplug-base-with-scsi-controller-live+disk-scsi-2.xml} (100%) rename tests/{qemuxml2argvdata/qemuxml2argv-hotplug-base-with-scsi-controller-live.xml => qemuhotplugtestdata/qemuhotplug-base-with-scsi-controller-live.xml} (100%) rename tests/qemuhotplugtestdata/{qemuhotplug-hotplug-base-without-scsi-controller-live+disk-scsi-2.xml => qemuhotplug-base-without-scsi-controller-live+disk-scsi-2.xml} (100%) rename tests/{qemuxml2argvdata/qemuxml2argv-hotplug-base-without-scsi-controller-live.xml => qemuhotplugtestdata/qemuhotplug-base-without-scsi-controller-live.xml} (100%) rename tests/{qemuxml2argvdata/qemuxml2argv-console-compat-2-live.xml => qemuhotplugtestdata/qemuhotplug-console-compat-2-live.xml} (100%) create mode 100644 tests/qemuhotplugtestdata/qemuhotplug-disk-cdrom.xml create mode 100644 tests/qemuhotplugtestdata/qemuhotplug-graphics-spice-listen-network-password.xml create mode 100644 tests/qemuhotplugtestdata/qemuhotplug-graphics-spice-timeout.xml rename tests/{qemuxml2argvdata/qemuxml2argv-graphics-spice-listen-network.xml => qemuhotplugtestdata/qemuhotplug-graphics-spice.xml} (57%) diff --git a/tests/qemuhotplugtest.c b/tests/qemuhotplugtest.c index ae57c0af0e..369d27eb0d 100644 --- a/tests/qemuhotplugtest.c +++ b/tests/qemuhotplugtest.c @@ -225,7 +225,7 @@ testQemuHotplug(const void *data) qemuMonitorTestPtr test_mon = 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 || virAsprintf(&device_filename, "%s/qemuhotplugtestdata/qemuhotplug-%s.xml", abs_srcdir, test->device_filename) < 0 || @@ -423,7 +423,7 @@ mymain(void) DO_TEST_UPDATE("graphics-spice-timeout", "graphics-spice-timeout-password", false, false, "set_password", QMP_OK, "expire_password", QMP_OK); 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); /* Strange huh? Currently, only graphics can be updated :-P */ DO_TEST_UPDATE("disk-cdrom", "disk-cdrom-nochange", true, false, NULL); @@ -436,58 +436,58 @@ mymain(void) "device_del", 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"), "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, "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"), "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, "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, "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"), "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, "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"), "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, "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, "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"), "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, "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"), "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, "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, "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 */ "device_add", QMP_OK, "device_add", QMP_OK, @@ -496,11 +496,11 @@ mymain(void) "human-monitor-command", HMP("OK\\r\\n"), /* Disk added */ "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, "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 */ "device_add", QMP_OK, "device_add", QMP_OK, @@ -509,17 +509,17 @@ mymain(void) "human-monitor-command", HMP("OK\\r\\n"), /* Disk added */ "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, "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, "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, "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, "chardev-remove", QMP_OK); diff --git a/tests/qemuhotplugtestdata/qemuhotplug-hotplug-base+qemu-agent-detach.xml b/tests/qemuhotplugtestdata/qemuhotplug-base+qemu-agent-detach.xml similarity index 100% rename from tests/qemuhotplugtestdata/qemuhotplug-hotplug-base+qemu-agent-detach.xml rename to tests/qemuhotplugtestdata/qemuhotplug-base+qemu-agent-detach.xml diff --git a/tests/qemuhotplugtestdata/qemuhotplug-hotplug-base+qemu-agent.xml b/tests/qemuhotplugtestdata/qemuhotplug-base+qemu-agent.xml similarity index 100% rename from tests/qemuhotplugtestdata/qemuhotplug-hotplug-base+qemu-agent.xml rename to tests/qemuhotplugtestdata/qemuhotplug-base+qemu-agent.xml diff --git a/tests/qemuhotplugtestdata/qemuhotplug-hotplug-base-live+disk-scsi.xml b/tests/qemuhotplugtestdata/qemuhotplug-base-live+disk-scsi.xml similarity index 100% rename from tests/qemuhotplugtestdata/qemuhotplug-hotplug-base-live+disk-scsi.xml rename to tests/qemuhotplugtestdata/qemuhotplug-base-live+disk-scsi.xml diff --git a/tests/qemuhotplugtestdata/qemuhotplug-hotplug-base-live+disk-usb.xml b/tests/qemuhotplugtestdata/qemuhotplug-base-live+disk-usb.xml similarity index 100% rename from tests/qemuhotplugtestdata/qemuhotplug-hotplug-base-live+disk-usb.xml rename to tests/qemuhotplugtestdata/qemuhotplug-base-live+disk-usb.xml diff --git a/tests/qemuhotplugtestdata/qemuhotplug-hotplug-base-live+disk-virtio.xml b/tests/qemuhotplugtestdata/qemuhotplug-base-live+disk-virtio.xml similarity index 100% rename from tests/qemuhotplugtestdata/qemuhotplug-hotplug-base-live+disk-virtio.xml rename to tests/qemuhotplugtestdata/qemuhotplug-base-live+disk-virtio.xml diff --git a/tests/qemuhotplugtestdata/qemuhotplug-hotplug-base-live+qemu-agent-detach.xml b/tests/qemuhotplugtestdata/qemuhotplug-base-live+qemu-agent-detach.xml similarity index 100% rename from tests/qemuhotplugtestdata/qemuhotplug-hotplug-base-live+qemu-agent-detach.xml rename to tests/qemuhotplugtestdata/qemuhotplug-base-live+qemu-agent-detach.xml diff --git a/tests/qemuhotplugtestdata/qemuhotplug-hotplug-base-live+qemu-agent.xml b/tests/qemuhotplugtestdata/qemuhotplug-base-live+qemu-agent.xml similarity index 100% rename from tests/qemuhotplugtestdata/qemuhotplug-hotplug-base-live+qemu-agent.xml rename to tests/qemuhotplugtestdata/qemuhotplug-base-live+qemu-agent.xml diff --git a/tests/qemuxml2argvdata/qemuxml2argv-hotplug-base-live.xml b/tests/qemuhotplugtestdata/qemuhotplug-base-live.xml similarity index 100% rename from tests/qemuxml2argvdata/qemuxml2argv-hotplug-base-live.xml rename to tests/qemuhotplugtestdata/qemuhotplug-base-live.xml diff --git a/tests/qemuhotplugtestdata/qemuhotplug-hotplug-base-with-scsi-controller-live+disk-scsi-2.xml b/tests/qemuhotplugtestdata/qemuhotplug-base-with-scsi-controller-live+disk-scsi-2.xml similarity index 100% rename from tests/qemuhotplugtestdata/qemuhotplug-hotplug-base-with-scsi-controller-live+disk-scsi-2.xml rename to tests/qemuhotplugtestdata/qemuhotplug-base-with-scsi-controller-live+disk-scsi-2.xml diff --git a/tests/qemuxml2argvdata/qemuxml2argv-hotplug-base-with-scsi-controller-live.xml b/tests/qemuhotplugtestdata/qemuhotplug-base-with-scsi-controller-live.xml similarity index 100% rename from tests/qemuxml2argvdata/qemuxml2argv-hotplug-base-with-scsi-controller-live.xml rename to tests/qemuhotplugtestdata/qemuhotplug-base-with-scsi-controller-live.xml diff --git a/tests/qemuhotplugtestdata/qemuhotplug-hotplug-base-without-scsi-controller-live+disk-scsi-2.xml b/tests/qemuhotplugtestdata/qemuhotplug-base-without-scsi-controller-live+disk-scsi-2.xml similarity index 100% rename from tests/qemuhotplugtestdata/qemuhotplug-hotplug-base-without-scsi-controller-live+disk-scsi-2.xml rename to tests/qemuhotplugtestdata/qemuhotplug-base-without-scsi-controller-live+disk-scsi-2.xml diff --git a/tests/qemuxml2argvdata/qemuxml2argv-hotplug-base-without-scsi-controller-live.xml b/tests/qemuhotplugtestdata/qemuhotplug-base-without-scsi-controller-live.xml similarity index 100% rename from tests/qemuxml2argvdata/qemuxml2argv-hotplug-base-without-scsi-controller-live.xml rename to tests/qemuhotplugtestdata/qemuhotplug-base-without-scsi-controller-live.xml diff --git a/tests/qemuxml2argvdata/qemuxml2argv-console-compat-2-live.xml b/tests/qemuhotplugtestdata/qemuhotplug-console-compat-2-live.xml similarity index 100% rename from tests/qemuxml2argvdata/qemuxml2argv-console-compat-2-live.xml rename to tests/qemuhotplugtestdata/qemuhotplug-console-compat-2-live.xml diff --git a/tests/qemuhotplugtestdata/qemuhotplug-disk-cdrom.xml b/tests/qemuhotplugtestdata/qemuhotplug-disk-cdrom.xml new file mode 100644 index 0000000000..04f497633b --- /dev/null +++ b/tests/qemuhotplugtestdata/qemuhotplug-disk-cdrom.xml @@ -0,0 +1,37 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219100 + 219100 + 1 + + hvm + + + + destroy + restart + destroy + + /usr/bin/qemu + + + + +
+ + + + + + +
+ + + + + + + + + diff --git a/tests/qemuhotplugtestdata/qemuhotplug-graphics-spice-listen-network-password.xml b/tests/qemuhotplugtestdata/qemuhotplug-graphics-spice-listen-network-password.xml new file mode 100644 index 0000000000..426a14db22 --- /dev/null +++ b/tests/qemuhotplugtestdata/qemuhotplug-graphics-spice-listen-network-password.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/tests/qemuhotplugtestdata/qemuhotplug-graphics-spice-listen-network.xml b/tests/qemuhotplugtestdata/qemuhotplug-graphics-spice-listen-network.xml index 426a14db22..34971fecee 100644 --- a/tests/qemuhotplugtestdata/qemuhotplug-graphics-spice-listen-network.xml +++ b/tests/qemuhotplugtestdata/qemuhotplug-graphics-spice-listen-network.xml @@ -1,4 +1,29 @@ - + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219136 + 219136 + 1 + + hvm + + + + destroy + restart + destroy + + /usr/bin/qemu + + + +
+ + + + + + @@ -9,3 +34,12 @@ + + + + + diff --git a/tests/qemuhotplugtestdata/qemuhotplug-graphics-spice-timeout.xml b/tests/qemuhotplugtestdata/qemuhotplug-graphics-spice-timeout.xml new file mode 100644 index 0000000000..bfb189cd99 --- /dev/null +++ b/tests/qemuhotplugtestdata/qemuhotplug-graphics-spice-timeout.xml @@ -0,0 +1,87 @@ + + f14 + 553effab-b5e1-2d80-dfe3-da4344826c43 + 1048576 + 1048576 + 2 + + hvm + + + + + + + + + + + core2duo + Intel + + + + + + + + + + + + + + + + + destroy + restart + restart + + /usr/bin/qemu-kvm + + + + +
+ + + + + + +
+ + +
+ + +
+ + + +