1*aff83583SPeter Maydell#!/usr/bin/env python3 2*aff83583SPeter Maydell# 3*aff83583SPeter Maydell# Functional test that boots a Linux kernel on a collie machine 4*aff83583SPeter Maydell# and checks the console 5*aff83583SPeter Maydell# 6*aff83583SPeter Maydell# SPDX-License-Identifier: GPL-2.0-or-later 7*aff83583SPeter Maydell 8*aff83583SPeter Maydellfrom qemu_test import LinuxKernelTest, Asset 9*aff83583SPeter Maydellfrom qemu_test.utils import archive_extract 10*aff83583SPeter Maydell 11*aff83583SPeter Maydellclass CollieTest(LinuxKernelTest): 12*aff83583SPeter Maydell 13*aff83583SPeter Maydell ASSET_ZIMAGE = Asset( 14*aff83583SPeter Maydell 'https://github.com/groeck/linux-test-downloads/raw/225223f2ad7d637b34426810bf6c3b727b76a718/collie/zImage', 15*aff83583SPeter Maydell '10ace8abf9e0875ef8a83b8829cc3b5b50bc6d7bc3ca29f19f49f5673a43c13b') 16*aff83583SPeter Maydell 17*aff83583SPeter Maydell ASSET_ROOTFS = Asset( 18*aff83583SPeter Maydell 'https://github.com/groeck/linux-test-downloads/raw/225223f2ad7d637b34426810bf6c3b727b76a718/collie/rootfs-sa110.cpio', 19*aff83583SPeter Maydell '89ccaaa5c6b33331887047e1618ffe81b0f55909173944347d5d2426f3bcc1f2') 20*aff83583SPeter Maydell 21*aff83583SPeter Maydell def test_arm_collie(self): 22*aff83583SPeter Maydell self.set_machine('collie') 23*aff83583SPeter Maydell zimage_path = self.ASSET_ZIMAGE.fetch() 24*aff83583SPeter Maydell rootfs_path = self.ASSET_ROOTFS.fetch() 25*aff83583SPeter Maydell self.vm.add_args('-append', 'rdinit=/sbin/init console=ttySA1') 26*aff83583SPeter Maydell self.launch_kernel(zimage_path, 27*aff83583SPeter Maydell initrd=rootfs_path, 28*aff83583SPeter Maydell wait_for='reboot: Restarting system') 29*aff83583SPeter Maydell 30*aff83583SPeter Maydellif __name__ == '__main__': 31*aff83583SPeter Maydell LinuxKernelTest.main() 32