[libvirt] [PATCH 1/2] qemuhotplugtest: handle xml files more precisely

Tomasz Flendrich t.flendrich at gmail.com
Tue Aug 2 22:37:48 UTC 2016


In qemuhotplugtest.c, the way xml files with domain and device
definitions were handled was very unintuitive. Because of this,
creating new tests was troublesome. Sometimes, you were forced
to create duplicates of files.

I modified the tests to explicitly state the three xml files:
the domain xml, the device xml that is attached/detached/updated,
and the expected xml. Thanks to this, a few duplicates are deleted.
Also, a few xml files that weren't used at all are deleted.
---
 tests/qemuhotplugtest.c                            | 222 ++++++++++-----------
 .../qemuhotplug-ccw-virtio-1-reverse.xml           |   7 -
 ...ach.xml => qemuhotplug-qemu-agent-nosource.xml} |   1 -
 .../qemuhotplug-qemu-agent.xml                     |   1 +
 .../qemuhotplug-base+qemu-agent-detach.xml         |  58 ------
 .../qemuhotplug-base+qemu-agent.xml                |  58 ------
 ...plug-base-ccw-live+ccw-virtio+ccw-virtio-2.xml} |   0
 ... => qemuhotplug-base-ccw-live+ccw-virtio-2.xml} |   0
 ...ive-with-2-ccw-virtio+ccw-virtio-1-explicit.xml |  73 -------
 ...live-with-2-ccw-virtio+ccw-virtio-1-reverse.xml |  73 -------
 ...-live-with-ccw-virtio+ccw-virtio-2-explicit.xml |  73 -------
 .../qemuhotplug-base-ccw-live-with-ccw-virtio.xml  |  63 ------
 ....xml => qemuhotplug-base-config+qemu-agent.xml} |   0
 .../qemuhotplug-base-live+qemu-agent-detach.xml    |  58 ------
 ...-base-with-scsi-controller-live+disk-scsi-2.xml |  51 -----
 15 files changed, 108 insertions(+), 630 deletions(-)
 delete mode 100644 tests/qemuhotplugtestdevices/qemuhotplug-ccw-virtio-1-reverse.xml
 rename tests/qemuhotplugtestdevices/{qemuhotplug-qemu-agent-detach.xml => qemuhotplug-qemu-agent-nosource.xml} (66%)
 delete mode 100644 tests/qemuhotplugtestdomains/qemuhotplug-base+qemu-agent-detach.xml
 delete mode 100644 tests/qemuhotplugtestdomains/qemuhotplug-base+qemu-agent.xml
 rename tests/qemuhotplugtestdomains/{qemuhotplug-base-ccw-live-with-ccw-virtio+ccw-virtio-2.xml => qemuhotplug-base-ccw-live+ccw-virtio+ccw-virtio-2.xml} (100%)
 rename tests/qemuhotplugtestdomains/{qemuhotplug-base-ccw-live-with-2-ccw-virtio.xml => qemuhotplug-base-ccw-live+ccw-virtio-2.xml} (100%)
 delete mode 100644 tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-2-ccw-virtio+ccw-virtio-1-explicit.xml
 delete mode 100644 tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-2-ccw-virtio+ccw-virtio-1-reverse.xml
 delete mode 100644 tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-ccw-virtio+ccw-virtio-2-explicit.xml
 delete mode 100644 tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-ccw-virtio.xml
 rename tests/qemuhotplugtestdomains/{qemuhotplug-base-config+qemu-agent+config.xml => qemuhotplug-base-config+qemu-agent.xml} (100%)
 delete mode 100644 tests/qemuhotplugtestdomains/qemuhotplug-base-live+qemu-agent-detach.xml
 delete mode 100644 tests/qemuhotplugtestdomains/qemuhotplug-base-with-scsi-controller-live+disk-scsi-2.xml

diff --git a/tests/qemuhotplugtest.c b/tests/qemuhotplugtest.c
index f26aedd..c6f055e 100644
--- a/tests/qemuhotplugtest.c
+++ b/tests/qemuhotplugtest.c
@@ -47,6 +47,7 @@ enum {
 struct qemuHotplugTestData {
     const char *domain_filename;
     const char *device_filename;
+    const char *expected_filename;
     bool fail;
     const char *const *mon;
     int action;
@@ -232,10 +233,10 @@ testQemuHotplug(const void *data)
     struct qemuHotplugTestData *test = (struct qemuHotplugTestData *) data;
     char *domain_filename = NULL;
     char *device_filename = NULL;
-    char *result_filename = NULL;
+    char *expected_filename = NULL;
     char *domain_xml = NULL;
     char *device_xml = NULL;
-    char *result_xml = NULL;
+    char *expected_xml = NULL;
     const char *const *tmp;
     bool fail = test->fail;
     bool keep = test->keep;
@@ -250,44 +251,29 @@ testQemuHotplug(const void *data)
     if (virAsprintf(&domain_filename, "%s/qemuhotplugtestdomains/qemuhotplug-%s.xml",
                     abs_srcdir, test->domain_filename) < 0 ||
         virAsprintf(&device_filename, "%s/qemuhotplugtestdevices/qemuhotplug-%s.xml",
-                    abs_srcdir, test->device_filename) < 0)
+                    abs_srcdir, test->device_filename) < 0 ||
+        virAsprintf(&expected_filename, "%s/qemuhotplugtestdomains/qemuhotplug-%s.xml",
+                    abs_srcdir, test->expected_filename) < 0)
         goto cleanup;
 
