diff mbox series

[v2,23/29] tests/acceptance/virtio_check_params: Support the ppc architecture

Message ID 20200129212345.20547-24-philmd@redhat.com (mailing list archive)
State New, archived
Headers show
Series tests/acceptance/virtio_seg_max_adjust: Restrict it to Linux/X86 | expand

Commit Message

Philippe Mathieu-Daudé Jan. 29, 2020, 9:23 p.m. UTC
We can run these tests on the pSeries machines too,
we were just missing to properly parse the machine names.

Note: we have to exclude the versioned machines from QEMU 2.8
to 2.11 which fail, such:

  TestFail: machine type pseries-2.8: No Transactional Memory support in TCG, try appending -machine cap-htm=off

Suggested-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 tests/acceptance/virtio_check_params.py | 7 +++++++
 1 file changed, 7 insertions(+)
diff mbox series

Patch

diff --git a/tests/acceptance/virtio_check_params.py b/tests/acceptance/virtio_check_params.py
index b14cfb5958..2c14af825d 100755
--- a/tests/acceptance/virtio_check_params.py
+++ b/tests/acceptance/virtio_check_params.py
@@ -113,6 +113,8 @@  class VirtioMaxSegSettingsCheck(Test):
             ver = ver.split(".");
         elif arch == 's390x':
             ver = mt[len('s390-ccw-virtio-'):].split('.')
+        elif arch.startswith('ppc'):
+            ver = mt[len('pseries-'):].split('.')
         else:
             raise TestCancel('Unsupported architecture: %s' % arch)
 
@@ -131,6 +133,9 @@  class VirtioMaxSegSettingsCheck(Test):
             EXCLUDED_MACHINES += ['isapc', 'microvm']
             if os.geteuid() != 0:
                 EXCLUDED_MACHINES += ['xenfv', 'xenpv']
+        elif arch.startswith('ppc'):
+            EXCLUDED_MACHINES += ['pseries-2.8', 'pseries-2.9',
+                                  'pseries-2.10', 'pseries-2.11']
         # collect all machine types except the ones in EXCLUDED_MACHINES
         with QEMUMachine(self.qemu_bin) as vm:
             if arch.startswith('mips'):
@@ -142,6 +147,8 @@  class VirtioMaxSegSettingsCheck(Test):
         for m in EXCLUDED_MACHINES:
             if m in machines:
                 machines.remove(m)
+        if arch.startswith('ppc'):
+            machines = [m for m in machines if m.startswith('pseries')]
 
         for dev_type in DEV_TYPES:
             # create the list of machine types and their parameters.