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