1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-23 21:34:54 +03:00

tests: Use the new DO_TEST_CAPS_*() macros

There are probably more situations where they could be taken
advantage of, but these are very obvious scenarios because we
either manage to get rid of a bunch of explicit capabilities,
or we make a bunch of related test cases all use the macros
by switching the only odd one out.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Andrea Bolognani 2019-07-02 16:36:55 +02:00
parent 5a050f0191
commit 8033b4dec4

View File

@ -2848,7 +2848,7 @@ mymain(void)
DO_TEST_CAPS_LATEST("intel-iommu-caching-mode");
DO_TEST_CAPS_LATEST("intel-iommu-eim");
DO_TEST_CAPS_LATEST("intel-iommu-device-iotlb");
DO_TEST_PARSE_ERROR("intel-iommu-wrong-machine", NONE);
DO_TEST_CAPS_LATEST_PARSE_ERROR("intel-iommu-wrong-machine");
DO_TEST_CAPS_ARCH_LATEST("iommu-smmuv3", "aarch64");
DO_TEST("cpu-hotplug-startup", QEMU_CAPS_QUERY_HOTPLUGGABLE_CPUS);
@ -2914,29 +2914,9 @@ mymain(void)
DO_TEST_CAPS_LATEST("disk-virtio-scsi-reservations");
DO_TEST_CAPS_LATEST("tseg-explicit-size");
DO_TEST_PARSE_ERROR("tseg-i440fx",
QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE,
QEMU_CAPS_DEVICE_PCI_BRIDGE,
QEMU_CAPS_DEVICE_IOH3420,
QEMU_CAPS_ICH9_AHCI,
QEMU_CAPS_MACHINE_SMM_OPT,
QEMU_CAPS_VIRTIO_SCSI,
QEMU_CAPS_MCH_EXTENDED_TSEG_MBYTES);
DO_TEST_PARSE_ERROR("tseg-explicit-size",
QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE,
QEMU_CAPS_DEVICE_PCI_BRIDGE,
QEMU_CAPS_DEVICE_IOH3420,
QEMU_CAPS_ICH9_AHCI,
QEMU_CAPS_MACHINE_SMM_OPT,
QEMU_CAPS_VIRTIO_SCSI);
DO_TEST_PARSE_ERROR("tseg-invalid-size",
QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE,
QEMU_CAPS_DEVICE_PCI_BRIDGE,
QEMU_CAPS_DEVICE_IOH3420,
QEMU_CAPS_ICH9_AHCI,
QEMU_CAPS_MACHINE_SMM_OPT,
QEMU_CAPS_VIRTIO_SCSI,
QEMU_CAPS_MCH_EXTENDED_TSEG_MBYTES);
DO_TEST_CAPS_LATEST_PARSE_ERROR("tseg-i440fx");
DO_TEST_CAPS_VER_PARSE_ERROR("tseg-explicit-size", "2.10.0");
DO_TEST_CAPS_LATEST_PARSE_ERROR("tseg-invalid-size");
DO_TEST("video-virtio-gpu-ccw", QEMU_CAPS_CCW,
QEMU_CAPS_DEVICE_VIRTIO_GPU,
@ -2970,10 +2950,7 @@ mymain(void)
DO_TEST_CAPS_VER("virtio-non-transitional", "3.1.0");
DO_TEST_CAPS_LATEST("virtio-transitional");
DO_TEST_CAPS_LATEST("virtio-non-transitional");
DO_TEST_PARSE_ERROR("virtio-transitional-not-supported",
QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE,
QEMU_CAPS_DEVICE_PCI_BRIDGE,
QEMU_CAPS_DEVICE_IOH3420);
DO_TEST_CAPS_LATEST_PARSE_ERROR("virtio-transitional-not-supported");
/* Simple headless guests for various architectures */
DO_TEST_CAPS_ARCH_LATEST("aarch64-virt-headless", "aarch64");