1*ec971d85SThomas Huth#!/usr/bin/env python3 2*ec971d85SThomas Huth# 3*ec971d85SThomas Huth# Replay test that boots a Linux kernel on an m68k machine 4*ec971d85SThomas Huth# and checks the console 5*ec971d85SThomas Huth# 6*ec971d85SThomas Huth# SPDX-License-Identifier: GPL-2.0-or-later 7*ec971d85SThomas Huth 8*ec971d85SThomas Huthfrom qemu_test import Asset 9*ec971d85SThomas Huthfrom replay_kernel import ReplayKernelBase 10*ec971d85SThomas Huth 11*ec971d85SThomas Huth 12*ec971d85SThomas Huthclass M68kReplay(ReplayKernelBase): 13*ec971d85SThomas Huth 14*ec971d85SThomas Huth ASSET_Q800 = Asset( 15*ec971d85SThomas Huth ('https://snapshot.debian.org/' 16*ec971d85SThomas Huth 'archive/debian-ports/20191021T083923Z/pool-m68k/main/l/linux/' 17*ec971d85SThomas Huth 'kernel-image-5.3.0-1-m68k-di_5.3.7-1_m68k.udeb'), 18*ec971d85SThomas Huth '949e50d74d4b9bc15d26c06d402717b7a4c0e32ff8100014f5930d8024de7b73') 19*ec971d85SThomas Huth 20*ec971d85SThomas Huth def test_q800(self): 21*ec971d85SThomas Huth self.set_machine('q800') 22*ec971d85SThomas Huth kernel_path = self.archive_extract(self.ASSET_Q800, 23*ec971d85SThomas Huth member='boot/vmlinux-5.3.0-1-m68k') 24*ec971d85SThomas Huth kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE + 25*ec971d85SThomas Huth 'console=ttyS0 vga=off') 26*ec971d85SThomas Huth console_pattern = 'No filesystem could mount root' 27*ec971d85SThomas Huth self.run_rr(kernel_path, kernel_command_line, console_pattern) 28*ec971d85SThomas Huth 29*ec971d85SThomas Huth ASSET_MCF5208 = Asset( 30*ec971d85SThomas Huth 'https://qemu-advcal.gitlab.io/qac-best-of-multiarch/download/day07.tar.xz', 31*ec971d85SThomas Huth '753c2f3837126b7c6ba92d0b1e0b156e8a2c5131d2d576bb0b9a763fae73c08a') 32*ec971d85SThomas Huth 33*ec971d85SThomas Huth def test_mcf5208evb(self): 34*ec971d85SThomas Huth self.set_machine('mcf5208evb') 35*ec971d85SThomas Huth kernel_path = self.archive_extract(self.ASSET_MCF5208, 36*ec971d85SThomas Huth member='day07/sanity-clause.elf') 37*ec971d85SThomas Huth self.run_rr(kernel_path, self.KERNEL_COMMON_COMMAND_LINE, 38*ec971d85SThomas Huth 'QEMU advent calendar') 39*ec971d85SThomas Huth 40*ec971d85SThomas Huth 41*ec971d85SThomas Huthif __name__ == '__main__': 42*ec971d85SThomas Huth ReplayKernelBase.main() 43