Skip to content

Commit 8c43292

Browse files
committed
tests/acceptance: Add a test for the sun4u sparc64 machine
We can use the image from the advent calendar 2018 to test the sun4u machine. It's not using the "QEMU advent calendar" string, so we can not use the do_test_advcal_2018() from boot_linux_console.py, thus let's also put it into a separate file to also be able to add an entry to the MAINTAINERS file. Message-Id: <[email protected]> Tested-by: Mark Cave-Ayland <[email protected]> Tested-by: Philippe Mathieu-Daudé <[email protected]> Reviewed-by: Philippe Mathieu-Daudé <[email protected]> Signed-off-by: Thomas Huth <[email protected]>
1 parent c7aab58 commit 8c43292

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1319,6 +1319,7 @@ F: include/hw/pci-host/sabre.h
13191319
F: hw/pci-bridge/simba.c
13201320
F: include/hw/pci-bridge/simba.h
13211321
F: pc-bios/openbios-sparc64
1322+
F: tests/acceptance/machine_sparc64_sun4u.py
13221323

13231324
Sun4v
13241325
M: Artyom Tarasenko <[email protected]>
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Functional test that boots a Linux kernel and checks the console
2+
#
3+
# Copyright (c) 2020 Red Hat, Inc.
4+
#
5+
# Author:
6+
# Thomas Huth <[email protected]>
7+
#
8+
# This work is licensed under the terms of the GNU GPL, version 2 or
9+
# later. See the COPYING file in the top-level directory.
10+
11+
import os
12+
13+
from avocado_qemu import wait_for_console_pattern
14+
from avocado.utils import archive
15+
from boot_linux_console import LinuxKernelTest
16+
17+
class Sun4uMachine(LinuxKernelTest):
18+
"""Boots the Linux kernel and checks that the console is operational"""
19+
20+
timeout = 90
21+
22+
def test_sparc64_sun4u(self):
23+
"""
24+
:avocado: tags=arch:sparc64
25+
:avocado: tags=machine:sun4u
26+
"""
27+
tar_url = ('https://www.qemu-advent-calendar.org'
28+
'/2018/download/day23.tar.xz')
29+
tar_hash = '142db83cd974ffadc4f75c8a5cad5bcc5722c240'
30+
file_path = self.fetch_asset(tar_url, asset_hash=tar_hash)
31+
archive.extract(file_path, self.workdir)
32+
self.vm.set_console()
33+
self.vm.add_args('-kernel', self.workdir + '/day23/vmlinux',
34+
'-append', self.KERNEL_COMMON_COMMAND_LINE)
35+
self.vm.launch()
36+
wait_for_console_pattern(self, 'Starting logging: OK')

0 commit comments

Comments
 (0)