1f348229eSThomas Huth#!/usr/bin/env python3 2f348229eSThomas Huth# 3f348229eSThomas Huth# Replay tests for the little-endian 64-bit MIPS Malta board 4f348229eSThomas Huth# 5f348229eSThomas Huth# SPDX-License-Identifier: GPL-2.0-or-later 6f348229eSThomas Huth 7*99fb9256SThomas Huthfrom qemu_test import Asset, skipUntrustedTest 8f348229eSThomas Huthfrom replay_kernel import ReplayKernelBase 9f348229eSThomas Huth 10f348229eSThomas Huth 11f348229eSThomas Huthclass Mips64elReplay(ReplayKernelBase): 12f348229eSThomas Huth 13f348229eSThomas Huth ASSET_KERNEL_2_63_2 = Asset( 14f348229eSThomas Huth ('http://snapshot.debian.org/archive/debian/' 15f348229eSThomas Huth '20130217T032700Z/pool/main/l/linux-2.6/' 16f348229eSThomas Huth 'linux-image-2.6.32-5-5kc-malta_2.6.32-48_mipsel.deb'), 17f348229eSThomas Huth '35eb476f03be589824b0310358f1c447d85e645b88cbcd2ac02b97ef560f9f8d') 18f348229eSThomas Huth 19f348229eSThomas Huth def test_replay_mips64el_malta(self): 20f348229eSThomas Huth self.set_machine('malta') 21f348229eSThomas Huth kernel_path = self.archive_extract(self.ASSET_KERNEL_2_63_2, 22f348229eSThomas Huth member='boot/vmlinux-2.6.32-5-5kc-malta') 23f348229eSThomas Huth kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE + 'console=ttyS0' 24f348229eSThomas Huth console_pattern = 'Kernel command line: %s' % kernel_command_line 25f348229eSThomas Huth self.run_rr(kernel_path, kernel_command_line, console_pattern, shift=5) 26f348229eSThomas Huth 27f348229eSThomas Huth 28f348229eSThomas Huth ASSET_KERNEL_3_19_3 = Asset( 29f348229eSThomas Huth ('https://github.com/philmd/qemu-testing-blob/' 30f348229eSThomas Huth 'raw/9ad2df38/mips/malta/mips64el/' 31f348229eSThomas Huth 'vmlinux-3.19.3.mtoman.20150408'), 32f348229eSThomas Huth '8d3beb003bc66051ead98e7172139017fcf9ce2172576541c57e86418dfa5ab8') 33f348229eSThomas Huth 34f348229eSThomas Huth ASSET_CPIO_R1 = Asset( 35f348229eSThomas Huth ('https://github.com/groeck/linux-build-test/' 36f348229eSThomas Huth 'raw/8584a59e/rootfs/mipsel64/' 37f348229eSThomas Huth 'rootfs.mipsel64r1.cpio.gz'), 38f348229eSThomas Huth '75ba10cd35fb44e32948eeb26974f061b703c81c4ba2fab1ebcacf1d1bec3b61') 39f348229eSThomas Huth 40f348229eSThomas Huth @skipUntrustedTest() 41f348229eSThomas Huth def test_replay_mips64el_malta_5KEc_cpio(self): 42f348229eSThomas Huth self.set_machine('malta') 43f348229eSThomas Huth self.cpu = '5KEc' 44f348229eSThomas Huth kernel_path = self.ASSET_KERNEL_3_19_3.fetch() 45f348229eSThomas Huth initrd_path = self.uncompress(self.ASSET_CPIO_R1) 46f348229eSThomas Huth 47f348229eSThomas Huth kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE + 48f348229eSThomas Huth 'console=ttyS0 console=tty ' 49f348229eSThomas Huth 'rdinit=/sbin/init noreboot') 50f348229eSThomas Huth console_pattern = 'Boot successful.' 51f348229eSThomas Huth self.run_rr(kernel_path, kernel_command_line, console_pattern, shift=5, 52f348229eSThomas Huth args=('-initrd', initrd_path)) 53f348229eSThomas Huth 54f348229eSThomas Huth 55f348229eSThomas Huthif __name__ == '__main__': 56f348229eSThomas Huth ReplayKernelBase.main() 57