xref: /openbmc/qemu/tests/functional/test_mipsel_replay.py (revision e60938852ff051ab0afeb178af01bba0d63b3bbc)
1*350a998dSThomas Huth#!/usr/bin/env python3
2*350a998dSThomas Huth#
3*350a998dSThomas Huth# Replay tests for the little-endian 32-bit MIPS Malta board
4*350a998dSThomas Huth#
5*350a998dSThomas Huth# SPDX-License-Identifier: GPL-2.0-or-later
6*350a998dSThomas Huth
7*350a998dSThomas Huthfrom qemu_test import Asset, wait_for_console_pattern, skipSlowTest
8*350a998dSThomas Huthfrom replay_kernel import ReplayKernelBase
9*350a998dSThomas Huth
10*350a998dSThomas Huth
11*350a998dSThomas Huthclass MipselReplay(ReplayKernelBase):
12*350a998dSThomas Huth
13*350a998dSThomas Huth    ASSET_KERNEL_4K = Asset(
14*350a998dSThomas Huth        ('http://mipsdistros.mips.com/LinuxDistro/nanomips/'
15*350a998dSThomas Huth         'kernels/v4.15.18-432-gb2eb9a8b07a1-20180627102142/'
16*350a998dSThomas Huth         'generic_nano32r6el_page4k.xz'),
17*350a998dSThomas Huth        '019e034094ac6cf3aa77df5e130fb023ce4dbc804b04bfcc560c6403e1ae6bdb')
18*350a998dSThomas Huth    ASSET_KERNEL_16K = Asset(
19*350a998dSThomas Huth        ('http://mipsdistros.mips.com/LinuxDistro/nanomips/'
20*350a998dSThomas Huth         'kernels/v4.15.18-432-gb2eb9a8b07a1-20180627102142/'
21*350a998dSThomas Huth         'generic_nano32r6el_page16k_up.xz'),
22*350a998dSThomas Huth        '3a54a10b3108c16a448dca9ea3db378733a27423befc2a45a5bdf990bd85e12c')
23*350a998dSThomas Huth    ASSET_KERNEL_64K = Asset(
24*350a998dSThomas Huth        ('http://mipsdistros.mips.com/LinuxDistro/nanomips/'
25*350a998dSThomas Huth         'kernels/v4.15.18-432-gb2eb9a8b07a1-20180627102142/'
26*350a998dSThomas Huth         'generic_nano32r6el_page64k_dbg.xz'),
27*350a998dSThomas Huth        'ce21ff4b07a981ecb8a39db2876616f5a2473eb2ab459c6f67465b9914b0c6b6')
28*350a998dSThomas Huth
29*350a998dSThomas Huth    def do_test_replay_mips_malta32el_nanomips(self, kernel_asset):
30*350a998dSThomas Huth        self.set_machine('malta')
31*350a998dSThomas Huth        self.cpu = 'I7200'
32*350a998dSThomas Huth        kernel_path = self.uncompress(kernel_asset)
33*350a998dSThomas Huth
34*350a998dSThomas Huth        kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE +
35*350a998dSThomas Huth                               'mem=256m@@0x0 '
36*350a998dSThomas Huth                               'console=ttyS0')
37*350a998dSThomas Huth        console_pattern = 'Kernel command line: %s' % kernel_command_line
38*350a998dSThomas Huth        self.run_rr(kernel_path, kernel_command_line, console_pattern, shift=5)
39*350a998dSThomas Huth
40*350a998dSThomas Huth    @skipSlowTest()
41*350a998dSThomas Huth    def test_replay_mips_malta32el_nanomips_4k(self):
42*350a998dSThomas Huth        self.do_test_replay_mips_malta32el_nanomips(self.ASSET_KERNEL_4K)
43*350a998dSThomas Huth
44*350a998dSThomas Huth    @skipSlowTest()
45*350a998dSThomas Huth    def test_replay_mips_malta32el_nanomips_16k_up(self):
46*350a998dSThomas Huth        self.do_test_replay_mips_malta32el_nanomips(self.ASSET_KERNEL_16K)
47*350a998dSThomas Huth
48*350a998dSThomas Huth    @skipSlowTest()
49*350a998dSThomas Huth    def test_replay_mips_malta32el_nanomips_64k_dbg(self):
50*350a998dSThomas Huth        self.do_test_replay_mips_malta32el_nanomips(self.ASSET_KERNEL_64K)
51*350a998dSThomas Huth
52*350a998dSThomas Huth
53*350a998dSThomas Huthif __name__ == '__main__':
54*350a998dSThomas Huth    ReplayKernelBase.main()
55