From d65781bf061fb6369494b381c908ec2e08b05769 Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Fri, 23 Jun 2017 14:11:25 +0200 Subject: [PATCH] tests: hotplug: Test disks with duplicate WWNs --- tests/qemuhotplugtest.c | 5 ++ .../qemuhotplug-disk-scsi-duplicate-wwn.xml | 8 ++ ...+disk-scsi-wwn+disk-scsi-duplicate-wwn.xml | 74 +++++++++++++++++++ .../qemuhotplug-base-live+disk-scsi-wwn.xml | 63 ++++++++++++++++ 4 files changed, 150 insertions(+) create mode 100644 tests/qemuhotplugtestdevices/qemuhotplug-disk-scsi-duplicate-wwn.xml create mode 100644 tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-scsi-wwn+disk-scsi-duplicate-wwn.xml create mode 100644 tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-scsi-wwn.xml diff --git a/tests/qemuhotplugtest.c b/tests/qemuhotplugtest.c index fe97fd0dc3..79f0326905 100644 --- a/tests/qemuhotplugtest.c +++ b/tests/qemuhotplugtest.c @@ -76,6 +76,7 @@ qemuHotplugCreateObjects(virDomainXMLOptionPtr xmlopt, virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_VIRTIO_CCW); virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_DEVICE_IVSHMEM_PLAIN); virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_DEVICE_IVSHMEM_DOORBELL); + virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_SCSI_DISK_WWN); if (event) virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_DEVICE_DEL_EVENT); @@ -809,6 +810,10 @@ mymain(void) DO_TEST_DETACH("base-live", "ivshmem-plain-detach", false, false, "device_del", QMP_OK, "object-del", QMP_OK); + DO_TEST_ATTACH("base-live+disk-scsi-wwn", + "disk-scsi-duplicate-wwn", false, true, + "human-monitor-command", HMP("OK\\r\\n"), + "device_add", QMP_OK); #define DO_TEST_CPU_GROUP(prefix, vcpus, modernhp, expectfail) \ do { \ diff --git a/tests/qemuhotplugtestdevices/qemuhotplug-disk-scsi-duplicate-wwn.xml b/tests/qemuhotplugtestdevices/qemuhotplug-disk-scsi-duplicate-wwn.xml new file mode 100644 index 0000000000..5d09ad973e --- /dev/null +++ b/tests/qemuhotplugtestdevices/qemuhotplug-disk-scsi-duplicate-wwn.xml @@ -0,0 +1,8 @@ + + + + + + + 0x5000c50015ea71aa + diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-scsi-wwn+disk-scsi-duplicate-wwn.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-scsi-wwn+disk-scsi-duplicate-wwn.xml new file mode 100644 index 0000000000..4c3ea3202b --- /dev/null +++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-scsi-wwn+disk-scsi-duplicate-wwn.xml @@ -0,0 +1,74 @@ + + hotplug + d091ea82-29e6-2e34-3005-f02617b36e87 + 4194304 + 4194304 + 4 + + hvm + + + + + + + + + destroy + restart + restart + + /usr/bin/qemu-system-x86_64 + + + + + + + + 0x5000c50015ea71aa + +
+ + + + + + + + + 0x5000c50015ea71aa + +
+ + + +
+ + + +
+ + + +
+ + + + + + +
+ + + + + + + + + + + + + diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-scsi-wwn.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-scsi-wwn.xml new file mode 100644 index 0000000000..0de8656d2b --- /dev/null +++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+disk-scsi-wwn.xml @@ -0,0 +1,63 @@ + + hotplug + d091ea82-29e6-2e34-3005-f02617b36e87 + 4194304 + 4194304 + 4 + + hvm + + + + + + + + + destroy + restart + restart + + /usr/bin/qemu-system-x86_64 + + + + + + + + 0x5000c50015ea71aa + +
+ + + +
+ + + +
+ + + +
+ + + + + + +
+ + + + + + + + + + + + + -- GitLab