diff --git a/tests/qemuhotplugtest.c b/tests/qemuhotplugtest.c
index 447fb75fd6..5eb34c04b3 100644
--- a/tests/qemuhotplugtest.c
+++ b/tests/qemuhotplugtest.c
@@ -94,6 +94,9 @@ qemuHotplugCreateObjects(virDomainXMLOptionPtr xmlopt,
(*vm)->def->id = QEMU_HOTPLUG_TEST_DOMAIN_ID;
+ if (qemuDomainSetPrivatePaths(&driver, *vm) < 0)
+ goto cleanup;
+
ret = 0;
cleanup:
return ret;
@@ -179,7 +182,6 @@ testQemuHotplugCheckResult(virDomainObjPtr vm,
char *actual;
int ret;
- vm->def->id = -1;
actual = virDomainDefFormat(vm->def, driver.caps,
VIR_DOMAIN_DEF_FORMAT_SECURE);
if (!actual)
@@ -426,62 +428,62 @@ mymain(void)
/* Strange huh? Currently, only graphics can be updated :-P */
DO_TEST_UPDATE("disk-cdrom", "disk-cdrom-nochange", true, false, NULL);
- DO_TEST_ATTACH("console-compat-2", "console-virtio", false, true,
+ DO_TEST_ATTACH("console-compat-2-live", "console-virtio", false, true,
"chardev-add", "{\"return\": {\"pty\": \"/dev/pts/26\"}}",
"device_add", QMP_OK);
- DO_TEST_DETACH("console-compat-2", "console-virtio", false, false,
+ DO_TEST_DETACH("console-compat-2-live", "console-virtio", false, false,
"device_del", QMP_OK,
"chardev-remove", QMP_OK);
- DO_TEST_ATTACH("hotplug-base", "disk-virtio", false, true,
+ DO_TEST_ATTACH("hotplug-base-live", "disk-virtio", false, true,
"human-monitor-command", HMP("OK\\r\\n"),
"device_add", QMP_OK);
- DO_TEST_DETACH("hotplug-base", "disk-virtio", false, false,
+ DO_TEST_DETACH("hotplug-base-live", "disk-virtio", false, false,
"device_del", QMP_OK,
"human-monitor-command", HMP(""));
- DO_TEST_ATTACH_EVENT("hotplug-base", "disk-virtio", false, true,
+ DO_TEST_ATTACH_EVENT("hotplug-base-live", "disk-virtio", false, true,
"human-monitor-command", HMP("OK\\r\\n"),
"device_add", QMP_OK);
- DO_TEST_DETACH("hotplug-base", "disk-virtio", true, true,
+ DO_TEST_DETACH("hotplug-base-live", "disk-virtio", true, true,
"device_del", QMP_OK,
"human-monitor-command", HMP(""));
- DO_TEST_DETACH("hotplug-base", "disk-virtio", false, false,
+ DO_TEST_DETACH("hotplug-base-live", "disk-virtio", false, false,
"device_del", QMP_DEVICE_DELETED("virtio-disk4") QMP_OK,
"human-monitor-command", HMP(""));
- DO_TEST_ATTACH("hotplug-base", "disk-usb", false, true,
+ DO_TEST_ATTACH("hotplug-base-live", "disk-usb", false, true,
"human-monitor-command", HMP("OK\\r\\n"),
"device_add", QMP_OK);
- DO_TEST_DETACH("hotplug-base", "disk-usb", false, false,
+ DO_TEST_DETACH("hotplug-base-live", "disk-usb", false, false,
"device_del", QMP_OK,
"human-monitor-command", HMP(""));
- DO_TEST_ATTACH_EVENT("hotplug-base", "disk-usb", false, true,
+ DO_TEST_ATTACH_EVENT("hotplug-base-live", "disk-usb", false, true,
"human-monitor-command", HMP("OK\\r\\n"),
"device_add", QMP_OK);
- DO_TEST_DETACH("hotplug-base", "disk-usb", true, true,
+ DO_TEST_DETACH("hotplug-base-live", "disk-usb", true, true,
"device_del", QMP_OK,
"human-monitor-command", HMP(""));
- DO_TEST_DETACH("hotplug-base", "disk-usb", false, false,
+ DO_TEST_DETACH("hotplug-base-live", "disk-usb", false, false,
"device_del", QMP_DEVICE_DELETED("usb-disk16") QMP_OK,
"human-monitor-command", HMP(""));
- DO_TEST_ATTACH("hotplug-base", "disk-scsi", false, true,
+ DO_TEST_ATTACH("hotplug-base-live", "disk-scsi", false, true,
"human-monitor-command", HMP("OK\\r\\n"),
"device_add", QMP_OK);
- DO_TEST_DETACH("hotplug-base", "disk-scsi", false, false,
+ DO_TEST_DETACH("hotplug-base-live", "disk-scsi", false, false,
"device_del", QMP_OK,
"human-monitor-command", HMP(""));
- DO_TEST_ATTACH_EVENT("hotplug-base", "disk-scsi", false, true,
+ DO_TEST_ATTACH_EVENT("hotplug-base-live", "disk-scsi", false, true,
"human-monitor-command", HMP("OK\\r\\n"),
"device_add", QMP_OK);
- DO_TEST_DETACH("hotplug-base", "disk-scsi", true, true,
+ DO_TEST_DETACH("hotplug-base-live", "disk-scsi", true, true,
"device_del", QMP_OK,
"human-monitor-command", HMP(""));
- DO_TEST_DETACH("hotplug-base", "disk-scsi", false, false,
+ DO_TEST_DETACH("hotplug-base-live", "disk-scsi", false, false,
"device_del", QMP_DEVICE_DELETED("scsi0-0-0-5") QMP_OK,
"human-monitor-command", HMP(""));
diff --git a/tests/qemuhotplugtestdata/qemuhotplug-console-compat-2-live+console-virtio.xml b/tests/qemuhotplugtestdata/qemuhotplug-console-compat-2-live+console-virtio.xml
new file mode 100644
index 0000000000..3495ee67b4
--- /dev/null
+++ b/tests/qemuhotplugtestdata/qemuhotplug-console-compat-2-live+console-virtio.xml
@@ -0,0 +1,130 @@
+
+ f17
+ a1cd52eb-d37f-4717-fc6e-972f0774f4c9
+ 1048576
+ 1048576
+ 1
+
+ /machine
+
+
+ hvm
+
+
+
+
+
+
+
+
+ destroy
+ restart
+ restart
+
+
+
+
+
+ /usr/bin/qemu-system-x86_64
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qemuhotplugtestdata/qemuhotplug-hotplug-base+disk-scsi.xml b/tests/qemuhotplugtestdata/qemuhotplug-hotplug-base-live+disk-scsi.xml
similarity index 73%
rename from tests/qemuhotplugtestdata/qemuhotplug-hotplug-base+disk-scsi.xml
rename to tests/qemuhotplugtestdata/qemuhotplug-hotplug-base-live+disk-scsi.xml
index cc970e9b3e..2fbdee472f 100644
--- a/tests/qemuhotplugtestdata/qemuhotplug-hotplug-base+disk-scsi.xml
+++ b/tests/qemuhotplugtestdata/qemuhotplug-hotplug-base-live+disk-scsi.xml
@@ -1,4 +1,4 @@
-
+
hotplug
d091ea82-29e6-2e34-3005-f02617b36e87
4194304
@@ -22,27 +22,41 @@
+
+
+
+
+
-
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
diff --git a/tests/qemuhotplugtestdata/qemuhotplug-hotplug-base+disk-usb.xml b/tests/qemuhotplugtestdata/qemuhotplug-hotplug-base-live+disk-usb.xml
similarity index 72%
rename from tests/qemuhotplugtestdata/qemuhotplug-hotplug-base+disk-usb.xml
rename to tests/qemuhotplugtestdata/qemuhotplug-hotplug-base-live+disk-usb.xml
index edd04ed01b..41039a48c3 100644
--- a/tests/qemuhotplugtestdata/qemuhotplug-hotplug-base+disk-usb.xml
+++ b/tests/qemuhotplugtestdata/qemuhotplug-hotplug-base-live+disk-usb.xml
@@ -1,4 +1,4 @@
-
+
hotplug
d091ea82-29e6-2e34-3005-f02617b36e87
4194304
@@ -22,26 +22,40 @@
+
+
+
+
+
-
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
diff --git a/tests/qemuhotplugtestdata/qemuhotplug-hotplug-base+disk-virtio.xml b/tests/qemuhotplugtestdata/qemuhotplug-hotplug-base-live+disk-virtio.xml
similarity index 73%
rename from tests/qemuhotplugtestdata/qemuhotplug-hotplug-base+disk-virtio.xml
rename to tests/qemuhotplugtestdata/qemuhotplug-hotplug-base-live+disk-virtio.xml
index b8a9c58bbd..8954fb5898 100644
--- a/tests/qemuhotplugtestdata/qemuhotplug-hotplug-base+disk-virtio.xml
+++ b/tests/qemuhotplugtestdata/qemuhotplug-hotplug-base-live+disk-virtio.xml
@@ -1,4 +1,4 @@
-
+
hotplug
d091ea82-29e6-2e34-3005-f02617b36e87
4194304
@@ -22,27 +22,41 @@
+
+
+
+
+
-
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
diff --git a/tests/qemuhotplugtestdata/qemuhotplug-console-compat-2+console-virtio.xml b/tests/qemuxml2argvdata/qemuxml2argv-console-compat-2-live.xml
similarity index 80%
rename from tests/qemuhotplugtestdata/qemuhotplug-console-compat-2+console-virtio.xml
rename to tests/qemuxml2argvdata/qemuxml2argv-console-compat-2-live.xml
index a2796ecdbb..b36af270c3 100644
--- a/tests/qemuhotplugtestdata/qemuhotplug-console-compat-2+console-virtio.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-console-compat-2-live.xml
@@ -1,4 +1,4 @@
-
+
f17
a1cd52eb-d37f-4717-fc6e-972f0774f4c9
1048576
@@ -29,24 +29,33 @@
+
+
+
+
+
+
-
+
+
+
+
@@ -57,44 +66,56 @@
+
+
+
+
-
-
-
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-hotplug-base-live.xml b/tests/qemuxml2argvdata/qemuxml2argv-hotplug-base-live.xml
new file mode 100644
index 0000000000..3f14e70a1b
--- /dev/null
+++ b/tests/qemuxml2argvdata/qemuxml2argv-hotplug-base-live.xml
@@ -0,0 +1,52 @@
+
+ hotplug
+ d091ea82-29e6-2e34-3005-f02617b36e87
+ 4194304
+ 4194304
+ 4
+
+ hvm
+
+
+
+
+
+
+
+
+ destroy
+ restart
+ restart
+
+ /usr/libexec/qemu-kvm
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+