xref: /qemu/tests/functional/test_s390x_replay.py (revision ee376948ebd9cf74b4456a7422e5073a72e4486a)
1*50424852SThomas Huth#!/usr/bin/env python3
2*50424852SThomas Huth#
3*50424852SThomas Huth# Replay test that boots a Linux kernel on an s390x machine
4*50424852SThomas Huth# and checks the console
5*50424852SThomas Huth#
6*50424852SThomas Huth# SPDX-License-Identifier: GPL-2.0-or-later
7*50424852SThomas Huth
8*50424852SThomas Huthfrom qemu_test import Asset
9*50424852SThomas Huthfrom replay_kernel import ReplayKernelBase
10*50424852SThomas Huth
11*50424852SThomas Huth
12*50424852SThomas Huthclass S390xReplay(ReplayKernelBase):
13*50424852SThomas Huth
14*50424852SThomas Huth    ASSET_KERNEL = Asset(
15*50424852SThomas Huth        ('https://archives.fedoraproject.org/pub/archive/fedora-secondary/'
16*50424852SThomas Huth         'releases/29/Everything/s390x/os/images/kernel.img'),
17*50424852SThomas Huth        'dace03b8ae0c9f670ebb9b8d6ce5eb24b62987f346de8f1300a439bb00bb99e7')
18*50424852SThomas Huth
19*50424852SThomas Huth    def test_s390_ccw_virtio(self):
20*50424852SThomas Huth        self.set_machine('s390-ccw-virtio')
21*50424852SThomas Huth        kernel_path = self.ASSET_KERNEL.fetch()
22*50424852SThomas Huth        kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE + 'console=sclp0'
23*50424852SThomas Huth        console_pattern = 'Kernel command line: %s' % kernel_command_line
24*50424852SThomas Huth        self.run_rr(kernel_path, kernel_command_line, console_pattern, shift=9)
25*50424852SThomas Huth
26*50424852SThomas Huth
27*50424852SThomas Huthif __name__ == '__main__':
28*50424852SThomas Huth    ReplayKernelBase.main()
29