diff mbox series

[PULL,2/3] tests/functional/test_virtio_version: Check for the availability of the machine

Message ID 20241202135640.80528-3-thuth@redhat.com (mailing list archive)
State New
Headers show
Series [PULL,1/3] tests/functional/test_acpi_bits: Turn the test into a QemuSystemTest | expand

Commit Message

Thomas Huth Dec. 2, 2024, 1:56 p.m. UTC
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 | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/tests/functional/test_virtio_version.py b/tests/functional/test_virtio_version.py
index eb23060564..92e3f5caf0 100755
--- a/tests/functional/test_virtio_version.py
+++ b/tests/functional/test_virtio_version.py
@@ -141,6 +141,7 @@  def check_all_variants(self, qemu_devtype, virtio_devid):
 
 
     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 @@  def check_modern_only(self, qemu_devtype, virtio_devid):
         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)