blob: 8d6a74920106c8a93c53e5207f7af1002f80e1ff [file] [log] [blame]
David Gibsonc5f0a812021-09-27 14:48:02 +10001# Test that Linux kernel boots on ppc machines and check the console
2#
3# Copyright (c) 2018, 2020 Red Hat, Inc.
4#
5# This work is licensed under the terms of the GNU GPL, version 2 or
6# later. See the COPYING file in the top-level directory.
7
8from avocado.utils import archive
Philippe Mathieu-Daudé2283b622021-09-27 18:14:33 +02009from avocado_qemu import QemuSystemTest
David Gibsonc5f0a812021-09-27 14:48:02 +100010from avocado_qemu import wait_for_console_pattern
11
Philippe Mathieu-Daudé2283b622021-09-27 18:14:33 +020012class Mpc8544dsMachine(QemuSystemTest):
David Gibsonc5f0a812021-09-27 14:48:02 +100013
14 timeout = 90
15 KERNEL_COMMON_COMMAND_LINE = 'printk.time=0 '
16 panic_message = 'Kernel panic - not syncing'
17
18 def test_ppc_mpc8544ds(self):
19 """
20 :avocado: tags=arch:ppc
21 :avocado: tags=machine:mpc8544ds
Daniel Henrique Barboza32768842022-03-14 15:57:17 +010022 :avocado: tags=accel:tcg
David Gibsonc5f0a812021-09-27 14:48:02 +100023 """
Daniel Henrique Barboza32768842022-03-14 15:57:17 +010024 self.require_accelerator("tcg")
David Gibsonc5f0a812021-09-27 14:48:02 +100025 tar_url = ('https://www.qemu-advent-calendar.org'
26 '/2020/download/day17.tar.gz')
27 tar_hash = '7a5239542a7c4257aa4d3b7f6ddf08fb6775c494'
28 file_path = self.fetch_asset(tar_url, asset_hash=tar_hash)
29 archive.extract(file_path, self.workdir)
30 self.vm.set_console()
31 self.vm.add_args('-kernel', self.workdir + '/creek/creek.bin')
32 self.vm.launch()
33 wait_for_console_pattern(self, 'QEMU advent calendar 2020',
34 self.panic_message)