[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 5/8] test/acceptance: boot_linux_console: Add boot Linux/ppc64
From: |
Wainer dos Santos Moschetta |
Subject: |
[PATCH v4 5/8] test/acceptance: boot_linux_console: Add boot Linux/ppc64le with KVM |
Date: |
Wed, 5 Feb 2020 15:32:47 -0500 |
Likewise this splitted the boot Linux for ppc64le test in a version
for KVM and another for TCG.
The kvm test case is designed to run on POWER8 or greater, otherwise
it is skipped. The SMT should be off on POWER8, that is also checked.
Signed-off-by: Wainer dos Santos Moschetta <address@hidden>
---
tests/acceptance/boot_linux_console.py | 39 ++++++++++++++++++++++----
1 file changed, 34 insertions(+), 5 deletions(-)
diff --git a/tests/acceptance/boot_linux_console.py
b/tests/acceptance/boot_linux_console.py
index 76a66ee533..ca385c90a4 100644
--- a/tests/acceptance/boot_linux_console.py
+++ b/tests/acceptance/boot_linux_console.py
@@ -19,6 +19,8 @@ from avocado_qemu import exec_command_and_wait_for_pattern
from avocado_qemu import wait_for_console_pattern
from avocado.utils import process
from avocado.utils import archive
+from avocado.utils.cpu import get_cpu_vendor_name
+from avocado.utils.path import find_command
class BootLinuxConsole(Test):
@@ -551,11 +553,7 @@ class BootLinuxConsole(Test):
console_pattern = 'Kernel command line: %s' % kernel_command_line
self.wait_for_console_pattern(console_pattern)
- def test_ppc64_pseries(self):
- """
- :avocado: tags=arch:ppc64
- :avocado: tags=machine:pseries
- """
+ def do_test_ppc64_pseries(self):
kernel_url = ('https://archives.fedoraproject.org/pub/archive'
'/fedora-secondary/releases/29/Everything/ppc64le/os'
'/ppc/ppc64/vmlinuz')
@@ -570,6 +568,37 @@ class BootLinuxConsole(Test):
console_pattern = 'Kernel command line: %s' % kernel_command_line
self.wait_for_console_pattern(console_pattern)
+ @skipUnless(find_command('ppc64_cpu', default=False))
+ def test_ppc64_pseries_kvm(self):
+ """
+ :avocado: tags=arch:ppc64
+ :avocado: tags=machine:pseries
+ :avocado: tags=accel:kvm
+
+ It assumes running on POWER8 or greater, otherwise skip the test.
+ If on POWER8 then SMT should be off, otherwise skip the test.
+ """
+ cpu = get_cpu_vendor_name()
+ if not cpu.startswith('power'):
+ self.cancel('do not test with %s cpu' % cpu)
+ else:
+ version = int(cpu.replace('power', ''))
+ if version < 8:
+ self.cancel('cpu %s is not >= POWER8')
+ elif version == 8:
+ smt = process.run('ppc64_cpu --smt -n').stdout_text.strip()
+ if smt != 'SMT=1':
+ self.cancel('%s on POWER8' % smt)
+ self.do_test_ppc64_pseries()
+
+ def test_ppc64_pseries_tcg(self):
+ """
+ :avocado: tags=arch:ppc64
+ :avocado: tags=machine:pseries
+ :avocado: tags=accel:tcg
+ """
+ self.do_test_ppc64_pseries()
+
def test_m68k_q800(self):
"""
:avocado: tags=arch:m68k
--
2.24.1
- [PATCH v4 0/8] Acceptance tests: boot Linux with KVM test, Wainer dos Santos Moschetta, 2020/02/05
- [PATCH v4 7/8] tests/acceptance: avocado_qemu: Refactor the handler of 'machine' parameter, Wainer dos Santos Moschetta, 2020/02/05
- [PATCH v4 2/8] tests/acceptance: boot_linux_console: Add boot Linux/x86 with KVM, Wainer dos Santos Moschetta, 2020/02/05
- [PATCH v4 1/8] tests/acceptance: avocado_qemu: Introduce the 'accel' test parameter, Wainer dos Santos Moschetta, 2020/02/05
- [PATCH v4 6/8] tests/acceptance: boot_linux_console: Add boot Linux/s390x with KVM, Wainer dos Santos Moschetta, 2020/02/05
- [PATCH v4 4/8] python/qemu: accel: Fix kvm_available() on ppc64le, Wainer dos Santos Moschetta, 2020/02/05
- [PATCH v4 8/8] travis.yml: Enable acceptance KVM tests, Wainer dos Santos Moschetta, 2020/02/05
- [PATCH v4 3/8] tests/acceptance: boot_linux_console: Add boot Linux/aarch64 with KVM, Wainer dos Santos Moschetta, 2020/02/05
- [PATCH v4 5/8] test/acceptance: boot_linux_console: Add boot Linux/ppc64le with KVM,
Wainer dos Santos Moschetta <=
- Re: [PATCH v4 0/8] Acceptance tests: boot Linux with KVM test, Philippe Mathieu-Daudé, 2020/02/10