diff --git a/tests/qemuhotplugtest.c b/tests/qemuhotplugtest.c index 91bf331c97..ae57c0af0e 100644 --- a/tests/qemuhotplugtest.c +++ b/tests/qemuhotplugtest.c @@ -487,6 +487,35 @@ mymain(void) "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, + /* Four controllers added */ + "device_add", QMP_OK, + "device_add", QMP_OK, + "device_add", QMP_OK, + "device_add", QMP_OK, + "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, + "device_del", QMP_OK, + "human-monitor-command", HMP("")); + + DO_TEST_ATTACH_EVENT("hotplug-base-without-scsi-controller-live", "disk-scsi-2", false, true, + /* Four controllers added */ + "device_add", QMP_OK, + "device_add", QMP_OK, + "device_add", QMP_OK, + "device_add", QMP_OK, + "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, + "device_del", QMP_OK, + "human-monitor-command", HMP("")); + DO_TEST_DETACH("hotplug-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, "chardev-add", QMP_OK, "device_add", QMP_OK); diff --git a/tests/qemuhotplugtestdata/qemuhotplug-disk-scsi-2.xml b/tests/qemuhotplugtestdata/qemuhotplug-disk-scsi-2.xml new file mode 100644 index 0000000000..3a847fbda6 --- /dev/null +++ b/tests/qemuhotplugtestdata/qemuhotplug-disk-scsi-2.xml @@ -0,0 +1,8 @@ + + + + +
+ + + diff --git a/tests/qemuhotplugtestdata/qemuhotplug-hotplug-base-with-scsi-controller-live+disk-scsi-2.xml b/tests/qemuhotplugtestdata/qemuhotplug-hotplug-base-with-scsi-controller-live+disk-scsi-2.xml new file mode 100644 index 0000000000..b2c9a073a8 --- /dev/null +++ b/tests/qemuhotplugtestdata/qemuhotplug-hotplug-base-with-scsi-controller-live+disk-scsi-2.xml @@ -0,0 +1,51 @@ + + hotplug + d091ea82-29e6-2e34-3005-f02617b36e87 + 4194304 + 4194304 + 4 + + hvm + + + + + + + + + destroy + restart + restart + + /usr/libexec/qemu-kvm + + + + + + +
+ + +
+ + + +
+ + +
+ + +
+ + +
+ + + + + + + diff --git a/tests/qemuhotplugtestdata/qemuhotplug-hotplug-base-without-scsi-controller-live+disk-scsi-2.xml b/tests/qemuhotplugtestdata/qemuhotplug-hotplug-base-without-scsi-controller-live+disk-scsi-2.xml new file mode 100644 index 0000000000..2b11f21516 --- /dev/null +++ b/tests/qemuhotplugtestdata/qemuhotplug-hotplug-base-without-scsi-controller-live+disk-scsi-2.xml @@ -0,0 +1,66 @@ + + hotplug + d091ea82-29e6-2e34-3005-f02617b36e87 + 4194304 + 4194304 + 4 + + hvm + + + + + + + + + destroy + restart + restart + + /usr/libexec/qemu-kvm + + + + + + + + +
+ + + +
+ + + + + + +
+ + + +
+ + + +
+ + + +
+ + + + + + + + + + + + + diff --git a/tests/qemuxml2argvdata/qemuxml2argv-hotplug-base-with-scsi-controller-live.xml b/tests/qemuxml2argvdata/qemuxml2argv-hotplug-base-with-scsi-controller-live.xml new file mode 100644 index 0000000000..b2ea144389 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-hotplug-base-with-scsi-controller-live.xml @@ -0,0 +1,56 @@ + + hotplug + d091ea82-29e6-2e34-3005-f02617b36e87 + 4194304 + 4194304 + 4 + + hvm + + + + + + + + + destroy + restart + restart + + /usr/libexec/qemu-kvm + + +
+ + + + + + +
+ + + +
+ + + +
+ + + +
+ + + + + + + + + + + + + diff --git a/tests/qemuxml2argvdata/qemuxml2argv-hotplug-base-without-scsi-controller-live.xml b/tests/qemuxml2argvdata/qemuxml2argv-hotplug-base-without-scsi-controller-live.xml new file mode 100644 index 0000000000..66bc2af239 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-hotplug-base-without-scsi-controller-live.xml @@ -0,0 +1,40 @@ + + hotplug + d091ea82-29e6-2e34-3005-f02617b36e87 + 4194304 + 4194304 + 4 + + hvm + + + + + + + + + destroy + restart + restart + + /usr/libexec/qemu-kvm + + +
+ + + + + + + + + + + + + + + +