From: Marc Hartmayer Date: Tue, 29 Nov 2016 12:11:32 +0000 (+0100) Subject: tests: Add tests for disk configuration validation X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=86fd4e305ed33477fe04112733fda2eaac2cc0b8;p=libvirt.git tests: Add tests for disk configuration validation Add tests for controller based disks to check disk address compatibility with disk bus types. Signed-off-by: Marc Hartmayer Reviewed-by: Boris Fiuczynski Reviewed-by: Bjoern Walk --- diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-fdc-incompatible-address.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-fdc-incompatible-address.xml new file mode 100644 index 0000000000..f4aa6d5843 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-fdc-incompatible-address.xml @@ -0,0 +1,22 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219136 + 1 + + hvm + + + + destroy + restart + destroy + + /usr/bin/qemu + + + +
+ + + diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-ide-incompatible-address.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-ide-incompatible-address.xml new file mode 100644 index 0000000000..9c2c887698 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-ide-incompatible-address.xml @@ -0,0 +1,23 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219136 + 1 + + hvm + + + + destroy + restart + destroy + + /usr/bin/qemu + + + + +
+ + + diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-sata-incompatible-address.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-sata-incompatible-address.xml new file mode 100644 index 0000000000..239e12b9d7 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-sata-incompatible-address.xml @@ -0,0 +1,23 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219136 + 1 + + hvm + + + + destroy + restart + destroy + + /usr/bin/qemu + + + + +
+ + + diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-incompatible-address.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-incompatible-address.xml new file mode 100644 index 0000000000..45b41dadb1 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-incompatible-address.xml @@ -0,0 +1,24 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219136 + 1 + + hvm + + + + destroy + restart + destroy + + /usr/bin/qemu + + + + +
+ + + + diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 81c62ac40b..ab3ad08603 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -995,6 +995,14 @@ mymain(void) DO_TEST("disk-serial", QEMU_CAPS_KVM, QEMU_CAPS_DRIVE_SERIAL); + DO_TEST_PARSE_ERROR("disk-fdc-incompatible-address", + NONE); + DO_TEST_PARSE_ERROR("disk-ide-incompatible-address", + NONE); + DO_TEST_PARSE_ERROR("disk-sata-incompatible-address", + QEMU_CAPS_ICH9_AHCI); + DO_TEST_PARSE_ERROR("disk-scsi-incompatible-address", + QEMU_CAPS_VIRTIO_SCSI); DO_TEST("graphics-vnc", QEMU_CAPS_VNC, QEMU_CAPS_DEVICE_CIRRUS_VGA); DO_TEST("graphics-vnc-socket", QEMU_CAPS_VNC, QEMU_CAPS_DEVICE_CIRRUS_VGA);