Skip to content

Commit e4a407d

Browse files
committed
tests: Add functional tests for HPPA machines
Add quick firmware boot tests (less than 1sec) for the B160L (32-bit) and C3700 (64-bit) HPPA machines: $ make check-functional-hppa ... 4/4 qemu:func-quick+func-hppa / func-hppa-hppa_seabios OK 0.22s 2 subtests passed Remove the duplicated B160L test in qtest/boot-serial-test.c. Suggested-by: Helge Deller <[email protected]> Signed-off-by: Philippe Mathieu-Daudé <[email protected]> Reviewed-by: Helge Deller <[email protected]> Tested-by: Helge Deller <[email protected]> Reviewed-by: Thomas Huth <[email protected]> Reviewed-by: Richard Henderson <[email protected]> Message-Id: <[email protected]>
1 parent a870773 commit e4a407d

File tree

5 files changed

+41
-3
lines changed

5 files changed

+41
-3
lines changed

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1203,6 +1203,7 @@ F: include/hw/pci-host/astro.h
12031203
F: include/hw/pci-host/dino.h
12041204
F: pc-bios/hppa-firmware.img
12051205
F: roms/seabios-hppa/
1206+
F: tests/functional/test_hppa_seabios.py
12061207

12071208
LoongArch Machines
12081209
------------------

tests/functional/meson.build

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,10 @@ tests_avr_system_thorough = [
108108
'avr_mega2560',
109109
]
110110

111+
tests_hppa_system_quick = [
112+
'hppa_seabios',
113+
]
114+
111115
tests_i386_system_thorough = [
112116
'i386_tuxrun',
113117
]

tests/functional/test_hppa_seabios.py

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#!/usr/bin/env python3
2+
#
3+
# SeaBIOS boot test for HPPA machines
4+
#
5+
# Copyright (c) 2024 Linaro, Ltd
6+
#
7+
# SPDX-License-Identifier: GPL-2.0-or-later
8+
9+
from qemu_test import QemuSystemTest
10+
from qemu_test import wait_for_console_pattern
11+
12+
class HppaSeabios(QemuSystemTest):
13+
14+
timeout = 5
15+
MACH_BITS = {'B160L': 32, 'C3700': 64}
16+
17+
def boot_seabios(self):
18+
mach = self.machine
19+
bits = self.MACH_BITS[mach]
20+
self.vm.set_console()
21+
self.vm.launch()
22+
self.machine
23+
wait_for_console_pattern(self, f'SeaBIOS PA-RISC {bits}-bit Firmware')
24+
wait_for_console_pattern(self, f'Emulated machine: HP {mach} ({bits}-bit')
25+
26+
def test_hppa_32(self):
27+
self.set_machine('B160L')
28+
self.boot_seabios()
29+
30+
def test_hppa_64(self):
31+
self.set_machine('C3700')
32+
self.boot_seabios()
33+
34+
if __name__ == '__main__':
35+
QemuSystemTest.main()

tests/qtest/boot-serial-test.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,6 @@ static const testdef_t tests[] = {
189189
{ "microblazeel", "petalogix-ml605", "", "TT",
190190
sizeof(kernel_plml605), kernel_plml605 },
191191
{ "arm", "raspi2b", "", "TT", sizeof(bios_raspi2), 0, bios_raspi2 },
192-
/* For hppa, force bios to output to serial by disabling graphics. */
193-
{ "hppa", "B160L", "-vga none", "SeaBIOS wants SYSTEM HALT" },
194192
{ "aarch64", "virt", "-cpu max", "TT", sizeof(kernel_aarch64),
195193
kernel_aarch64 },
196194
{ "arm", "microbit", "", "T", sizeof(kernel_nrf51), kernel_nrf51 },

tests/qtest/meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ qtests_alpha = ['boot-serial-test'] + \
140140

141141
qtests_avr = [ 'boot-serial-test' ]
142142

143-
qtests_hppa = ['boot-serial-test'] + \
143+
qtests_hppa = \
144144
qtests_filter + \
145145
(config_all_devices.has_key('CONFIG_VGA') ? ['display-vga-test'] : [])
146146

0 commit comments

Comments
 (0)