From 36d9965af08d2be7ff57d2be5a2a308d8d617e6f Mon Sep 17 00:00:00 2001 From: Marc Hartmayer Date: Wed, 30 Nov 2016 12:47:05 +0100 Subject: [PATCH] tests: add test cases for address conflicts Add test cases for address conflicts between disks and hostdevs that are using drive addresses. Signed-off-by: Marc Hartmayer Reviewed-by: Boris Fiuczynski --- ...muxml2argv-disk-drive-address-conflict.xml | 27 +++++++++++++++ ...rgv-disk-hostdev-scsi-address-conflict.xml | 30 +++++++++++++++++ ...l2argv-hostdevs-drive-address-conflict.xml | 33 +++++++++++++++++++ tests/qemuxml2argvtest.c | 8 +++++ 4 files changed, 98 insertions(+) create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-drive-address-conflict.xml create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-hostdev-scsi-address-conflict.xml create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-hostdevs-drive-address-conflict.xml diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-address-conflict.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-address-conflict.xml new file mode 100644 index 0000000000..83426ab812 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-address-conflict.xml @@ -0,0 +1,27 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219136 + 219136 + 1 + + hvm + + + + destroy + restart + destroy + + /usr/bin/qemu + + + + + + + +
+ + + diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-hostdev-scsi-address-conflict.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-hostdev-scsi-address-conflict.xml new file mode 100644 index 0000000000..b38ad954e8 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-hostdev-scsi-address-conflict.xml @@ -0,0 +1,30 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219136 + 219136 + 1 + + hvm + + + + destroy + restart + destroy + + /usr/bin/qemu + + + + + + + +
+ +
+ + + + diff --git a/tests/qemuxml2argvdata/qemuxml2argv-hostdevs-drive-address-conflict.xml b/tests/qemuxml2argvdata/qemuxml2argv-hostdevs-drive-address-conflict.xml new file mode 100644 index 0000000000..00ac498df2 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-hostdevs-drive-address-conflict.xml @@ -0,0 +1,33 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219136 + 219136 + 1 + + hvm + + + + destroy + restart + destroy + + /usr/bin/qemu + + + +
+ +
+ + + + +
+ +
+ + + + diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index d12077c6ac..cd2c4a133b 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -975,6 +975,14 @@ mymain(void) DO_TEST_PARSE_ERROR("disk-same-targets", QEMU_CAPS_SCSI_LSI, QEMU_CAPS_DEVICE_USB_STORAGE, QEMU_CAPS_NODEFCONFIG); + DO_TEST_PARSE_ERROR("disk-drive-address-conflict", + QEMU_CAPS_ICH9_AHCI); + DO_TEST_PARSE_ERROR("disk-hostdev-scsi-address-conflict", + QEMU_CAPS_VIRTIO_SCSI, + QEMU_CAPS_DEVICE_SCSI_GENERIC); + DO_TEST_PARSE_ERROR("hostdevs-drive-address-conflict", + QEMU_CAPS_VIRTIO_SCSI, + QEMU_CAPS_DEVICE_SCSI_GENERIC); DO_TEST("event_idx", QEMU_CAPS_VIRTIO_BLK_EVENT_IDX, QEMU_CAPS_VIRTIO_NET_EVENT_IDX, -- GitLab