19a76bc04SThomas Huth#!/usr/bin/env python3 29a76bc04SThomas Huth# 39a76bc04SThomas Huth# Functional test that boots a Linux kernel on an Alpha Clipper machine 49a76bc04SThomas Huth# and checks the console 59a76bc04SThomas Huth# 69a76bc04SThomas Huth# SPDX-License-Identifier: GPL-2.0-or-later 79a76bc04SThomas Huth 89a76bc04SThomas Huthfrom qemu_test import LinuxKernelTest, Asset 99a76bc04SThomas Huth 109a76bc04SThomas Huth 119a76bc04SThomas Huthclass AlphaClipperTest(LinuxKernelTest): 129a76bc04SThomas Huth 139a76bc04SThomas Huth ASSET_KERNEL = Asset( 149a76bc04SThomas Huth ('http://archive.debian.org/debian/dists/lenny/main/' 159a76bc04SThomas Huth 'installer-alpha/20090123lenny10/images/cdrom/vmlinuz'), 169a76bc04SThomas Huth '34f53da3fa32212e4f00b03cb944b2ad81c06bc8faaf9b7193b2e544ceeca576') 179a76bc04SThomas Huth 189a76bc04SThomas Huth def test_alpha_clipper(self): 199a76bc04SThomas Huth self.set_machine('clipper') 209a76bc04SThomas Huth kernel_path = self.ASSET_KERNEL.fetch() 219a76bc04SThomas Huth 22*65d35a4eSDaniel P. Berrangé uncompressed_kernel = self.uncompress(self.ASSET_KERNEL, format="gz") 239a76bc04SThomas Huth 249a76bc04SThomas Huth self.vm.set_console() 259a76bc04SThomas Huth kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE + 'console=ttyS0' 269a76bc04SThomas Huth self.vm.add_args('-nodefaults', 279a76bc04SThomas Huth '-kernel', uncompressed_kernel, 289a76bc04SThomas Huth '-append', kernel_command_line) 299a76bc04SThomas Huth self.vm.launch() 309a76bc04SThomas Huth console_pattern = 'Kernel command line: %s' % kernel_command_line 319a76bc04SThomas Huth self.wait_for_console_pattern(console_pattern) 329a76bc04SThomas Huth 339a76bc04SThomas Huthif __name__ == '__main__': 349a76bc04SThomas Huth LinuxKernelTest.main() 35