qemu/tests/avocado/ppc_74xx.py
Daniel Henrique Barboza 4e653f0aa8 avocado/ppc_74xx.py: check TCG accel for all tests
All tests of this file, when running in an IBM POWER host and with
--disable-tcg, fail in a similar manner:

        Command: ./qemu-system-ppc -display none -vga none (...)
-cpu 7400 (...)
        Output: ioctl(KVM_CREATE_VM) failed: 22 Invalid argument
PPC KVM module is not loaded. Try modprobe kvm_pr.
qemu-system-ppc: failed to initialize kvm: Invalid argument

We don't have a way of telling which KVM module is loaded in a Power
host (kvm_hv or kvm_pr). For now let's make all the tests of this
file depend on TCG support.

Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Message-Id: <20220310183011.110391-6-danielhb413@gmail.com>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
2022-03-14 15:57:17 +01:00

136 lines
3.9 KiB
Python

# Smoke tests for 74xx cpus (aka G4).
#
# Copyright (c) 2021, IBM Corp.
#
# This work is licensed under the terms of the GNU GPL, version 2 or
# later. See the COPYING file in the top-level directory.
from avocado_qemu import QemuSystemTest
from avocado_qemu import wait_for_console_pattern
class ppc74xxCpu(QemuSystemTest):
"""
:avocado: tags=arch:ppc
:avocado: tags=accel:tcg
"""
timeout = 5
def test_ppc_7400(self):
"""
:avocado: tags=cpu:7400
"""
self.require_accelerator("tcg")
self.vm.set_console()
self.vm.launch()
wait_for_console_pattern(self, '>> OpenBIOS')
wait_for_console_pattern(self, '>> CPU type PowerPC,G4')
def test_ppc_7410(self):
"""
:avocado: tags=cpu:7410
"""
self.require_accelerator("tcg")
self.vm.set_console()
self.vm.launch()
wait_for_console_pattern(self, '>> OpenBIOS')
wait_for_console_pattern(self, '>> CPU type PowerPC,74xx')
def test_ppc_7441(self):
"""
:avocado: tags=cpu:7441
"""
self.require_accelerator("tcg")
self.vm.set_console()
self.vm.launch()
wait_for_console_pattern(self, '>> OpenBIOS')
wait_for_console_pattern(self, '>> CPU type PowerPC,G4')
def test_ppc_7445(self):
"""
:avocado: tags=cpu:7445
"""
self.require_accelerator("tcg")
self.vm.set_console()
self.vm.launch()
wait_for_console_pattern(self, '>> OpenBIOS')
wait_for_console_pattern(self, '>> CPU type PowerPC,G4')
def test_ppc_7447(self):
"""
:avocado: tags=cpu:7447
"""
self.require_accelerator("tcg")
self.vm.set_console()
self.vm.launch()
wait_for_console_pattern(self, '>> OpenBIOS')
wait_for_console_pattern(self, '>> CPU type PowerPC,G4')
def test_ppc_7447a(self):
"""
:avocado: tags=cpu:7447a
"""
self.require_accelerator("tcg")
self.vm.set_console()
self.vm.launch()
wait_for_console_pattern(self, '>> OpenBIOS')
wait_for_console_pattern(self, '>> CPU type PowerPC,G4')
def test_ppc_7448(self):
"""
:avocado: tags=cpu:7448
"""
self.require_accelerator("tcg")
self.vm.set_console()
self.vm.launch()
wait_for_console_pattern(self, '>> OpenBIOS')
wait_for_console_pattern(self, '>> CPU type PowerPC,MPC86xx')
def test_ppc_7450(self):
"""
:avocado: tags=cpu:7450
"""
self.require_accelerator("tcg")
self.vm.set_console()
self.vm.launch()
wait_for_console_pattern(self, '>> OpenBIOS')
wait_for_console_pattern(self, '>> CPU type PowerPC,G4')
def test_ppc_7451(self):
"""
:avocado: tags=cpu:7451
"""
self.require_accelerator("tcg")
self.vm.set_console()
self.vm.launch()
wait_for_console_pattern(self, '>> OpenBIOS')
wait_for_console_pattern(self, '>> CPU type PowerPC,G4')
def test_ppc_7455(self):
"""
:avocado: tags=cpu:7455
"""
self.require_accelerator("tcg")
self.vm.set_console()
self.vm.launch()
wait_for_console_pattern(self, '>> OpenBIOS')
wait_for_console_pattern(self, '>> CPU type PowerPC,G4')
def test_ppc_7457(self):
"""
:avocado: tags=cpu:7457
"""
self.require_accelerator("tcg")
self.vm.set_console()
self.vm.launch()
wait_for_console_pattern(self, '>> OpenBIOS')
wait_for_console_pattern(self, '>> CPU type PowerPC,G4')
def test_ppc_7457a(self):
"""
:avocado: tags=cpu:7457a
"""
self.require_accelerator("tcg")
self.vm.set_console()
self.vm.launch()
wait_for_console_pattern(self, '>> OpenBIOS')
wait_for_console_pattern(self, '>> CPU type PowerPC,G4')