tests/functional/test_virtio_version: Check for the availability of the machine
authorThomas Huth <thuth@redhat.com>
Thu, 28 Nov 2024 12:01:42 +0000 (13:01 +0100)
committerThomas Huth <thuth@redhat.com>
Mon, 2 Dec 2024 13:52:47 +0000 (14:52 +0100)
Use self_set_machine() to set and check for the availability of the
default pc machine (so that the test is not failing if the machine
has not been included in the QEMU binary).

Message-ID: <20241128120142.593408-1-thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
tests/functional/test_virtio_version.py

index eb23060564821432accd3666b70649dbca57e922..92e3f5caf059a67fa0cc099c38f67ba27c6577f6 100755 (executable)
@@ -141,6 +141,7 @@ class VirtioVersionCheck(QemuSystemTest):
 
 
     def test_conventional_devs(self):
+        self.set_machine('pc')
         self.check_all_variants('virtio-net-pci', VIRTIO_NET)
         # virtio-blk requires 'driver' parameter
         #self.check_all_variants('virtio-blk-pci', VIRTIO_BLOCK)
@@ -167,6 +168,7 @@ class VirtioVersionCheck(QemuSystemTest):
         self.assertIn('pci-express-device', ifaces)
 
     def test_modern_only_devs(self):
+        self.set_machine('pc')
         self.check_modern_only('virtio-vga', VIRTIO_GPU)
         self.check_modern_only('virtio-gpu-pci', VIRTIO_GPU)
         self.check_modern_only('virtio-mouse-pci', VIRTIO_INPUT)