-    switch (impact) {
-    case VIR_DOMAIN_AFFECT_LIVE:
-        if (virAsprintf(&result_filename,
-                        "%s/qemuhotplugtestdomains/qemuhotplug-%s+%s.xml",
-                        abs_srcdir, test->domain_filename,
-                        test->device_filename) < 0)
-            goto cleanup;
-        break;
-    case VIR_DOMAIN_AFFECT_CONFIG:
-        if (virAsprintf(&result_filename,
-                        "%s/qemuhotplugtestdomains/qemuhotplug-%s+%s+config.xml",
-                        abs_srcdir, test->domain_filename,
-                        test->device_filename) < 0)
-            goto cleanup;
-        break;
-    default:
-        VIR_TEST_VERBOSE("Impact can either be VIR_DOMAIN_AFFECT_LIVE"
-                         " or VIR_DOMAIN_AFFECT_CONFIG\n");
-        goto cleanup;
-    }
-
-    if (virTestLoadFile(domain_filename, &domain_xml) < 0 ||
-        virTestLoadFile(device_filename, &device_xml) < 0)
+    if (virTestLoadFile(device_filename, &device_xml) < 0)
         goto cleanup;
 
     if (test->action != UPDATE &&
-        virTestLoadFile(result_filename, &result_xml) < 0)
-        goto cleanup;
-
-    if (!(caps = virQEMUDriverGetCapabilities(&driver, false)))
+        virTestLoadFile(expected_filename, &expected_xml) < 0)
         goto cleanup;
 
     if (test->vm) {
         vm = test->vm;
+        if (test->domain_filename) {
+            VIR_TEST_VERBOSE("This test is set to use the previous domain definition,"
+                             " so domain_filename should be NULL\n");
+            goto cleanup;
+        }
+
     } else {
+        if (virTestLoadFile(domain_filename, &domain_xml) < 0)
+            goto cleanup;
         if (qemuHotplugCreateObjects(driver.xmlopt, &vm, domain_xml,
                                      test->deviceDeletedEvent,
                                      test->domain_filename,
@@ -298,6 +284,9 @@ testQemuHotplug(const void *data)
     if (test->action == ATTACH)
         device_parse_flags = VIR_DOMAIN_DEF_PARSE_INACTIVE;
 
+    if (!(caps = virQEMUDriverGetCapabilities(&driver, false)))
+        goto cleanup;
+
     if (!(dev = virDomainDeviceDefParse(device_xml, vm->def,
                                         caps, driver.xmlopt,
                                         device_parse_flags)))
@@ -338,14 +327,14 @@ testQemuHotplug(const void *data)
             VIR_FREE(dev);
         }
         if (ret == 0 || fail)
-            ret = testQemuHotplugCheckResult(vm, result_xml, result_filename,
+            ret = testQemuHotplugCheckResult(vm, expected_xml, expected_filename,
                                              fail, impact);
         break;
 
     case DETACH:
         ret = testQemuHotplugDetach(vm, dev, device_xml, impact);
         if (ret == 0 || fail)
-            ret = testQemuHotplugCheckResult(vm, domain_xml, domain_filename,
+            ret = testQemuHotplugCheckResult(vm, expected_xml, expected_filename,
                                              fail, impact);
         break;
 
@@ -356,10 +345,8 @@ testQemuHotplug(const void *data)
  cleanup:
     VIR_FREE(domain_filename);
     VIR_FREE(device_filename);
-    VIR_FREE(result_filename);
     VIR_FREE(domain_xml);
     VIR_FREE(device_xml);
-    VIR_FREE(result_xml);
     /* don't dispose test monitor with VM */
     if (priv)
         priv->mon = NULL;
@@ -410,49 +397,51 @@ mymain(void)
     /* wait only 100ms for DEVICE_DELETED event */
     qemuDomainRemoveDeviceWaitTime = 100;
 
-#define DO_TEST(file, ACTION, dev, event, fial, kep, impct, ...)            \
-    do {                                                                    \
-        const char *my_mon[] = { __VA_ARGS__, NULL};                        \
-        const char *name = file " " #ACTION " " dev;                        \
-        data.action = ACTION;                                               \
-        data.domain_filename = file;                                        \
-        data.device_filename = dev;                                         \
-        data.fail = fial;                                                   \
-        data.mon = my_mon;                                                  \
-        data.keep = kep;                                                    \
-        data.deviceDeletedEvent = event;                                    \
-        data.impact = impct;                                                \
-        if (virTestRun(name, testQemuHotplug, &data) < 0)                   \
-            ret = -1;                                                       \
+#define DO_TEST(file, ACTION, dev, expectd, event, fial, kep, impct, ...)            \
+    do {                                                                             \
+        const char *my_mon[] = { __VA_ARGS__, NULL};                                 \
+        const char *name =                                                           \
+            (file) ? (#file " " #ACTION " " dev) : ("previous " #ACTION " " dev);    \
+        data.action = ACTION;                                                        \
+        data.domain_filename = file;                                                 \
+        data.device_filename = dev;                                                  \
+        data.expected_filename = expectd;                                            \
+        data.fail = fial;                                                            \
+        data.mon = my_mon;                                                           \
+        data.keep = kep;                                                             \
+        data.deviceDeletedEvent = event;                                             \
+        data.impact = impct;                                                         \
+        if (virTestRun(name, testQemuHotplug, &data) < 0)                            \
+            ret = -1;                                                                \
     } while (0)
 
-#define DO_TEST_ATTACH_LIVE(file, dev, fial, kep, ...)                       \
-    DO_TEST(file, ATTACH, dev, false, fial, kep,                             \
+#define DO_TEST_ATTACH_LIVE(file, dev, expctd, fial, kep, ...)                       \
+    DO_TEST(file, ATTACH, dev, expctd, false, fial, kep,                             \
         VIR_DOMAIN_AFFECT_LIVE, __VA_ARGS__)
 
-#define DO_TEST_DETACH_LIVE(file, dev, fial, kep, ...)                       \
-    DO_TEST(file, DETACH, dev, false, fial, kep,                             \
+#define DO_TEST_DETACH_LIVE(file, dev, expctd, fial, kep, ...)                       \
+    DO_TEST(file, DETACH, dev, expctd, false, fial, kep,                             \
         VIR_DOMAIN_AFFECT_LIVE, __VA_ARGS__)
 
-#define DO_TEST_ATTACH_EVENT_LIVE(file, dev, fial, kep, ...)                 \
-    DO_TEST(file, ATTACH, dev, true, fial, kep,                              \
+#define DO_TEST_ATTACH_EVENT_LIVE(file, dev, expctd, fial, kep, ...)                 \
+    DO_TEST(file, ATTACH, dev, expctd, true, fial, kep,                              \
         VIR_DOMAIN_AFFECT_LIVE, __VA_ARGS__)
 
-#define DO_TEST_DETACH_EVENT_LIVE(file, dev, fial, kep, ...)                 \
-    DO_TEST(file, DETACH, dev, true, fial, kep,                              \
+#define DO_TEST_DETACH_EVENT_LIVE(file, dev, expctd, fial, kep, ...)                 \
+    DO_TEST(file, DETACH, dev, expctd, true, fial, kep,                              \
         VIR_DOMAIN_AFFECT_LIVE, __VA_ARGS__)
 
-#define DO_TEST_UPDATE_LIVE(file, dev, fial, kep, ...)                       \
-    DO_TEST(file, UPDATE, dev, false, fial, kep,                             \
+#define DO_TEST_UPDATE_LIVE(file, dev, expctd, fial, kep, ...)                       \
+    DO_TEST(file, UPDATE, dev, NULL, false, fial, kep,                               \
         VIR_DOMAIN_AFFECT_LIVE, __VA_ARGS__)
 
 
-#define DO_TEST_ATTACH_CONFIG(file, dev, fial, kep, ...)                     \
-    DO_TEST(file, ATTACH, dev, false, fial, kep,                             \
+#define DO_TEST_ATTACH_CONFIG(file, dev, expctd, fial, kep, ...)                     \
+    DO_TEST(file, ATTACH, dev, expctd, false, fial, kep,                             \
         VIR_DOMAIN_AFFECT_CONFIG, __VA_ARGS__)
 
-#define DO_TEST_DETACH_CONFIG(file, dev, fial, kep, ...)                     \
-    DO_TEST(file, DETACH, dev, false, fial, kep,                             \
+#define DO_TEST_DETACH_CONFIG(file, dev, expctd, fial, kep, ...)                     \
+    DO_TEST(file, DETACH, dev, expctd, false, fial, kep,                             \
         VIR_DOMAIN_AFFECT_CONFIG, __VA_ARGS__)
 
 
@@ -473,85 +462,91 @@ mymain(void)
     "    }"                                                 \
     "}\r\n"
 
-    DO_TEST_UPDATE_LIVE("graphics-spice", "graphics-spice-nochange", false, false, NULL);
-    DO_TEST_UPDATE_LIVE("graphics-spice-timeout", "graphics-spice-timeout-nochange", false, false,
+    DO_TEST_UPDATE_LIVE("graphics-spice", "graphics-spice-nochange", NULL, false, false, NULL);
+
+    DO_TEST_UPDATE_LIVE("graphics-spice-timeout", "graphics-spice-timeout-nochange", NULL, false, false,
                         "set_password", QMP_OK, "expire_password", QMP_OK);
-    DO_TEST_UPDATE_LIVE("graphics-spice-timeout", "graphics-spice-timeout-password", false, false,
+
+    DO_TEST_UPDATE_LIVE("graphics-spice-timeout", "graphics-spice-timeout-password", NULL, false, false,
                         "set_password", QMP_OK, "expire_password", QMP_OK);
-    DO_TEST_UPDATE_LIVE("graphics-spice", "graphics-spice-listen", true, false, NULL);
-    DO_TEST_UPDATE_LIVE("graphics-spice-listen-network", "graphics-spice-listen-network-password", false, false,
+
+    DO_TEST_UPDATE_LIVE("graphics-spice", "graphics-spice-listen", NULL, true, false, NULL);
+
+    DO_TEST_UPDATE_LIVE("graphics-spice-listen-network", "graphics-spice-listen-network-password", NULL, false, false,
                         "set_password", QMP_OK, "expire_password", QMP_OK);
-    DO_TEST_UPDATE_LIVE("disk-cdrom", "disk-cdrom-nochange", false, false, NULL);
 
-    DO_TEST_ATTACH_LIVE("console-compat-2-live", "console-virtio", false, true,
+    DO_TEST_UPDATE_LIVE("disk-cdrom", "disk-cdrom-nochange", NULL, false, false, NULL);
+
+    DO_TEST_ATTACH_LIVE("console-compat-2-live", "console-virtio",
+                        "console-compat-2-live+console-virtio", false, true,
                         "chardev-add", "{\"return\": {\"pty\": \"/dev/pts/26\"}}",
                         "device_add", QMP_OK);
-
-    DO_TEST_DETACH_LIVE("console-compat-2-live", "console-virtio", false, false,
+    DO_TEST_DETACH_LIVE(NULL, "console-virtio", "console-compat-2-live", false, false,
                         "device_del", QMP_OK,
                         "chardev-remove", QMP_OK);
 
-    DO_TEST_ATTACH_LIVE("base-live", "disk-virtio", false, true,
+    DO_TEST_ATTACH_LIVE("base-live", "disk-virtio", "base-live+disk-virtio", false, true,
                         "human-monitor-command", HMP("OK\\r\\n"),
                         "device_add", QMP_OK);
-    DO_TEST_DETACH_LIVE("base-live", "disk-virtio", false, false,
+    DO_TEST_DETACH_LIVE(NULL, "disk-virtio", "base-live", false, false,
                         "device_del", QMP_OK,
                         "human-monitor-command", HMP(""));
 
-    DO_TEST_ATTACH_EVENT_LIVE("base-live", "disk-virtio", false, true,
+    DO_TEST_ATTACH_EVENT_LIVE("base-live", "disk-virtio", "base-live+disk-virtio", false, true,
                               "human-monitor-command", HMP("OK\\r\\n"),
                               "device_add", QMP_OK,
                               "qom-list", QOM_OK);
-    DO_TEST_DETACH_LIVE("base-live", "disk-virtio", true, true,
+    DO_TEST_DETACH_LIVE(NULL, "disk-virtio", "base-live", true, true,
                         "device_del", QMP_OK,
                         "qom-list", QOM_OK,
                         "human-monitor-command", HMP(""));
-    DO_TEST_DETACH_LIVE("base-live", "disk-virtio", false, false,
+    DO_TEST_DETACH_LIVE(NULL, "disk-virtio", "base-live", false, false,
                         "device_del", QMP_DEVICE_DELETED("virtio-disk4") QMP_OK,
                         "human-monitor-command", HMP(""),
                         "qom-list", QOM_OK);
 
-    DO_TEST_ATTACH_LIVE("base-live", "disk-usb", false, true,
+    DO_TEST_ATTACH_LIVE("base-live", "disk-usb", "base-live+disk-usb", false, true,
                         "human-monitor-command", HMP("OK\\r\\n"),
                         "device_add", QMP_OK);
-    DO_TEST_DETACH_LIVE("base-live", "disk-usb", false, false,
+    DO_TEST_DETACH_LIVE(NULL, "disk-usb", "base-live", false, false,
                         "device_del", QMP_OK,
                         "human-monitor-command", HMP(""));
 
-    DO_TEST_ATTACH_EVENT_LIVE("base-live", "disk-usb", false, true,
+    DO_TEST_ATTACH_EVENT_LIVE("base-live", "disk-usb", "base-live+disk-usb", false, true,
                               "human-monitor-command", HMP("OK\\r\\n"),
                               "device_add", QMP_OK,
                               "qom-list", QOM_OK);
-    DO_TEST_DETACH_LIVE("base-live", "disk-usb", true, true,
+    DO_TEST_DETACH_LIVE(NULL, "disk-usb", "base-live", true, true,
                         "device_del", QMP_OK,
                         "qom-list", QOM_OK,
                         "human-monitor-command", HMP(""));
-    DO_TEST_DETACH_LIVE("base-live", "disk-usb", false, false,
+    DO_TEST_DETACH_LIVE(NULL, "disk-usb", "base-live", false, false,
                         "device_del", QMP_DEVICE_DELETED("usb-disk16") QMP_OK,
                         "human-monitor-command", HMP(""),
                         "qom-list", QOM_OK);
 
-    DO_TEST_ATTACH_LIVE("base-live", "disk-scsi", false, true,
+    DO_TEST_ATTACH_LIVE("base-live", "disk-scsi", "base-live+disk-scsi", false, true,
                         "human-monitor-command", HMP("OK\\r\\n"),
                         "device_add", QMP_OK);
-    DO_TEST_DETACH_LIVE("base-live", "disk-scsi", false, false,
+    DO_TEST_DETACH_LIVE(NULL, "disk-scsi", "base-live", false, false,
                         "device_del", QMP_OK,
                         "human-monitor-command", HMP(""));
 
-    DO_TEST_ATTACH_EVENT_LIVE("base-live", "disk-scsi", false, true,
+    DO_TEST_ATTACH_EVENT_LIVE("base-live", "disk-scsi", "base-live+disk-scsi", false, true,
                               "human-monitor-command", HMP("OK\\r\\n"),
                               "device_add", QMP_OK,
                               "qom-list", QOM_OK);
-    DO_TEST_DETACH_LIVE("base-live", "disk-scsi", true, true,
+    DO_TEST_DETACH_LIVE(NULL, "disk-scsi", "base-live", true, true,
                         "device_del", QMP_OK,
                         "qom-list", QOM_OK,
                         "human-monitor-command", HMP(""));
-    DO_TEST_DETACH_LIVE("base-live", "disk-scsi", false, false,
+    DO_TEST_DETACH_LIVE(NULL, "disk-scsi", "base-live", false, false,
                         "device_del", QMP_DEVICE_DELETED("scsi0-0-0-5") QMP_OK,
                         "human-monitor-command", HMP(""),
                         "qom-list", QOM_OK);
 
-    DO_TEST_ATTACH_LIVE("base-without-scsi-controller-live", "disk-scsi-2", false, true,
+    DO_TEST_ATTACH_LIVE("base-without-scsi-controller-live", "disk-scsi-2",
+                        "base-without-scsi-controller-live+disk-scsi-2", false, true,
                         /* Four controllers added */
                         "device_add", QMP_OK,
                         "device_add", QMP_OK,
@@ -560,11 +555,12 @@ mymain(void)
                         "human-monitor-command", HMP("OK\\r\\n"),
                         /* Disk added */
                         "device_add", QMP_OK);
-    DO_TEST_DETACH_LIVE("base-with-scsi-controller-live", "disk-scsi-2", false, false,
+    DO_TEST_DETACH_LIVE(NULL, "disk-scsi-2", "base-with-scsi-controller-live", false, false,
                         "device_del", QMP_OK,
                         "human-monitor-command", HMP(""));
 
-    DO_TEST_ATTACH_EVENT_LIVE("base-without-scsi-controller-live", "disk-scsi-2", false, true,
+    DO_TEST_ATTACH_EVENT_LIVE("base-without-scsi-controller-live", "disk-scsi-2",
+                              "base-without-scsi-controller-live+disk-scsi-2", false, true,
                               /* Four controllers added */
                               "device_add", QMP_OK,
                               "device_add", QMP_OK,
@@ -574,64 +570,60 @@ mymain(void)
                               /* Disk added */
                               "device_add", QMP_OK,
                               "qom-list", QOM_OK);
-    DO_TEST_DETACH_LIVE("base-with-scsi-controller-live", "disk-scsi-2", true, true,
+    DO_TEST_DETACH_LIVE(NULL, "disk-scsi-2", "base-with-scsi-controller-live", true, true,
                         "device_del", QMP_OK,
                         "qom-list", QOM_OK,
                         "human-monitor-command", HMP(""));
-    DO_TEST_DETACH_LIVE("base-with-scsi-controller-live", "disk-scsi-2", false, false,
+    DO_TEST_DETACH_LIVE(NULL, "disk-scsi-2", "base-with-scsi-controller-live", false, false,
                         "device_del", QMP_DEVICE_DELETED("scsi3-0-5-7") QMP_OK,
                         "human-monitor-command", HMP(""),
                         "qom-list", QOM_OK);
 
-    DO_TEST_ATTACH_LIVE("base-live", "qemu-agent", false, true,
+    DO_TEST_ATTACH_LIVE("base-live", "qemu-agent", "base-live+qemu-agent", false, true,
                         "chardev-add", QMP_OK,
                         "device_add", QMP_OK);
-    DO_TEST_DETACH_LIVE("base-live", "qemu-agent-detach", false, false,
+    DO_TEST_DETACH_LIVE(NULL, "qemu-agent", "base-live", false, false,
                         "device_del", QMP_OK,
                         "chardev-remove", QMP_OK);
 
-    DO_TEST_ATTACH_LIVE("base-ccw-live", "ccw-virtio", false, true,
+    DO_TEST_ATTACH_LIVE("base-ccw-live", "ccw-virtio", "base-ccw-live+ccw-virtio", false, true,
                         "human-monitor-command", HMP("OK\\r\\n"),
                         "device_add", QMP_OK);
-    DO_TEST_DETACH_LIVE("base-ccw-live", "ccw-virtio", false, false,
+    DO_TEST_DETACH_LIVE(NULL, "ccw-virtio", "base-ccw-live", false, false,
                         "device_del", QMP_OK,
                         "human-monitor-command", HMP(""));
 
-    DO_TEST_ATTACH_LIVE("base-ccw-live-with-ccw-virtio", "ccw-virtio-2", false, true,
+    DO_TEST_ATTACH_LIVE("base-ccw-live+ccw-virtio", "ccw-virtio-2",
+                        "base-ccw-live+ccw-virtio+ccw-virtio-2", false, true,
                         "human-monitor-command", HMP("OK\\r\\n"),
                         "device_add", QMP_OK);
-
-    DO_TEST_DETACH_LIVE("base-ccw-live-with-ccw-virtio", "ccw-virtio-2", false, false,
+    DO_TEST_DETACH_LIVE(NULL, "ccw-virtio-2", "base-ccw-live+ccw-virtio", false, false,
                         "device_del", QMP_OK,
                         "human-monitor-command", HMP(""));
 
-    DO_TEST_ATTACH_LIVE("base-ccw-live-with-ccw-virtio", "ccw-virtio-2-explicit", false, true,
+    DO_TEST_ATTACH_LIVE("base-ccw-live+ccw-virtio", "ccw-virtio-2-explicit",
+                        "base-ccw-live+ccw-virtio+ccw-virtio-2", false, true,
                         "human-monitor-command", HMP("OK\\r\\n"),
                         "device_add", QMP_OK);
-
-    DO_TEST_DETACH_LIVE("base-ccw-live-with-ccw-virtio", "ccw-virtio-2-explicit", false, false,
+    DO_TEST_DETACH_LIVE(NULL, "ccw-virtio-2-explicit", "base-ccw-live+ccw-virtio", false, false,
                         "device_del", QMP_OK,
                         "human-monitor-command", HMP(""));
 
-    /* Attach a second device, then detach the first one. Then attach the first one again. */
-    DO_TEST_ATTACH_LIVE("base-ccw-live-with-ccw-virtio", "ccw-virtio-2-explicit", false, true,
-                        "human-monitor-command", HMP("OK\\r\\n"),
-                        "device_add", QMP_OK);
-
-    DO_TEST_DETACH_LIVE("base-ccw-live-with-2-ccw-virtio", "ccw-virtio-1-explicit", false, true,
+    /* Have a domain with two devices, detach the first one, then attach the first one again. */
+    DO_TEST_DETACH_LIVE("base-ccw-live+ccw-virtio+ccw-virtio-2", "ccw-virtio-1-explicit",
+                        "base-ccw-live+ccw-virtio-2", false, true,
                         "device_del", QMP_OK,
                         "human-monitor-command", HMP(""));
-
-    DO_TEST_ATTACH_LIVE("base-ccw-live-with-2-ccw-virtio", "ccw-virtio-1-reverse", false, false,
+    DO_TEST_ATTACH_LIVE(NULL, "ccw-virtio", "base-ccw-live+ccw-virtio+ccw-virtio-2", false, false,
                         "human-monitor-command", HMP("OK\\r\\n"),
                         "device_add", QMP_OK);
 
-    DO_TEST_ATTACH_CONFIG("base-config", "qemu-agent", false, true,
-                   "chardev-add", QMP_OK,
-                   "device_add", QMP_OK);
-    DO_TEST_DETACH_CONFIG("base-config", "qemu-agent", false, false,
-                   "device_del", QMP_OK,
-                   "chardev-remove", QMP_OK);
+    DO_TEST_ATTACH_CONFIG("base-config", "qemu-agent-nosource", "base-config+qemu-agent", false, true,
+                          "chardev-add", QMP_OK,
+                          "device_add", QMP_OK);
+    DO_TEST_DETACH_CONFIG(NULL, "qemu-agent-nosource", "base-config", false, false,
+                          "device_del", QMP_OK,
+                          "chardev-remove", QMP_OK);
 
     qemuTestDriverFree(&driver);
     return (ret == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
diff --git a/tests/qemuhotplugtestdevices/qemuhotplug-ccw-virtio-1-reverse.xml b/tests/qemuhotplugtestdevices/qemuhotplug-ccw-virtio-1-reverse.xml
deleted file mode 100644
index d62e8a4..0000000
--- a/tests/qemuhotplugtestdevices/qemuhotplug-ccw-virtio-1-reverse.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<disk type='file' device='disk'>
-  <driver name='qemu' type='raw' cache='none'/>
-  <source file='/dev/null'/>
-  <target dev='hdb' bus='virtio'/>
-  <readonly/>
-  <shareable/>
-</disk>
diff --git a/tests/qemuhotplugtestdevices/qemuhotplug-qemu-agent-detach.xml b/tests/qemuhotplugtestdevices/qemuhotplug-qemu-agent-nosource.xml
similarity index 66%
rename from tests/qemuhotplugtestdevices/qemuhotplug-qemu-agent-detach.xml
rename to tests/qemuhotplugtestdevices/qemuhotplug-qemu-agent-nosource.xml
index 1ae1468..648da4b 100644
--- a/tests/qemuhotplugtestdevices/qemuhotplug-qemu-agent-detach.xml
+++ b/tests/qemuhotplugtestdevices/qemuhotplug-qemu-agent-nosource.xml
@@ -1,5 +1,4 @@
     <channel type='unix'>
-      <source mode='bind' path='/tmp/channel/domain-7-hotplug/org.qemu.guest_agent.0'/>
       <target type='virtio' name='org.qemu.guest_agent.0'/>
       <address type='virtio-serial' controller='0' bus='0' port='1'/>
     </channel>
diff --git a/tests/qemuhotplugtestdevices/qemuhotplug-qemu-agent.xml b/tests/qemuhotplugtestdevices/qemuhotplug-qemu-agent.xml
index 648da4b..1ae1468 100644
--- a/tests/qemuhotplugtestdevices/qemuhotplug-qemu-agent.xml
+++ b/tests/qemuhotplugtestdevices/qemuhotplug-qemu-agent.xml
@@ -1,4 +1,5 @@
     <channel type='unix'>
+      <source mode='bind' path='/tmp/channel/domain-7-hotplug/org.qemu.guest_agent.0'/>
       <target type='virtio' name='org.qemu.guest_agent.0'/>
       <address type='virtio-serial' controller='0' bus='0' port='1'/>
     </channel>
diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base+qemu-agent-detach.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base+qemu-agent-detach.xml
deleted file mode 100644
index 2c449f1..0000000
--- a/tests/qemuhotplugtestdomains/qemuhotplug-base+qemu-agent-detach.xml
+++ /dev/null
@@ -1,58 +0,0 @@
-<domain type='kvm' id='7'>
-  <name>hotplug</name>
-  <uuid>d091ea82-29e6-2e34-3005-f02617b36e87</uuid>
-  <memory unit='KiB'>4194304</memory>
-  <currentMemory unit='KiB'>4194304</currentMemory>
-  <vcpu placement='static'>4</vcpu>
-  <os>
-    <type arch='x86_64' machine='pc'>hvm</type>
-    <boot dev='hd'/>
-  </os>
-  <features>
-    <acpi/>
-    <apic/>
-    <pae/>
-  </features>
-  <clock offset='utc'/>
-  <on_poweroff>destroy</on_poweroff>
-  <on_reboot>restart</on_reboot>
-  <on_crash>restart</on_crash>
-  <devices>
-    <emulator>/usr/libexec/qemu-kvm</emulator>
-    <controller type='usb' index='0'>
-      <alias name='usb'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
-    </controller>
-    <controller type='ide' index='0'>
-      <alias name='ide'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
-    </controller>
-    <controller type='scsi' index='0' model='virtio-scsi'>
-      <alias name='scsi0'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
-    </controller>
-    <controller type='pci' index='0' model='pci-root'>
-      <alias name='pci'/>
-    </controller>
-    <controller type='virtio-serial' index='0'>
-      <alias name='virtio-serial0'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
-    </controller>
-    <channel type='unix'>
-      <source mode='bind' path='/var/lib/libvirt/qemu/channel/target/domain-7-hotplug/org.qemu.guest_agent.0'/>
-      <target type='virtio' name='org.qemu.guest_agent.0'/>
-      <alias name='channel0'/>
-      <address type='virtio-serial' controller='0' bus='0' port='1'/>
-    </channel>
-    <input type='mouse' bus='ps2'>
-      <alias name='input0'/>
-    </input>
-    <input type='keyboard' bus='ps2'>
-      <alias name='input1'/>
-    </input>
-    <memballoon model='none'>
-      <alias name='balloon0'/>
-    </memballoon>
-  </devices>
-  <seclabel type='none' model='none'/>
-</domain>
diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base+qemu-agent.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base+qemu-agent.xml
deleted file mode 100644
index 47fc970..0000000
--- a/tests/qemuhotplugtestdomains/qemuhotplug-base+qemu-agent.xml
+++ /dev/null
@@ -1,58 +0,0 @@
-<domain type='kvm' id='7'>
-  <name>hotplug</name>
-  <uuid>d091ea82-29e6-2e34-3005-f02617b36e87</uuid>
-  <memory unit='KiB'>4194304</memory>
-  <currentMemory unit='KiB'>4194304</currentMemory>
-  <vcpu placement='static'>4</vcpu>
-  <os>
-    <type arch='x86_64' machine='pc'>hvm</type>
-    <boot dev='hd'/>
-  </os>
-  <features>
-    <acpi/>
-    <apic/>
-    <pae/>
-  </features>
-  <clock offset='utc'/>
-  <on_poweroff>destroy</on_poweroff>
-  <on_reboot>restart</on_reboot>
-  <on_crash>restart</on_crash>
-  <devices>
-    <emulator>/usr/libexec/qemu-kvm</emulator>
-    <controller type='usb' index='0'>
-      <alias name='usb'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
-    </controller>
-    <controller type='ide' index='0'>
-      <alias name='ide'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
-    </controller>
-    <controller type='scsi' index='0' model='virtio-scsi'>
-      <alias name='scsi0'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
-    </controller>
-    <controller type='pci' index='0' model='pci-root'>
-      <alias name='pci'/>
-    </controller>
-    <controller type='virtio-serial' index='0'>
-      <alias name='virtio-serial0'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
-    </controller>
-    <channel type='unix'>
-      <source mode='bind' path='/tmp/channel/domain-7-hotplug/org.qemu.guest_agent.0'/>
-      <target type='virtio' name='org.qemu.guest_agent.0'/>
-      <alias name='channel0'/>
-      <address type='virtio-serial' controller='0' bus='0' port='1'/>
-    </channel>
-    <input type='mouse' bus='ps2'>
-      <alias name='input0'/>
-    </input>
-    <input type='keyboard' bus='ps2'>
-      <alias name='input1'/>
-    </input>
-    <memballoon model='none'>
-      <alias name='balloon0'/>
-    </memballoon>
-  </devices>
-  <seclabel type='none' model='none'/>
-</domain>
diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-ccw-virtio+ccw-virtio-2.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live+ccw-virtio+ccw-virtio-2.xml
similarity index 100%
rename from tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-ccw-virtio+ccw-virtio-2.xml
rename to tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live+ccw-virtio+ccw-virtio-2.xml
diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-2-ccw-virtio.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live+ccw-virtio-2.xml
similarity index 100%
rename from tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-2-ccw-virtio.xml
rename to tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live+ccw-virtio-2.xml
diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-2-ccw-virtio+ccw-virtio-1-explicit.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-2-ccw-virtio+ccw-virtio-1-explicit.xml
deleted file mode 100644
index 1683174..0000000
--- a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-2-ccw-virtio+ccw-virtio-1-explicit.xml
+++ /dev/null
@@ -1,73 +0,0 @@
-<domain type='kvm' id='7'>
-  <name>hotplug</name>
-  <uuid>d091ea82-29e6-2e34-3005-f02617b36e87</uuid>
-  <memory unit='KiB'>4194304</memory>
-  <currentMemory unit='KiB'>4194304</currentMemory>
-  <vcpu placement='static'>4</vcpu>
-  <os>
-    <type arch='s390x' machine='s390-ccw'>hvm</type>
-    <boot dev='hd'/>
-  </os>
-  <features>
-    <acpi/>
-    <apic/>
-    <pae/>
-  </features>
-  <clock offset='utc'/>
-  <on_poweroff>destroy</on_poweroff>
-  <on_reboot>restart</on_reboot>
-  <on_crash>restart</on_crash>
-  <devices>
-    <emulator>/usr/libexec/qemu-kvm</emulator>
-    <disk type='file' device='disk'>
-      <driver name='qemu' type='raw' cache='none'/>
-      <source file='/dev/null'/>
-      <backingStore/>
-      <target dev='vde' bus='virtio'/>
-      <readonly/>
-      <shareable/>
-      <alias name='virtio-disk4'/>
-      <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0000'/>
-    </disk>
-    <disk type='file' device='disk'>
-      <driver name='qemu' type='raw' cache='none'/>
-      <source file='/dev/null'/>
-      <backingStore/>
-      <target dev='hda' bus='virtio'/>
-      <readonly/>
-      <shareable/>
-      <alias name='virtio-disk0'/>
-      <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0001'/>
-    </disk>
-    <controller type='usb' index='0'>
-      <alias name='usb'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
-    </controller>
-    <controller type='ide' index='0'>
-      <alias name='ide0'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
-    </controller>
-    <controller type='scsi' index='0' model='virtio-scsi'>
-      <alias name='scsi0'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
-    </controller>
-    <controller type='pci' index='0' model='pci-root'>
-      <alias name='pci'/>
-    </controller>
-    <controller type='virtio-serial' index='0'>
-      <alias name='virtio-serial0'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
-    </controller>
-    <input type='mouse' bus='ps2'>
-      <alias name='input0'/>
-    </input>
-    <input type='keyboard' bus='ps2'>
-      <alias name='input1'/>
-    </input>
-    <memballoon model='none'>
-      <alias name='balloon0'/>
-    </memballoon>
-    <panic model='s390'/>
-  </devices>
-  <seclabel type='none' model='none'/>
-</domain>
diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-2-ccw-virtio+ccw-virtio-1-reverse.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-2-ccw-virtio+ccw-virtio-1-reverse.xml
deleted file mode 100644
index 7d2c3ab..0000000
--- a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-2-ccw-virtio+ccw-virtio-1-reverse.xml
+++ /dev/null
@@ -1,73 +0,0 @@
-<domain type='kvm' id='7'>
-  <name>hotplug</name>
-  <uuid>d091ea82-29e6-2e34-3005-f02617b36e87</uuid>
-  <memory unit='KiB'>4194304</memory>
-  <currentMemory unit='KiB'>4194304</currentMemory>
-  <vcpu placement='static'>4</vcpu>
-  <os>
-    <type arch='s390x' machine='s390-ccw'>hvm</type>
-    <boot dev='hd'/>
-  </os>
-  <features>
-    <acpi/>
-    <apic/>
-    <pae/>
-  </features>
-  <clock offset='utc'/>
-  <on_poweroff>destroy</on_poweroff>
-  <on_reboot>restart</on_reboot>
-  <on_crash>restart</on_crash>
-  <devices>
-    <emulator>/usr/libexec/qemu-kvm</emulator>
-    <disk type='file' device='disk'>
-      <driver name='qemu' type='raw' cache='none'/>
-      <source file='/dev/null'/>
-      <backingStore/>
-      <target dev='hda' bus='virtio'/>
-      <readonly/>
-      <shareable/>
-      <alias name='virtio-disk0'/>
-      <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0001'/>
-    </disk>
-    <disk type='file' device='disk'>
-      <driver name='qemu' type='raw' cache='none'/>
-      <source file='/dev/null'/>
-      <backingStore/>
-      <target dev='hdb' bus='virtio'/>
-      <readonly/>
-      <shareable/>
-      <alias name='virtio-disk1'/>
-      <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0000'/>
-    </disk>
-    <controller type='usb' index='0'>
-      <alias name='usb'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
-    </controller>
-    <controller type='ide' index='0'>
-      <alias name='ide0'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
-    </controller>
-    <controller type='scsi' index='0' model='virtio-scsi'>
-      <alias name='scsi0'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
-    </controller>
-    <controller type='pci' index='0' model='pci-root'>
-      <alias name='pci'/>
-    </controller>
-    <controller type='virtio-serial' index='0'>
-      <alias name='virtio-serial0'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
-    </controller>
-    <input type='mouse' bus='ps2'>
-      <alias name='input0'/>
-    </input>
-    <input type='keyboard' bus='ps2'>
-      <alias name='input1'/>
-    </input>
-    <memballoon model='none'>
-      <alias name='balloon0'/>
-    </memballoon>
-    <panic model='s390'/>
-  </devices>
-  <seclabel type='none' model='none'/>
-</domain>
diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-ccw-virtio+ccw-virtio-2-explicit.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-ccw-virtio+ccw-virtio-2-explicit.xml
deleted file mode 100644
index a262b9f..0000000
--- a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-ccw-virtio+ccw-virtio-2-explicit.xml
+++ /dev/null
@@ -1,73 +0,0 @@
-<domain type='kvm' id='7'>
-  <name>hotplug</name>
-  <uuid>d091ea82-29e6-2e34-3005-f02617b36e87</uuid>
-  <memory unit='KiB'>4194304</memory>
-  <currentMemory unit='KiB'>4194304</currentMemory>
-  <vcpu placement='static'>4</vcpu>
-  <os>
-    <type arch='s390x' machine='s390-ccw'>hvm</type>
-    <boot dev='hd'/>
-  </os>
-  <features>
-    <acpi/>
-    <apic/>
-    <pae/>
-  </features>
-  <clock offset='utc'/>
-  <on_poweroff>destroy</on_poweroff>
-  <on_reboot>restart</on_reboot>
-  <on_crash>restart</on_crash>
-  <devices>
-    <emulator>/usr/libexec/qemu-kvm</emulator>
-    <disk type='file' device='disk'>
-      <driver name='qemu' type='raw' cache='none'/>
-      <source file='/dev/null'/>
-      <backingStore/>
-      <target dev='hda' bus='virtio'/>
-      <readonly/>
-      <shareable/>
-      <alias name='virtio-disk0'/>
-      <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0001'/>
-    </disk>
-    <disk type='file' device='disk'>
-      <driver name='qemu' type='raw' cache='none'/>
-      <source file='/dev/null'/>
-      <backingStore/>
-      <target dev='vde' bus='virtio'/>
-      <readonly/>
-      <shareable/>
-      <alias name='virtio-disk4'/>
-      <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0000'/>
-    </disk>
-    <controller type='usb' index='0'>
-      <alias name='usb'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
-    </controller>
-    <controller type='ide' index='0'>
-      <alias name='ide0'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
-    </controller>
-    <controller type='scsi' index='0' model='virtio-scsi'>
-      <alias name='scsi0'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
-    </controller>
-    <controller type='pci' index='0' model='pci-root'>
-      <alias name='pci'/>
-    </controller>
-    <controller type='virtio-serial' index='0'>
-      <alias name='virtio-serial0'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
-    </controller>
-    <input type='mouse' bus='ps2'>
-      <alias name='input0'/>
-    </input>
-    <input type='keyboard' bus='ps2'>
-      <alias name='input1'/>
-    </input>
-    <memballoon model='none'>
-      <alias name='balloon0'/>
-    </memballoon>
-    <panic model='s390'/>
-  </devices>
-  <seclabel type='none' model='none'/>
-</domain>
diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-ccw-virtio.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-ccw-virtio.xml
deleted file mode 100644
index 2a27e11..0000000
--- a/tests/qemuhotplugtestdomains/qemuhotplug-base-ccw-live-with-ccw-virtio.xml
+++ /dev/null
@@ -1,63 +0,0 @@
-<domain type='kvm' id='7'>
-  <name>hotplug</name>
-  <uuid>d091ea82-29e6-2e34-3005-f02617b36e87</uuid>
-  <memory unit='KiB'>4194304</memory>
-  <currentMemory unit='KiB'>4194304</currentMemory>
-  <vcpu placement='static'>4</vcpu>
-  <os>
-    <type arch='s390x' machine='s390-ccw'>hvm</type>
-    <boot dev='hd'/>
-  </os>
-  <features>
-    <acpi/>
-    <apic/>
-    <pae/>
-  </features>
-  <clock offset='utc'/>
-  <on_poweroff>destroy</on_poweroff>
-  <on_reboot>restart</on_reboot>
-  <on_crash>restart</on_crash>
-  <devices>
-    <emulator>/usr/libexec/qemu-kvm</emulator>
-    <disk type='file' device='disk'>
-      <driver name='qemu' type='raw' cache='none'/>
-      <source file='/dev/null'/>
-      <backingStore/>
-      <target dev='vde' bus='virtio'/>
-      <readonly/>
-      <shareable/>
-      <alias name='virtio-disk4'/>
-      <address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0000'/>
-    </disk>
-    <controller type='usb' index='0'>
-      <alias name='usb'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
-    </controller>
-    <controller type='ide' index='0'>
-      <alias name='ide0'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
-    </controller>
-    <controller type='scsi' index='0' model='virtio-scsi'>
-      <alias name='scsi0'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
-    </controller>
-    <controller type='pci' index='0' model='pci-root'>
-      <alias name='pci'/>
-    </controller>
-    <controller type='virtio-serial' index='0'>
-      <alias name='virtio-serial0'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
-    </controller>
-    <input type='mouse' bus='ps2'>
-      <alias name='input0'/>
-    </input>
-    <input type='keyboard' bus='ps2'>
-      <alias name='input1'/>
-    </input>
-    <memballoon model='none'>
-      <alias name='balloon0'/>
-    </memballoon>
-    <panic model='s390'/>
-  </devices>
-  <seclabel type='none' model='none'/>
-</domain>
diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-config+qemu-agent+config.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-config+qemu-agent.xml
similarity index 100%
rename from tests/qemuhotplugtestdomains/qemuhotplug-base-config+qemu-agent+config.xml
rename to tests/qemuhotplugtestdomains/qemuhotplug-base-config+qemu-agent.xml
diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+qemu-agent-detach.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+qemu-agent-detach.xml
deleted file mode 100644
index 2c449f1..0000000
--- a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+qemu-agent-detach.xml
+++ /dev/null
@@ -1,58 +0,0 @@
-<domain type='kvm' id='7'>
-  <name>hotplug</name>
-  <uuid>d091ea82-29e6-2e34-3005-f02617b36e87</uuid>
-  <memory unit='KiB'>4194304</memory>
-  <currentMemory unit='KiB'>4194304</currentMemory>
-  <vcpu placement='static'>4</vcpu>
-  <os>
-    <type arch='x86_64' machine='pc'>hvm</type>
-    <boot dev='hd'/>
-  </os>
-  <features>
-    <acpi/>
-    <apic/>
-    <pae/>
-  </features>
-  <clock offset='utc'/>
-  <on_poweroff>destroy</on_poweroff>
-  <on_reboot>restart</on_reboot>
-  <on_crash>restart</on_crash>
-  <devices>
-    <emulator>/usr/libexec/qemu-kvm</emulator>
-    <controller type='usb' index='0'>
-      <alias name='usb'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
-    </controller>
-    <controller type='ide' index='0'>
-      <alias name='ide'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
-    </controller>
-    <controller type='scsi' index='0' model='virtio-scsi'>
-      <alias name='scsi0'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
-    </controller>
-    <controller type='pci' index='0' model='pci-root'>
-      <alias name='pci'/>
-    </controller>
-    <controller type='virtio-serial' index='0'>
-      <alias name='virtio-serial0'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
-    </controller>
-    <channel type='unix'>
-      <source mode='bind' path='/var/lib/libvirt/qemu/channel/target/domain-7-hotplug/org.qemu.guest_agent.0'/>
-      <target type='virtio' name='org.qemu.guest_agent.0'/>
-      <alias name='channel0'/>
-      <address type='virtio-serial' controller='0' bus='0' port='1'/>
-    </channel>
-    <input type='mouse' bus='ps2'>
-      <alias name='input0'/>
-    </input>
-    <input type='keyboard' bus='ps2'>
-      <alias name='input1'/>
-    </input>
-    <memballoon model='none'>
-      <alias name='balloon0'/>
-    </memballoon>
-  </devices>
-  <seclabel type='none' model='none'/>
-</domain>
diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-with-scsi-controller-live+disk-scsi-2.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-with-scsi-controller-live+disk-scsi-2.xml
deleted file mode 100644
index b2c9a07..0000000
--- a/tests/qemuhotplugtestdomains/qemuhotplug-base-with-scsi-controller-live+disk-scsi-2.xml
+++ /dev/null
@@ -1,51 +0,0 @@
-<domain type='kvm'>
-  <name>hotplug</name>
-  <uuid>d091ea82-29e6-2e34-3005-f02617b36e87</uuid>
-  <memory unit='KiB'>4194304</memory>
-  <currentMemory unit='KiB'>4194304</currentMemory>
-  <vcpu placement='static'>4</vcpu>
-  <os>
-    <type arch='x86_64' machine='pc'>hvm</type>
-    <boot dev='hd'/>
-  </os>
-  <features>
-    <acpi/>
-    <apic/>
-    <pae/>
-  </features>
-  <clock offset='utc'/>
-  <on_poweroff>destroy</on_poweroff>
-  <on_reboot>restart</on_reboot>
-  <on_crash>restart</on_crash>
-  <devices>
-    <emulator>/usr/libexec/qemu-kvm</emulator>
-    <disk type='file' device='disk'>
-      <driver name='qemu' type='raw' cache='none'/>
-      <source file='/dev/null'/>
-      <target dev='sdf' bus='scsi'/>
-      <readonly/>
-      <shareable/>
-      <address type='drive' controller='3' bus='0' target='5' unit='7'/>
-    </disk>
-    <controller type='usb' index='0'>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
-    </controller>
-    <controller type='pci' index='0' model='pci-root'/>
-    <controller type='scsi' index='0'>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
-    </controller>
-    <controller type='scsi' index='1'>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
-    </controller>
-    <controller type='scsi' index='2'>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
-    </controller>
-    <controller type='scsi' index='3'>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
-    </controller>
-    <input type='mouse' bus='ps2'/>
-    <input type='keyboard' bus='ps2'/>
-    <memballoon model='none'/>
-  </devices>
-  <seclabel type='none' model='none'/>
-</domain>
-- 
2.7.4 (Apple Git-66)




More information about the libvir-list mailing list