1*0f31f0f5SThomas Huth#!/usr/bin/env python3 2*0f31f0f5SThomas Huth# 3*0f31f0f5SThomas Huth# Replay test that boots a Linux kernel on x86_64 machines 4*0f31f0f5SThomas Huth# and checks the console 5*0f31f0f5SThomas Huth# 6*0f31f0f5SThomas Huth# SPDX-License-Identifier: GPL-2.0-or-later 7*0f31f0f5SThomas Huth 8*0f31f0f5SThomas Huthfrom qemu_test import Asset, skipFlakyTest 9*0f31f0f5SThomas Huthfrom replay_kernel import ReplayKernelBase 10*0f31f0f5SThomas Huth 11*0f31f0f5SThomas Huth 12*0f31f0f5SThomas Huthclass X86Replay(ReplayKernelBase): 13*0f31f0f5SThomas Huth 14*0f31f0f5SThomas Huth ASSET_KERNEL = Asset( 15*0f31f0f5SThomas Huth ('https://archives.fedoraproject.org/pub/archive/fedora/linux' 16*0f31f0f5SThomas Huth '/releases/29/Everything/x86_64/os/images/pxeboot/vmlinuz'), 17*0f31f0f5SThomas Huth '8f237d84712b1b411baf3af2aeaaee10b9aae8e345ec265b87ab3a39639eb143') 18*0f31f0f5SThomas Huth 19*0f31f0f5SThomas Huth def do_test_x86(self, machine): 20*0f31f0f5SThomas Huth self.set_machine(machine) 21*0f31f0f5SThomas Huth kernel_path = self.ASSET_KERNEL.fetch() 22*0f31f0f5SThomas Huth kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE + 'console=ttyS0' 23*0f31f0f5SThomas Huth console_pattern = 'VFS: Cannot open root device' 24*0f31f0f5SThomas Huth self.run_rr(kernel_path, kernel_command_line, console_pattern, shift=5) 25*0f31f0f5SThomas Huth 26*0f31f0f5SThomas Huth @skipFlakyTest('https://gitlab.com/qemu-project/qemu/-/issues/2094') 27*0f31f0f5SThomas Huth def test_pc(self): 28*0f31f0f5SThomas Huth self.do_test_x86('pc') 29*0f31f0f5SThomas Huth 30*0f31f0f5SThomas Huth def test_q35(self): 31*0f31f0f5SThomas Huth self.do_test_x86('q35') 32*0f31f0f5SThomas Huth 33*0f31f0f5SThomas Huth 34*0f31f0f5SThomas Huthif __name__ == '__main__': 35*0f31f0f5SThomas Huth ReplayKernelBase.main() 36