1*eeba3d73SThomas Huth#!/usr/bin/env python3 2*eeba3d73SThomas Huth# 3*eeba3d73SThomas Huth# Smoke tests for 74xx cpus (aka G4). 4*eeba3d73SThomas Huth# 5*eeba3d73SThomas Huth# Copyright (c) 2021, IBM Corp. 6*eeba3d73SThomas Huth# 7*eeba3d73SThomas Huth# This work is licensed under the terms of the GNU GPL, version 2 or 8*eeba3d73SThomas Huth# later. See the COPYING file in the top-level directory. 9*eeba3d73SThomas Huth 10*eeba3d73SThomas Huthfrom qemu_test import QemuSystemTest 11*eeba3d73SThomas Huthfrom qemu_test import wait_for_console_pattern 12*eeba3d73SThomas Huth 13*eeba3d73SThomas Huthclass ppc74xxCpu(QemuSystemTest): 14*eeba3d73SThomas Huth 15*eeba3d73SThomas Huth timeout = 5 16*eeba3d73SThomas Huth 17*eeba3d73SThomas Huth def test_ppc_7400(self): 18*eeba3d73SThomas Huth self.require_accelerator("tcg") 19*eeba3d73SThomas Huth self.set_machine('g3beige') 20*eeba3d73SThomas Huth self.vm.set_console() 21*eeba3d73SThomas Huth self.vm.add_args('-cpu', '7400') 22*eeba3d73SThomas Huth self.vm.launch() 23*eeba3d73SThomas Huth wait_for_console_pattern(self, '>> OpenBIOS') 24*eeba3d73SThomas Huth wait_for_console_pattern(self, '>> CPU type PowerPC,G4') 25*eeba3d73SThomas Huth 26*eeba3d73SThomas Huth def test_ppc_7410(self): 27*eeba3d73SThomas Huth self.require_accelerator("tcg") 28*eeba3d73SThomas Huth self.set_machine('g3beige') 29*eeba3d73SThomas Huth self.vm.set_console() 30*eeba3d73SThomas Huth self.vm.add_args('-cpu', '7410') 31*eeba3d73SThomas Huth self.vm.launch() 32*eeba3d73SThomas Huth wait_for_console_pattern(self, '>> OpenBIOS') 33*eeba3d73SThomas Huth wait_for_console_pattern(self, '>> CPU type PowerPC,74xx') 34*eeba3d73SThomas Huth 35*eeba3d73SThomas Huth def test_ppc_7441(self): 36*eeba3d73SThomas Huth self.require_accelerator("tcg") 37*eeba3d73SThomas Huth self.set_machine('g3beige') 38*eeba3d73SThomas Huth self.vm.set_console() 39*eeba3d73SThomas Huth self.vm.add_args('-cpu', '7441') 40*eeba3d73SThomas Huth self.vm.launch() 41*eeba3d73SThomas Huth wait_for_console_pattern(self, '>> OpenBIOS') 42*eeba3d73SThomas Huth wait_for_console_pattern(self, '>> CPU type PowerPC,G4') 43*eeba3d73SThomas Huth 44*eeba3d73SThomas Huth def test_ppc_7445(self): 45*eeba3d73SThomas Huth self.require_accelerator("tcg") 46*eeba3d73SThomas Huth self.set_machine('g3beige') 47*eeba3d73SThomas Huth self.vm.set_console() 48*eeba3d73SThomas Huth self.vm.add_args('-cpu', '7445') 49*eeba3d73SThomas Huth self.vm.launch() 50*eeba3d73SThomas Huth wait_for_console_pattern(self, '>> OpenBIOS') 51*eeba3d73SThomas Huth wait_for_console_pattern(self, '>> CPU type PowerPC,G4') 52*eeba3d73SThomas Huth 53*eeba3d73SThomas Huth def test_ppc_7447(self): 54*eeba3d73SThomas Huth self.require_accelerator("tcg") 55*eeba3d73SThomas Huth self.set_machine('g3beige') 56*eeba3d73SThomas Huth self.vm.set_console() 57*eeba3d73SThomas Huth self.vm.add_args('-cpu', '7447') 58*eeba3d73SThomas Huth self.vm.launch() 59*eeba3d73SThomas Huth wait_for_console_pattern(self, '>> OpenBIOS') 60*eeba3d73SThomas Huth wait_for_console_pattern(self, '>> CPU type PowerPC,G4') 61*eeba3d73SThomas Huth 62*eeba3d73SThomas Huth def test_ppc_7447a(self): 63*eeba3d73SThomas Huth self.require_accelerator("tcg") 64*eeba3d73SThomas Huth self.set_machine('g3beige') 65*eeba3d73SThomas Huth self.vm.set_console() 66*eeba3d73SThomas Huth self.vm.add_args('-cpu', '7447a') 67*eeba3d73SThomas Huth self.vm.launch() 68*eeba3d73SThomas Huth wait_for_console_pattern(self, '>> OpenBIOS') 69*eeba3d73SThomas Huth wait_for_console_pattern(self, '>> CPU type PowerPC,G4') 70*eeba3d73SThomas Huth 71*eeba3d73SThomas Huth def test_ppc_7448(self): 72*eeba3d73SThomas Huth self.require_accelerator("tcg") 73*eeba3d73SThomas Huth self.set_machine('g3beige') 74*eeba3d73SThomas Huth self.vm.set_console() 75*eeba3d73SThomas Huth self.vm.add_args('-cpu', '7448') 76*eeba3d73SThomas Huth self.vm.launch() 77*eeba3d73SThomas Huth wait_for_console_pattern(self, '>> OpenBIOS') 78*eeba3d73SThomas Huth wait_for_console_pattern(self, '>> CPU type PowerPC,MPC86xx') 79*eeba3d73SThomas Huth 80*eeba3d73SThomas Huth def test_ppc_7450(self): 81*eeba3d73SThomas Huth self.require_accelerator("tcg") 82*eeba3d73SThomas Huth self.set_machine('g3beige') 83*eeba3d73SThomas Huth self.vm.set_console() 84*eeba3d73SThomas Huth self.vm.add_args('-cpu', '7450') 85*eeba3d73SThomas Huth self.vm.launch() 86*eeba3d73SThomas Huth wait_for_console_pattern(self, '>> OpenBIOS') 87*eeba3d73SThomas Huth wait_for_console_pattern(self, '>> CPU type PowerPC,G4') 88*eeba3d73SThomas Huth 89*eeba3d73SThomas Huth def test_ppc_7451(self): 90*eeba3d73SThomas Huth self.require_accelerator("tcg") 91*eeba3d73SThomas Huth self.set_machine('g3beige') 92*eeba3d73SThomas Huth self.vm.set_console() 93*eeba3d73SThomas Huth self.vm.add_args('-cpu', '7451') 94*eeba3d73SThomas Huth self.vm.launch() 95*eeba3d73SThomas Huth wait_for_console_pattern(self, '>> OpenBIOS') 96*eeba3d73SThomas Huth wait_for_console_pattern(self, '>> CPU type PowerPC,G4') 97*eeba3d73SThomas Huth 98*eeba3d73SThomas Huth def test_ppc_7455(self): 99*eeba3d73SThomas Huth self.require_accelerator("tcg") 100*eeba3d73SThomas Huth self.set_machine('g3beige') 101*eeba3d73SThomas Huth self.vm.set_console() 102*eeba3d73SThomas Huth self.vm.add_args('-cpu', '7455') 103*eeba3d73SThomas Huth self.vm.launch() 104*eeba3d73SThomas Huth wait_for_console_pattern(self, '>> OpenBIOS') 105*eeba3d73SThomas Huth wait_for_console_pattern(self, '>> CPU type PowerPC,G4') 106*eeba3d73SThomas Huth 107*eeba3d73SThomas Huth def test_ppc_7457(self): 108*eeba3d73SThomas Huth self.require_accelerator("tcg") 109*eeba3d73SThomas Huth self.set_machine('g3beige') 110*eeba3d73SThomas Huth self.vm.set_console() 111*eeba3d73SThomas Huth self.vm.add_args('-cpu', '7457') 112*eeba3d73SThomas Huth self.vm.launch() 113*eeba3d73SThomas Huth wait_for_console_pattern(self, '>> OpenBIOS') 114*eeba3d73SThomas Huth wait_for_console_pattern(self, '>> CPU type PowerPC,G4') 115*eeba3d73SThomas Huth 116*eeba3d73SThomas Huth def test_ppc_7457a(self): 117*eeba3d73SThomas Huth self.require_accelerator("tcg") 118*eeba3d73SThomas Huth self.set_machine('g3beige') 119*eeba3d73SThomas Huth self.vm.set_console() 120*eeba3d73SThomas Huth self.vm.add_args('-cpu', '7457a') 121*eeba3d73SThomas Huth self.vm.launch() 122*eeba3d73SThomas Huth wait_for_console_pattern(self, '>> OpenBIOS') 123*eeba3d73SThomas Huth wait_for_console_pattern(self, '>> CPU type PowerPC,G4') 124*eeba3d73SThomas Huth 125*eeba3d73SThomas Huthif __name__ == '__main__': 126*eeba3d73SThomas Huth QemuSystemTest.main() 127