[Top][All Lists]

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

[PATCH 6/6] tests/acceptance/virtio_seg_max_adjust: Restrict to Linux ho

From: Philippe Mathieu-Daudé
Subject: [PATCH 6/6] tests/acceptance/virtio_seg_max_adjust: Restrict to Linux host
Date: Wed, 22 Jan 2020 23:32:47 +0100

This test is failing on OSX:

  TestFail: machine type pc-i440fx-2.0: <class 'TypeError'>

Looking at the job.log:

  Unexpected error in object_property_find() at qom/object.c:1201:
  qemu-system-x86_64: -device virtio-blk-pci,id=scsi0,drive=drive0: can't apply 
global virtio-blk-device.scsi=true: Property '.scsi' not found

Which makes sense looking at hw/block/virtio-blk.c:

  1261 static Property virtio_blk_properties[] = {
  1262     DEFINE_BLOCK_PROPERTIES(VirtIOBlock, conf.conf),
  1268 #ifdef __linux__
  1269     DEFINE_PROP_BIT64("scsi", VirtIOBlock, host_features,
  1270                       VIRTIO_BLK_F_SCSI, false),
  1271 #endif

Fix by only running this test on a Linux host:

  SKIP: Host OS is not Linux

Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
 tests/acceptance/virtio_seg_max_adjust.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tests/acceptance/virtio_seg_max_adjust.py 
index 2fc6bfcbd8..f8fd03e3b6 100755
--- a/tests/acceptance/virtio_seg_max_adjust.py
+++ b/tests/acceptance/virtio_seg_max_adjust.py
@@ -27,6 +27,7 @@ sys.path.append(os.path.join(os.path.dirname(__file__), '..', 
'..', 'python'))
 from qemu.machine import QEMUMachine
 from avocado_qemu import Test
 from avocado.core.exceptions import TestSkipError
+from avocado import skipUnless
 #list of machine types and virtqueue properties to test
 VIRTIO_SCSI_PROPS = {'seg_max_adjust': 'seg_max_adjust'}
@@ -117,6 +118,8 @@ class VirtioMaxSegSettingsCheck(Test):
             return True
         return False
+    @skipUnless(sys.platform.startswith('linux'), 'Host OS is not Linux')
     def test_machine_types(self):
         :avocado: tags=arch:i386

reply via email to

[Prev in Thread] Current Thread [Next in Thread]