Re: [PATCH 2/4] tests: more fine-granular tests for virtio-options

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 4/23/20 3:15 PM, Bjoern Walk wrote:
Add separate tests for individual options and devices for virtio-options
to have the ability to do more fine-granular testing of various
combinations.

Also, add negative tests for unavailable capabilities.

Reviewed-by: Boris Fiuczynski <fiuczy@xxxxxxxxxxxxx>
Signed-off-by: Bjoern Walk <bwalk@xxxxxxxxxxxxx>
---
  .../virtio-options-controller-ats.args        | 32 ++++++
  .../virtio-options-controller-ats.xml         | 38 +++++++
  .../virtio-options-controller-iommu.args      | 34 +++++++
  .../virtio-options-controller-iommu.xml       | 38 +++++++
  .../virtio-options-controller-packed.args     | 32 ++++++
  .../virtio-options-controller-packed.xml      | 38 +++++++
  .../virtio-options-disk-ats.args              | 36 +++++++
  .../virtio-options-disk-ats.xml               | 34 +++++++
  .../virtio-options-disk-iommu.args            | 36 +++++++
  .../virtio-options-disk-iommu.xml             | 34 +++++++
  .../virtio-options-disk-packed.args           | 36 +++++++
  .../virtio-options-disk-packed.xml            | 34 +++++++
  .../virtio-options-fs-ats.args                | 34 +++++++
  .../virtio-options-fs-ats.xml                 | 34 +++++++
  .../virtio-options-fs-iommu.args              | 34 +++++++
  .../virtio-options-fs-iommu.xml               | 34 +++++++
  .../virtio-options-fs-packed.args             | 34 +++++++
  .../virtio-options-fs-packed.xml              | 34 +++++++
  .../virtio-options-input-ats.args             | 30 ++++++
  .../virtio-options-input-ats.xml              | 30 ++++++
  .../virtio-options-input-iommu.args           | 30 ++++++
  .../virtio-options-input-iommu.xml            | 30 ++++++
  .../virtio-options-input-packed.args          | 30 ++++++
  .../virtio-options-input-packed.xml           | 30 ++++++
  .../virtio-options-memballoon-ats.args        | 28 ++++++
  .../virtio-options-memballoon-ats.xml         | 23 +++++
  .../virtio-options-memballoon-iommu.args      | 28 ++++++
  .../virtio-options-memballoon-iommu.xml       | 23 +++++
  .../virtio-options-memballoon-packed.args     | 28 ++++++
  .../virtio-options-memballoon-packed.xml      | 23 +++++
  .../virtio-options-net-ats.args               | 34 +++++++
  .../virtio-options-net-ats.xml                | 34 +++++++
  .../virtio-options-net-iommu.args             | 34 +++++++
  .../virtio-options-net-iommu.xml              | 34 +++++++
  .../virtio-options-net-packed.args            | 34 +++++++
  .../virtio-options-net-packed.xml             | 34 +++++++
  .../virtio-options-rng-ats.args               | 32 ++++++
  .../virtio-options-rng-ats.xml                | 32 ++++++
  .../virtio-options-rng-iommu.args             | 34 +++++++
  .../virtio-options-rng-iommu.xml              | 32 ++++++
  .../virtio-options-rng-packed.args            | 32 ++++++
  .../virtio-options-rng-packed.xml             | 32 ++++++
  .../virtio-options-video-ats.args             | 34 +++++++
  .../virtio-options-video-ats.xml              | 36 +++++++
  .../virtio-options-video-iommu.args           | 34 +++++++
  .../virtio-options-video-iommu.xml            | 36 +++++++
  .../virtio-options-video-packed.args          | 34 +++++++
  .../virtio-options-video-packed.xml           | 36 +++++++
  tests/qemuxml2argvtest.c                      | 99 +++++++++++++++++++
  49 files changed, 1666 insertions(+)
  create mode 100644 tests/qemuxml2argvdata/virtio-options-controller-ats.args
  create mode 100644 tests/qemuxml2argvdata/virtio-options-controller-ats.xml
  create mode 100644 tests/qemuxml2argvdata/virtio-options-controller-iommu.args
  create mode 100644 tests/qemuxml2argvdata/virtio-options-controller-iommu.xml
  create mode 100644 tests/qemuxml2argvdata/virtio-options-controller-packed.args
  create mode 100644 tests/qemuxml2argvdata/virtio-options-controller-packed.xml
  create mode 100644 tests/qemuxml2argvdata/virtio-options-disk-ats.args
  create mode 100644 tests/qemuxml2argvdata/virtio-options-disk-ats.xml
  create mode 100644 tests/qemuxml2argvdata/virtio-options-disk-iommu.args
  create mode 100644 tests/qemuxml2argvdata/virtio-options-disk-iommu.xml
  create mode 100644 tests/qemuxml2argvdata/virtio-options-disk-packed.args
  create mode 100644 tests/qemuxml2argvdata/virtio-options-disk-packed.xml
  create mode 100644 tests/qemuxml2argvdata/virtio-options-fs-ats.args
  create mode 100644 tests/qemuxml2argvdata/virtio-options-fs-ats.xml
  create mode 100644 tests/qemuxml2argvdata/virtio-options-fs-iommu.args
  create mode 100644 tests/qemuxml2argvdata/virtio-options-fs-iommu.xml
  create mode 100644 tests/qemuxml2argvdata/virtio-options-fs-packed.args
  create mode 100644 tests/qemuxml2argvdata/virtio-options-fs-packed.xml
  create mode 100644 tests/qemuxml2argvdata/virtio-options-input-ats.args
  create mode 100644 tests/qemuxml2argvdata/virtio-options-input-ats.xml
  create mode 100644 tests/qemuxml2argvdata/virtio-options-input-iommu.args
  create mode 100644 tests/qemuxml2argvdata/virtio-options-input-iommu.xml
  create mode 100644 tests/qemuxml2argvdata/virtio-options-input-packed.args
  create mode 100644 tests/qemuxml2argvdata/virtio-options-input-packed.xml
  create mode 100644 tests/qemuxml2argvdata/virtio-options-memballoon-ats.args
  create mode 100644 tests/qemuxml2argvdata/virtio-options-memballoon-ats.xml
  create mode 100644 tests/qemuxml2argvdata/virtio-options-memballoon-iommu.args
  create mode 100644 tests/qemuxml2argvdata/virtio-options-memballoon-iommu.xml
  create mode 100644 tests/qemuxml2argvdata/virtio-options-memballoon-packed.args
  create mode 100644 tests/qemuxml2argvdata/virtio-options-memballoon-packed.xml
  create mode 100644 tests/qemuxml2argvdata/virtio-options-net-ats.args
  create mode 100644 tests/qemuxml2argvdata/virtio-options-net-ats.xml
  create mode 100644 tests/qemuxml2argvdata/virtio-options-net-iommu.args
  create mode 100644 tests/qemuxml2argvdata/virtio-options-net-iommu.xml
  create mode 100644 tests/qemuxml2argvdata/virtio-options-net-packed.args
  create mode 100644 tests/qemuxml2argvdata/virtio-options-net-packed.xml
  create mode 100644 tests/qemuxml2argvdata/virtio-options-rng-ats.args
  create mode 100644 tests/qemuxml2argvdata/virtio-options-rng-ats.xml
  create mode 100644 tests/qemuxml2argvdata/virtio-options-rng-iommu.args
  create mode 100644 tests/qemuxml2argvdata/virtio-options-rng-iommu.xml
  create mode 100644 tests/qemuxml2argvdata/virtio-options-rng-packed.args
  create mode 100644 tests/qemuxml2argvdata/virtio-options-rng-packed.xml
  create mode 100644 tests/qemuxml2argvdata/virtio-options-video-ats.args
  create mode 100644 tests/qemuxml2argvdata/virtio-options-video-ats.xml
  create mode 100644 tests/qemuxml2argvdata/virtio-options-video-iommu.args
  create mode 100644 tests/qemuxml2argvdata/virtio-options-video-iommu.xml
  create mode 100644 tests/qemuxml2argvdata/virtio-options-video-packed.args
  create mode 100644 tests/qemuxml2argvdata/virtio-options-video-packed.xml


diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index dffca323..7ceb3aee 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -2982,6 +2982,105 @@ mymain(void)
                          QEMU_CAPS_QUERY_HOTPLUGGABLE_CPUS);
DO_TEST_CAPS_LATEST("virtio-options");
+    DO_TEST("virtio-options-controller-iommu", QEMU_CAPS_VIRTIO_SCSI,
+            QEMU_CAPS_VIRTIO_PCI_IOMMU_PLATFORM);
+    DO_TEST("virtio-options-disk-iommu", QEMU_CAPS_VIRTIO_PCI_IOMMU_PLATFORM);
+    DO_TEST("virtio-options-fs-iommu", QEMU_CAPS_VIRTIO_PCI_IOMMU_PLATFORM);
+    DO_TEST("virtio-options-input-iommu", QEMU_CAPS_VIRTIO_MOUSE,
+            QEMU_CAPS_VIRTIO_KEYBOARD,
+            QEMU_CAPS_VIRTIO_PCI_IOMMU_PLATFORM);
+    DO_TEST("virtio-options-memballoon-iommu",
+            QEMU_CAPS_VIRTIO_PCI_IOMMU_PLATFORM);
+    DO_TEST("virtio-options-net-iommu", QEMU_CAPS_VIRTIO_PCI_IOMMU_PLATFORM);
+    DO_TEST("virtio-options-rng-iommu", QEMU_CAPS_DEVICE_VIRTIO_RNG,
+            QEMU_CAPS_OBJECT_RNG_RANDOM,
+            QEMU_CAPS_VIRTIO_PCI_IOMMU_PLATFORM);
+    DO_TEST("virtio-options-video-iommu", QEMU_CAPS_DEVICE_VIRTIO_GPU,
+            QEMU_CAPS_DEVICE_VIRTIO_GPU,
+            QEMU_CAPS_VIRTIO_GPU_VIRGL,
+            QEMU_CAPS_DEVICE_VIDEO_PRIMARY,
+            QEMU_CAPS_DEVICE_VHOST_USER_GPU,
+            QEMU_CAPS_VIRTIO_PCI_IOMMU_PLATFORM);
+    DO_TEST("virtio-options-controller-ats", QEMU_CAPS_VIRTIO_SCSI,
+            QEMU_CAPS_VIRTIO_PCI_ATS);
+    DO_TEST("virtio-options-disk-ats", QEMU_CAPS_VIRTIO_PCI_ATS);
+    DO_TEST("virtio-options-fs-ats", QEMU_CAPS_VIRTIO_PCI_ATS);
+    DO_TEST("virtio-options-input-ats", QEMU_CAPS_VIRTIO_MOUSE,
+            QEMU_CAPS_VIRTIO_KEYBOARD,
+            QEMU_CAPS_VIRTIO_PCI_ATS);
+    DO_TEST("virtio-options-memballoon-ats",
+            QEMU_CAPS_VIRTIO_PCI_ATS);
+    DO_TEST("virtio-options-net-ats", QEMU_CAPS_VIRTIO_PCI_ATS);
+    DO_TEST("virtio-options-rng-ats", QEMU_CAPS_DEVICE_VIRTIO_RNG,
+            QEMU_CAPS_OBJECT_RNG_RANDOM,
+            QEMU_CAPS_VIRTIO_PCI_ATS);
+    DO_TEST("virtio-options-video-ats", QEMU_CAPS_DEVICE_VIRTIO_GPU,
+            QEMU_CAPS_DEVICE_VIRTIO_GPU,
+            QEMU_CAPS_VIRTIO_GPU_VIRGL,
+            QEMU_CAPS_DEVICE_VIDEO_PRIMARY,
+            QEMU_CAPS_DEVICE_VHOST_USER_GPU,
+            QEMU_CAPS_VIRTIO_PCI_ATS);
+    DO_TEST("virtio-options-controller-packed", QEMU_CAPS_VIRTIO_SCSI,
+            QEMU_CAPS_VIRTIO_PACKED_QUEUES);
+    DO_TEST("virtio-options-disk-packed", QEMU_CAPS_VIRTIO_PACKED_QUEUES);
+    DO_TEST("virtio-options-fs-packed", QEMU_CAPS_VIRTIO_PACKED_QUEUES);
+    DO_TEST("virtio-options-input-packed", QEMU_CAPS_VIRTIO_MOUSE,
+            QEMU_CAPS_VIRTIO_KEYBOARD,
+            QEMU_CAPS_VIRTIO_PACKED_QUEUES);
+    DO_TEST("virtio-options-memballoon-packed",
+            QEMU_CAPS_VIRTIO_PACKED_QUEUES);
+    DO_TEST("virtio-options-net-packed", QEMU_CAPS_VIRTIO_PACKED_QUEUES);
+    DO_TEST("virtio-options-rng-packed", QEMU_CAPS_DEVICE_VIRTIO_RNG,
+            QEMU_CAPS_OBJECT_RNG_RANDOM,
+            QEMU_CAPS_VIRTIO_PACKED_QUEUES);
+    DO_TEST("virtio-options-video-packed", QEMU_CAPS_DEVICE_VIRTIO_GPU,
+            QEMU_CAPS_DEVICE_VIRTIO_GPU,
+            QEMU_CAPS_VIRTIO_GPU_VIRGL,
+            QEMU_CAPS_DEVICE_VIDEO_PRIMARY,
+            QEMU_CAPS_DEVICE_VHOST_USER_GPU,
+            QEMU_CAPS_VIRTIO_PACKED_QUEUES);
+    DO_TEST_FAILURE("virtio-options-controller-iommu", QEMU_CAPS_VIRTIO_SCSI);
+    DO_TEST_FAILURE("virtio-options-disk-iommu", NONE);
+    DO_TEST_FAILURE("virtio-options-fs-iommu", NONE);
+    DO_TEST_FAILURE("virtio-options-input-iommu", QEMU_CAPS_VIRTIO_MOUSE,
+                    QEMU_CAPS_VIRTIO_KEYBOARD);
+    DO_TEST_FAILURE("virtio-options-memballoon-iommu", NONE);
+    DO_TEST_FAILURE("virtio-options-net-iommu", NONE);
+    DO_TEST_FAILURE("virtio-options-rng-iommu", QEMU_CAPS_DEVICE_VIRTIO_RNG,
+                    QEMU_CAPS_OBJECT_RNG_RANDOM);
+    DO_TEST_FAILURE("virtio-options-video-iommu", QEMU_CAPS_DEVICE_VIRTIO_GPU,
+                    QEMU_CAPS_DEVICE_VIRTIO_GPU,
+                    QEMU_CAPS_VIRTIO_GPU_VIRGL,
+                    QEMU_CAPS_DEVICE_VIDEO_PRIMARY,
+                    QEMU_CAPS_DEVICE_VHOST_USER_GPU);
+    DO_TEST_FAILURE("virtio-options-controller-ats", QEMU_CAPS_VIRTIO_SCSI);
+    DO_TEST_FAILURE("virtio-options-disk-ats", NONE);
+    DO_TEST_FAILURE("virtio-options-fs-ats", NONE);
+    DO_TEST_FAILURE("virtio-options-input-ats", QEMU_CAPS_VIRTIO_MOUSE,
+                    QEMU_CAPS_VIRTIO_KEYBOARD);
+    DO_TEST_FAILURE("virtio-options-memballoon-ats", NONE);
+    DO_TEST_FAILURE("virtio-options-net-ats", NONE);
+    DO_TEST_FAILURE("virtio-options-rng-ats", QEMU_CAPS_DEVICE_VIRTIO_RNG,
+                    QEMU_CAPS_OBJECT_RNG_RANDOM);
+    DO_TEST_FAILURE("virtio-options-video-ats", QEMU_CAPS_DEVICE_VIRTIO_GPU,
+                    QEMU_CAPS_DEVICE_VIRTIO_GPU,
+                    QEMU_CAPS_VIRTIO_GPU_VIRGL,
+                    QEMU_CAPS_DEVICE_VIDEO_PRIMARY,
+                    QEMU_CAPS_DEVICE_VHOST_USER_GPU);
+    DO_TEST_FAILURE("virtio-options-controller-packed", QEMU_CAPS_VIRTIO_SCSI);
+    DO_TEST_FAILURE("virtio-options-disk-packed", NONE);
+    DO_TEST_FAILURE("virtio-options-fs-packed", NONE);
+    DO_TEST_FAILURE("virtio-options-input-packed", QEMU_CAPS_VIRTIO_MOUSE,
+                    QEMU_CAPS_VIRTIO_KEYBOARD);
+    DO_TEST_FAILURE("virtio-options-memballoon-packed", NONE);
+    DO_TEST_FAILURE("virtio-options-net-packed", NONE);
+    DO_TEST_FAILURE("virtio-options-rng-packed", QEMU_CAPS_DEVICE_VIRTIO_RNG,
+                    QEMU_CAPS_OBJECT_RNG_RANDOM);
+    DO_TEST_FAILURE("virtio-options-video-packed", QEMU_CAPS_DEVICE_VIRTIO_GPU,
+                    QEMU_CAPS_DEVICE_VIRTIO_GPU,
+                    QEMU_CAPS_VIRTIO_GPU_VIRGL,
+                    QEMU_CAPS_DEVICE_VIDEO_PRIMARY,
+                    QEMU_CAPS_DEVICE_VHOST_USER_GPU);

Impressive. But should we turn these into DO_TEST_CAPS_LATEST() and DO_TEST_CAPS_LATEST_FAILURE() respectively? That would need to be followed by .args rename but I'm okay doing both locally if you agree.

Michal




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux