xref: /qemu/tests/functional/test_sh4_r2d.py (revision 70ce076fa6dff60585c229a4b641b13e64bf03cf)
1#!/usr/bin/env python3
2#
3# Boot a Linux kernel on a r2d sh4 machine and check the console
4#
5# SPDX-License-Identifier: GPL-2.0-or-later
6
7from qemu_test import LinuxKernelTest, Asset, skipFlakyTest
8
9
10class R2dTest(LinuxKernelTest):
11
12    ASSET_DAY09 = Asset(
13        'https://qemu-advcal.gitlab.io/qac-best-of-multiarch/download/day09.tar.xz',
14        'a61b44d2630a739d1380cc4ff4b80981d47ccfd5992f1484ccf48322c35f09ac')
15
16    # This test has a 6-10% failure rate on various hosts that look
17    # like issues with a buggy kernel.
18    # XXX file tracking bug
19    @skipFlakyTest(bug_url=None)
20    def test_r2d(self):
21        self.set_machine('r2d')
22        self.archive_extract(self.ASSET_DAY09)
23        self.vm.add_args('-append', 'console=ttySC1')
24        self.launch_kernel(self.scratch_file('day09', 'zImage'),
25                           console_index=1,
26                           wait_for='QEMU advent calendar')
27
28if __name__ == '__main__':
29    LinuxKernelTest.main()
30