xref: /qemu/tests/functional/test_i386_replay.py (revision 55f5bf716a65f67663d0769bcb8c017764b3e53a)
1*0e756f40SThomas Huth#!/usr/bin/env python3
2*0e756f40SThomas Huth#
3*0e756f40SThomas Huth# Replay test that boots a Linux kernel on a i386 machine
4*0e756f40SThomas Huth# and checks the console
5*0e756f40SThomas Huth#
6*0e756f40SThomas Huth# SPDX-License-Identifier: GPL-2.0-or-later
7*0e756f40SThomas Huth
8*0e756f40SThomas Huthfrom qemu_test import Asset
9*0e756f40SThomas Huthfrom replay_kernel import ReplayKernelBase
10*0e756f40SThomas Huth
11*0e756f40SThomas Huth
12*0e756f40SThomas Huthclass I386Replay(ReplayKernelBase):
13*0e756f40SThomas Huth
14*0e756f40SThomas Huth    ASSET_KERNEL = Asset(
15*0e756f40SThomas Huth         'https://storage.tuxboot.com/20230331/i386/bzImage',
16*0e756f40SThomas Huth        'a3e5b32a354729e65910f5a1ffcda7c14a6c12a55e8213fb86e277f1b76ed956')
17*0e756f40SThomas Huth
18*0e756f40SThomas Huth    def test_pc(self):
19*0e756f40SThomas Huth        self.set_machine('pc')
20*0e756f40SThomas Huth        kernel_url = ()
21*0e756f40SThomas Huth        kernel_path = self.ASSET_KERNEL.fetch()
22*0e756f40SThomas Huth        kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE + 'console=ttyS0'
23*0e756f40SThomas Huth        console_pattern = 'VFS: Cannot open root device'
24*0e756f40SThomas Huth        self.run_rr(kernel_path, kernel_command_line, console_pattern, shift=5)
25*0e756f40SThomas Huth
26*0e756f40SThomas Huth
27*0e756f40SThomas Huthif __name__ == '__main__':
28*0e756f40SThomas Huth    ReplayKernelBase.main()
29