From fe6816eb93e65954a54df06de1f8423834fbd6ac Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Tue, 21 Sep 2021 19:14:19 +0200 Subject: [PATCH] qemuxml2argvtest: Use DO_TEST_CAPS_LATEST_PARSE_ERROR for disk cases MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Convert all the disk-related negative cases to use 'latest' capabilities. The checks are mostly related to validation so using real capabilities doesn't influence the outcome. Signed-off-by: Peter Krempa Reviewed-by: Ján Tomko --- ...> disk-address-conflict.x86_64-latest.err} | 0 ...device-lun-type-invalid.x86_64-latest.err} | 0 ...dc-incompatible-address.x86_64-latest.err} | 0 ...cow.err => disk-fmt-cow.x86_64-latest.err} | 0 ...dir.err => disk-fmt-dir.x86_64-latest.err} | 0 ...iso.err => disk-fmt-iso.x86_64-latest.err} | 0 ...v-scsi-address-conflict.x86_64-latest.err} | 0 ...de-incompatible-address.x86_64-latest.err} | 0 ...-missing-target-invalid.x86_64-latest.err} | 0 ...auth-secrettype-invalid.x86_64-latest.err} | 0 ...i-auth-wrong-secrettype.x86_64-latest.err} | 0 ...etwork-source-auth-both.x86_64-latest.err} | 0 ...rr => disk-same-targets.x86_64-latest.err} | 0 ...ta-incompatible-address.x86_64-latest.err} | 0 ...si-disk-vpd-build-error.x86_64-latest.err} | 0 ...si-incompatible-address.x86_64-latest.err} | 0 ...err => disk-shared-qcow.x86_64-latest.err} | 0 ...pci.err => disk-usb-pci.x86_64-latest.err} | 0 ...-drive-address-conflict.x86_64-latest.err} | 0 tests/qemuxml2argvtest.c | 48 ++++++++----------- 20 files changed, 19 insertions(+), 29 deletions(-) rename tests/qemuxml2argvdata/{disk-address-conflict.err => disk-address-conflict.x86_64-latest.err} (100%) rename tests/qemuxml2argvdata/{disk-device-lun-type-invalid.err => disk-device-lun-type-invalid.x86_64-latest.err} (100%) rename tests/qemuxml2argvdata/{disk-fdc-incompatible-address.err => disk-fdc-incompatible-address.x86_64-latest.err} (100%) rename tests/qemuxml2argvdata/{disk-fmt-cow.err => disk-fmt-cow.x86_64-latest.err} (100%) rename tests/qemuxml2argvdata/{disk-fmt-dir.err => disk-fmt-dir.x86_64-latest.err} (100%) rename tests/qemuxml2argvdata/{disk-fmt-iso.err => disk-fmt-iso.x86_64-latest.err} (100%) rename tests/qemuxml2argvdata/{disk-hostdev-scsi-address-conflict.err => disk-hostdev-scsi-address-conflict.x86_64-latest.err} (100%) rename tests/qemuxml2argvdata/{disk-ide-incompatible-address.err => disk-ide-incompatible-address.x86_64-latest.err} (100%) rename tests/qemuxml2argvdata/{disk-missing-target-invalid.err => disk-missing-target-invalid.x86_64-latest.err} (100%) rename tests/qemuxml2argvdata/{disk-network-iscsi-auth-secrettype-invalid.err => disk-network-iscsi-auth-secrettype-invalid.x86_64-latest.err} (100%) rename tests/qemuxml2argvdata/{disk-network-iscsi-auth-wrong-secrettype.err => disk-network-iscsi-auth-wrong-secrettype.x86_64-latest.err} (100%) rename tests/qemuxml2argvdata/{disk-network-source-auth-both.err => disk-network-source-auth-both.x86_64-latest.err} (100%) rename tests/qemuxml2argvdata/{disk-same-targets.err => disk-same-targets.x86_64-latest.err} (100%) rename tests/qemuxml2argvdata/{disk-sata-incompatible-address.err => disk-sata-incompatible-address.x86_64-latest.err} (100%) rename tests/qemuxml2argvdata/{disk-scsi-disk-vpd-build-error.err => disk-scsi-disk-vpd-build-error.x86_64-latest.err} (100%) rename tests/qemuxml2argvdata/{disk-scsi-incompatible-address.err => disk-scsi-incompatible-address.x86_64-latest.err} (100%) rename tests/qemuxml2argvdata/{disk-shared-qcow.err => disk-shared-qcow.x86_64-latest.err} (100%) rename tests/qemuxml2argvdata/{disk-usb-pci.err => disk-usb-pci.x86_64-latest.err} (100%) rename tests/qemuxml2argvdata/{hostdevs-drive-address-conflict.err => hostdevs-drive-address-conflict.x86_64-latest.err} (100%) diff --git a/tests/qemuxml2argvdata/disk-address-conflict.err b/tests/qemuxml2argvdata/disk-address-conflict.x86_64-latest.err similarity index 100% rename from tests/qemuxml2argvdata/disk-address-conflict.err rename to tests/qemuxml2argvdata/disk-address-conflict.x86_64-latest.err diff --git a/tests/qemuxml2argvdata/disk-device-lun-type-invalid.err b/tests/qemuxml2argvdata/disk-device-lun-type-invalid.x86_64-latest.err similarity index 100% rename from tests/qemuxml2argvdata/disk-device-lun-type-invalid.err rename to tests/qemuxml2argvdata/disk-device-lun-type-invalid.x86_64-latest.err diff --git a/tests/qemuxml2argvdata/disk-fdc-incompatible-address.err b/tests/qemuxml2argvdata/disk-fdc-incompatible-address.x86_64-latest.err similarity index 100% rename from tests/qemuxml2argvdata/disk-fdc-incompatible-address.err rename to tests/qemuxml2argvdata/disk-fdc-incompatible-address.x86_64-latest.err diff --git a/tests/qemuxml2argvdata/disk-fmt-cow.err b/tests/qemuxml2argvdata/disk-fmt-cow.x86_64-latest.err similarity index 100% rename from tests/qemuxml2argvdata/disk-fmt-cow.err rename to tests/qemuxml2argvdata/disk-fmt-cow.x86_64-latest.err diff --git a/tests/qemuxml2argvdata/disk-fmt-dir.err b/tests/qemuxml2argvdata/disk-fmt-dir.x86_64-latest.err similarity index 100% rename from tests/qemuxml2argvdata/disk-fmt-dir.err rename to tests/qemuxml2argvdata/disk-fmt-dir.x86_64-latest.err diff --git a/tests/qemuxml2argvdata/disk-fmt-iso.err b/tests/qemuxml2argvdata/disk-fmt-iso.x86_64-latest.err similarity index 100% rename from tests/qemuxml2argvdata/disk-fmt-iso.err rename to tests/qemuxml2argvdata/disk-fmt-iso.x86_64-latest.err diff --git a/tests/qemuxml2argvdata/disk-hostdev-scsi-address-conflict.err b/tests/qemuxml2argvdata/disk-hostdev-scsi-address-conflict.x86_64-latest.err similarity index 100% rename from tests/qemuxml2argvdata/disk-hostdev-scsi-address-conflict.err rename to tests/qemuxml2argvdata/disk-hostdev-scsi-address-conflict.x86_64-latest.err diff --git a/tests/qemuxml2argvdata/disk-ide-incompatible-address.err b/tests/qemuxml2argvdata/disk-ide-incompatible-address.x86_64-latest.err similarity index 100% rename from tests/qemuxml2argvdata/disk-ide-incompatible-address.err rename to tests/qemuxml2argvdata/disk-ide-incompatible-address.x86_64-latest.err diff --git a/tests/qemuxml2argvdata/disk-missing-target-invalid.err b/tests/qemuxml2argvdata/disk-missing-target-invalid.x86_64-latest.err similarity index 100% rename from tests/qemuxml2argvdata/disk-missing-target-invalid.err rename to tests/qemuxml2argvdata/disk-missing-target-invalid.x86_64-latest.err diff --git a/tests/qemuxml2argvdata/disk-network-iscsi-auth-secrettype-invalid.err b/tests/qemuxml2argvdata/disk-network-iscsi-auth-secrettype-invalid.x86_64-latest.err similarity index 100% rename from tests/qemuxml2argvdata/disk-network-iscsi-auth-secrettype-invalid.err rename to tests/qemuxml2argvdata/disk-network-iscsi-auth-secrettype-invalid.x86_64-latest.err diff --git a/tests/qemuxml2argvdata/disk-network-iscsi-auth-wrong-secrettype.err b/tests/qemuxml2argvdata/disk-network-iscsi-auth-wrong-secrettype.x86_64-latest.err similarity index 100% rename from tests/qemuxml2argvdata/disk-network-iscsi-auth-wrong-secrettype.err rename to tests/qemuxml2argvdata/disk-network-iscsi-auth-wrong-secrettype.x86_64-latest.err diff --git a/tests/qemuxml2argvdata/disk-network-source-auth-both.err b/tests/qemuxml2argvdata/disk-network-source-auth-both.x86_64-latest.err similarity index 100% rename from tests/qemuxml2argvdata/disk-network-source-auth-both.err rename to tests/qemuxml2argvdata/disk-network-source-auth-both.x86_64-latest.err diff --git a/tests/qemuxml2argvdata/disk-same-targets.err b/tests/qemuxml2argvdata/disk-same-targets.x86_64-latest.err similarity index 100% rename from tests/qemuxml2argvdata/disk-same-targets.err rename to tests/qemuxml2argvdata/disk-same-targets.x86_64-latest.err diff --git a/tests/qemuxml2argvdata/disk-sata-incompatible-address.err b/tests/qemuxml2argvdata/disk-sata-incompatible-address.x86_64-latest.err similarity index 100% rename from tests/qemuxml2argvdata/disk-sata-incompatible-address.err rename to tests/qemuxml2argvdata/disk-sata-incompatible-address.x86_64-latest.err diff --git a/tests/qemuxml2argvdata/disk-scsi-disk-vpd-build-error.err b/tests/qemuxml2argvdata/disk-scsi-disk-vpd-build-error.x86_64-latest.err similarity index 100% rename from tests/qemuxml2argvdata/disk-scsi-disk-vpd-build-error.err rename to tests/qemuxml2argvdata/disk-scsi-disk-vpd-build-error.x86_64-latest.err diff --git a/tests/qemuxml2argvdata/disk-scsi-incompatible-address.err b/tests/qemuxml2argvdata/disk-scsi-incompatible-address.x86_64-latest.err similarity index 100% rename from tests/qemuxml2argvdata/disk-scsi-incompatible-address.err rename to tests/qemuxml2argvdata/disk-scsi-incompatible-address.x86_64-latest.err diff --git a/tests/qemuxml2argvdata/disk-shared-qcow.err b/tests/qemuxml2argvdata/disk-shared-qcow.x86_64-latest.err similarity index 100% rename from tests/qemuxml2argvdata/disk-shared-qcow.err rename to tests/qemuxml2argvdata/disk-shared-qcow.x86_64-latest.err diff --git a/tests/qemuxml2argvdata/disk-usb-pci.err b/tests/qemuxml2argvdata/disk-usb-pci.x86_64-latest.err similarity index 100% rename from tests/qemuxml2argvdata/disk-usb-pci.err rename to tests/qemuxml2argvdata/disk-usb-pci.x86_64-latest.err diff --git a/tests/qemuxml2argvdata/hostdevs-drive-address-conflict.err b/tests/qemuxml2argvdata/hostdevs-drive-address-conflict.x86_64-latest.err similarity index 100% rename from tests/qemuxml2argvdata/hostdevs-drive-address-conflict.err rename to tests/qemuxml2argvdata/hostdevs-drive-address-conflict.x86_64-latest.err diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 39de7656e7..823270966e 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1324,12 +1324,12 @@ mymain(void) DO_TEST_CAPS_VER("disk-readonly-disk", "2.12.0"); DO_TEST_CAPS_LATEST("disk-readonly-disk"); DO_TEST_NOCAPS("disk-fmt-qcow"); - DO_TEST_PARSE_ERROR_NOCAPS("disk-fmt-cow"); - DO_TEST_PARSE_ERROR_NOCAPS("disk-fmt-dir"); - DO_TEST_PARSE_ERROR_NOCAPS("disk-fmt-iso"); + DO_TEST_CAPS_LATEST_PARSE_ERROR("disk-fmt-cow"); + DO_TEST_CAPS_LATEST_PARSE_ERROR("disk-fmt-dir"); + DO_TEST_CAPS_LATEST_PARSE_ERROR("disk-fmt-iso"); DO_TEST_CAPS_VER("disk-shared", "2.12.0"); DO_TEST_CAPS_LATEST("disk-shared"); - DO_TEST_PARSE_ERROR_NOCAPS("disk-shared-qcow"); + DO_TEST_CAPS_LATEST_PARSE_ERROR("disk-shared-qcow"); DO_TEST_CAPS_VER("disk-error-policy", "2.12.0"); DO_TEST_CAPS_LATEST("disk-error-policy"); DO_TEST_CAPS_ARCH_VER("disk-error-policy-s390x", "s390x", "2.12.0"); @@ -1346,9 +1346,9 @@ mymain(void) QEMU_CAPS_SCSI_BLOCK); DO_TEST_CAPS_VER("disk-network-iscsi", "2.12.0"); DO_TEST_CAPS_LATEST("disk-network-iscsi"); - DO_TEST_PARSE_ERROR_NOCAPS("disk-network-iscsi-auth-secrettype-invalid"); - DO_TEST_PARSE_ERROR_NOCAPS("disk-network-iscsi-auth-wrong-secrettype"); - DO_TEST_PARSE_ERROR_NOCAPS("disk-network-source-auth-both"); + DO_TEST_CAPS_LATEST_PARSE_ERROR("disk-network-iscsi-auth-secrettype-invalid"); + DO_TEST_CAPS_LATEST_PARSE_ERROR("disk-network-iscsi-auth-wrong-secrettype"); + DO_TEST_CAPS_LATEST_PARSE_ERROR("disk-network-source-auth-both"); DO_TEST_CAPS_VER("disk-network-gluster", "2.12.0"); DO_TEST_CAPS_LATEST("disk-network-gluster"); DO_TEST_CAPS_VER("disk-network-rbd", "2.12.0"); @@ -1373,16 +1373,14 @@ mymain(void) DO_TEST_NOCAPS("disk-no-boot"); DO_TEST_CAPS_LATEST("disk-nvme"); DO_TEST_CAPS_LATEST("disk-vhostuser"); - DO_TEST_PARSE_ERROR("disk-device-lun-type-invalid", - QEMU_CAPS_VIRTIO_SCSI); + DO_TEST_CAPS_LATEST_PARSE_ERROR("disk-device-lun-type-invalid"); DO_TEST_CAPS_LATEST_PARSE_ERROR("disk-attaching-partition-nosupport"); DO_TEST("disk-usb-device", QEMU_CAPS_DEVICE_USB_STORAGE); DO_TEST("disk-usb-device-removable", QEMU_CAPS_DEVICE_USB_STORAGE, QEMU_CAPS_USB_STORAGE_REMOVABLE); - DO_TEST_PARSE_ERROR("disk-usb-pci", - QEMU_CAPS_DEVICE_USB_STORAGE); + DO_TEST_CAPS_LATEST_PARSE_ERROR("disk-usb-pci"); DO_TEST_CAPS_LATEST("disk-scsi"); DO_TEST_CAPS_LATEST("disk-scsi-device-auto"); DO_TEST("disk-scsi-disk-split", @@ -1391,8 +1389,7 @@ mymain(void) QEMU_CAPS_SCSI_LSI, QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_SCSI_DISK_WWN); DO_TEST("disk-scsi-disk-vpd", QEMU_CAPS_SCSI_LSI, QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_SCSI_DISK_WWN); - DO_TEST_PARSE_ERROR("disk-scsi-disk-vpd-build-error", - QEMU_CAPS_SCSI_LSI, QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_SCSI_DISK_WWN); + DO_TEST_CAPS_LATEST_PARSE_ERROR("disk-scsi-disk-vpd-build-error"); DO_TEST_CAPS_LATEST("controller-virtio-scsi"); DO_TEST("disk-sata-device", QEMU_CAPS_ICH9_AHCI); @@ -1412,16 +1409,11 @@ mymain(void) DO_TEST_CAPS_VER("disk-detect-zeroes", "2.12.0"); DO_TEST_CAPS_LATEST("disk-detect-zeroes"); DO_TEST_NOCAPS("disk-snapshot"); - DO_TEST_PARSE_ERROR("disk-same-targets", - QEMU_CAPS_SCSI_LSI, - QEMU_CAPS_DEVICE_USB_STORAGE); - DO_TEST_PARSE_ERROR("disk-missing-target-invalid", QEMU_CAPS_SCSI_LSI); - DO_TEST_PARSE_ERROR("disk-address-conflict", - QEMU_CAPS_ICH9_AHCI); - DO_TEST_PARSE_ERROR("disk-hostdev-scsi-address-conflict", - QEMU_CAPS_VIRTIO_SCSI); - DO_TEST_PARSE_ERROR("hostdevs-drive-address-conflict", - QEMU_CAPS_VIRTIO_SCSI); + DO_TEST_CAPS_LATEST_PARSE_ERROR("disk-same-targets"); + DO_TEST_CAPS_LATEST_PARSE_ERROR("disk-missing-target-invalid"); + DO_TEST_CAPS_LATEST_PARSE_ERROR("disk-address-conflict"); + DO_TEST_CAPS_LATEST_PARSE_ERROR("disk-hostdev-scsi-address-conflict"); + DO_TEST_CAPS_LATEST_PARSE_ERROR("hostdevs-drive-address-conflict"); DO_TEST("event_idx", QEMU_CAPS_VIRTIO_BLK_EVENT_IDX, QEMU_CAPS_VIRTIO_NET_EVENT_IDX, @@ -1433,12 +1425,10 @@ mymain(void) QEMU_CAPS_SCSI_LSI, QEMU_CAPS_VIRTIO_SCSI); DO_TEST("disk-serial", QEMU_CAPS_KVM); - DO_TEST_PARSE_ERROR_NOCAPS("disk-fdc-incompatible-address"); - DO_TEST_PARSE_ERROR_NOCAPS("disk-ide-incompatible-address"); - 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_CAPS_LATEST_PARSE_ERROR("disk-fdc-incompatible-address"); + DO_TEST_CAPS_LATEST_PARSE_ERROR("disk-ide-incompatible-address"); + DO_TEST_CAPS_LATEST_PARSE_ERROR("disk-sata-incompatible-address"); + DO_TEST_CAPS_LATEST_PARSE_ERROR("disk-scsi-incompatible-address"); DO_TEST_CAPS_VER("disk-backing-chains-index", "2.12.0"); DO_TEST_CAPS_LATEST("disk-backing-chains-index"); DO_TEST_CAPS_VER("disk-backing-chains-noindex", "2.12.0");