1221620b7SThomas Huth#!/usr/bin/env python3 2221620b7SThomas Huth# 3221620b7SThomas Huth# Replay test that boots a Linux kernel on ppc64 machines 4221620b7SThomas Huth# and checks the console 5221620b7SThomas Huth# 6221620b7SThomas Huth# SPDX-License-Identifier: GPL-2.0-or-later 7221620b7SThomas Huth 8*3b973102SThomas Huthfrom qemu_test import Asset, skipFlakyTest 9221620b7SThomas Huthfrom replay_kernel import ReplayKernelBase 10221620b7SThomas Huth 11221620b7SThomas Huth 12221620b7SThomas Huthclass Ppc64Replay(ReplayKernelBase): 13221620b7SThomas Huth 14221620b7SThomas Huth ASSET_DAY19 = Asset( 15221620b7SThomas Huth ('https://qemu-advcal.gitlab.io/qac-best-of-multiarch/download/' 16221620b7SThomas Huth 'day19.tar.xz'), 17221620b7SThomas Huth '20b1bb5a8488c664defbb5d283addc91a05335a936c63b3f5ff7eee74b725755') 18221620b7SThomas Huth 19*3b973102SThomas Huth @skipFlakyTest('https://gitlab.com/qemu-project/qemu/-/issues/2523') 20221620b7SThomas Huth def test_ppc64_e500(self): 21221620b7SThomas Huth self.set_machine('ppce500') 22221620b7SThomas Huth self.cpu = 'e5500' 23221620b7SThomas Huth kernel_path = self.archive_extract(self.ASSET_DAY19, 24221620b7SThomas Huth member='day19/uImage') 25221620b7SThomas Huth self.run_rr(kernel_path, self.REPLAY_KERNEL_COMMAND_LINE, 26221620b7SThomas Huth 'QEMU advent calendar') 27221620b7SThomas Huth 28221620b7SThomas Huth ASSET_KERNEL = Asset( 29221620b7SThomas Huth ('https://archives.fedoraproject.org/pub/archive/fedora-secondary/' 30221620b7SThomas Huth 'releases/29/Everything/ppc64le/os/ppc/ppc64/vmlinuz'), 31221620b7SThomas Huth '383c2f5c23bc0d9d32680c3924d3fd7ee25cc5ef97091ac1aa5e1d853422fc5f') 32221620b7SThomas Huth 33221620b7SThomas Huth def test_ppc64_pseries(self): 34221620b7SThomas Huth self.set_machine('pseries') 35221620b7SThomas Huth kernel_path = self.ASSET_KERNEL.fetch() 36221620b7SThomas Huth kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE + 'console=hvc0' 37221620b7SThomas Huth console_pattern = 'VFS: Cannot open root device' 38221620b7SThomas Huth self.run_rr(kernel_path, kernel_command_line, console_pattern) 39221620b7SThomas Huth 40221620b7SThomas Huth def test_ppc64_powernv(self): 41221620b7SThomas Huth self.set_machine('powernv') 42221620b7SThomas Huth kernel_path = self.ASSET_KERNEL.fetch() 43221620b7SThomas Huth kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE + \ 44221620b7SThomas Huth 'console=tty0 console=hvc0' 45221620b7SThomas Huth console_pattern = 'VFS: Cannot open root device' 46221620b7SThomas Huth self.run_rr(kernel_path, kernel_command_line, console_pattern) 47221620b7SThomas Huth 48221620b7SThomas Huth 49221620b7SThomas Huthif __name__ == '__main__': 50221620b7SThomas Huth ReplayKernelBase.main() 51