1*4d75a374SThomas Huth#!/usr/bin/env python3 2*4d75a374SThomas Huth# 3*4d75a374SThomas Huth# Replay test that boots a Linux kernel on an aarch64 machine 4*4d75a374SThomas Huth# and checks the console 5*4d75a374SThomas Huth# 6*4d75a374SThomas Huth# SPDX-License-Identifier: GPL-2.0-or-later 7*4d75a374SThomas Huth 8*4d75a374SThomas Huthfrom qemu_test import Asset 9*4d75a374SThomas Huthfrom replay_kernel import ReplayKernelBase 10*4d75a374SThomas Huth 11*4d75a374SThomas Huth 12*4d75a374SThomas Huthclass Aarch64Replay(ReplayKernelBase): 13*4d75a374SThomas Huth 14*4d75a374SThomas Huth ASSET_KERNEL = Asset( 15*4d75a374SThomas Huth ('https://archives.fedoraproject.org/pub/archive/fedora/linux/' 16*4d75a374SThomas Huth 'releases/29/Everything/aarch64/os/images/pxeboot/vmlinuz'), 17*4d75a374SThomas Huth '7e1430b81c26bdd0da025eeb8fbd77b5dc961da4364af26e771bd39f379cbbf7') 18*4d75a374SThomas Huth 19*4d75a374SThomas Huth def test_aarch64_virt(self): 20*4d75a374SThomas Huth self.set_machine('virt') 21*4d75a374SThomas Huth self.cpu = 'cortex-a53' 22*4d75a374SThomas Huth kernel_path = self.ASSET_KERNEL.fetch() 23*4d75a374SThomas Huth kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE + 24*4d75a374SThomas Huth 'console=ttyAMA0') 25*4d75a374SThomas Huth console_pattern = 'VFS: Cannot open root device' 26*4d75a374SThomas Huth self.run_rr(kernel_path, kernel_command_line, console_pattern) 27*4d75a374SThomas Huth 28*4d75a374SThomas Huth 29*4d75a374SThomas Huthif __name__ == '__main__': 30*4d75a374SThomas Huth ReplayKernelBase.main() 31