xref: /qemu/tests/functional/test_m68k_q800.py (revision 3c5a5e213e5f08fbfe70728237f7799ac70f5b99)
1c7f3663cSThomas Huth#!/usr/bin/env python3
2c7f3663cSThomas Huth#
3c7f3663cSThomas Huth# Functional test for testing the q800 m68k machine
4c7f3663cSThomas Huth#
5c7f3663cSThomas Huth# This work is licensed under the terms of the GNU GPL, version 2 or
6c7f3663cSThomas Huth# later.  See the COPYING file in the top-level directory.
7c7f3663cSThomas Huth
8c7f3663cSThomas Huthfrom qemu_test import LinuxKernelTest, Asset
9c7f3663cSThomas Huth
10c7f3663cSThomas Huthclass Q800MachineTest(LinuxKernelTest):
11c7f3663cSThomas Huth
12c7f3663cSThomas Huth    ASSET_KERNEL = Asset(
13c7f3663cSThomas Huth        ('https://snapshot.debian.org/'
14c7f3663cSThomas Huth         'archive/debian-ports/20191021T083923Z/pool-m68k/main/l/linux/'
15c7f3663cSThomas Huth         'kernel-image-5.3.0-1-m68k-di_5.3.7-1_m68k.udeb'),
16c7f3663cSThomas Huth        '949e50d74d4b9bc15d26c06d402717b7a4c0e32ff8100014f5930d8024de7b73')
17c7f3663cSThomas Huth
18c7f3663cSThomas Huth    def test_m68k_q800(self):
19c7f3663cSThomas Huth        self.set_machine('q800')
20c7f3663cSThomas Huth
215831ed84SDaniel P. Berrangé        kernel_path = self.archive_extract(self.ASSET_KERNEL,
225831ed84SDaniel P. Berrangé                                           member='boot/vmlinux-5.3.0-1-m68k')
23c7f3663cSThomas Huth
24c7f3663cSThomas Huth        self.vm.set_console()
25c7f3663cSThomas Huth        kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE +
26c7f3663cSThomas Huth                               'console=ttyS0 vga=off')
27c7f3663cSThomas Huth        self.vm.add_args('-kernel', kernel_path,
28*9e9542a1SVolker Rümelin                         '-append', kernel_command_line,
29*9e9542a1SVolker Rümelin                         '-audio', 'none')
30c7f3663cSThomas Huth        self.vm.launch()
31c7f3663cSThomas Huth        console_pattern = 'Kernel command line: %s' % kernel_command_line
32c7f3663cSThomas Huth        self.wait_for_console_pattern(console_pattern)
33c7f3663cSThomas Huth        console_pattern = 'No filesystem could mount root'
34c7f3663cSThomas Huth        self.wait_for_console_pattern(console_pattern)
35c7f3663cSThomas Huth
36c7f3663cSThomas Huthif __name__ == '__main__':
37c7f3663cSThomas Huth    LinuxKernelTest.main()
38