test_malta.py sometimes times out (likely hang) under GitLab CI: 1/57 qemu:func-thorough+func-mips-thorough+thorough / func-mips-malta TIMEOUT 480.11s killed by signal 15 SIGTERM console.log shows a soft lockup failure: 06:46,426: INIT: version 2.88 booting 06:46,942: [[36minfo[39;49m] Using makefile-style concurrent boot in runlevel S. 06:47,378: findfs: unable to resolve 'UUID=042f1883-e9a5-4801-bb9b-667b5c8e87ea' 06:50,448: [....] Starting the hotplug events dispatcher: udevd[?25l[?1c7[1G[[32m ok [39;49m8[?25h[?0c. 06:52,269: [....] Synthesizing the initial hotplug events...module e1000: dangerous R_MIPS_LO16 REL relocation 07:17,707: BUG: soft lockup - CPU#0 stuck for 22s! [modprobe:208] 07:17,707: Modules linked in: 07:17,707: Cpu 0 07:17,708: $ 0 : 00000000 1000a400 0000003d 87808b00 07:17,708: $ 4 : 87808b00 87808bf0 00000000 00000000 07:17,709: $ 8 : 86862100 86862100 86862100 86862100 07:17,709: $12 : 86862100 00000000 00000001 86862100 07:17,709: $16 : 87808a00 86862100 1000a401 c008fa60 07:17,709: $20 : 86862100 8041d230 00000000 ffff0000 07:17,710: $24 : 00000000 77711470 07:17,710: $28 : 87bb6000 87bb7df8 8041d230 801f7388 07:17,710: Hi : 00000000 07:17,710: Lo : 00000000 07:17,711: epc : 801f7308 kfree+0x104/0x19c 07:17,711: Not tainted 07:17,711: ra : 801f7388 kfree+0x184/0x19c 07:17,712: Status: 1000a403 KERNEL EXL IE 07:17,712: Cause : 50808000 07:17,712: PrId : 00019300 (MIPS 24Kc) 07:45,707: BUG: soft lockup - CPU#0 stuck for 22s! [modprobe:208] 07:45,707: Modules linked in: Reported-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-ID: <20251031094118.28440-3-philmd@linaro.org>
110 lines
4.2 KiB
Python
Executable file
110 lines
4.2 KiB
Python
Executable file
#!/usr/bin/env python3
|
|
#
|
|
# Functional tests for the little-endian 32-bit MIPS Malta board
|
|
#
|
|
# Copyright (c) Philippe Mathieu-Daudé <f4bug@amsat.org>
|
|
#
|
|
# This work is licensed under the terms of the GNU GPL, version 2 or later.
|
|
# See the COPYING file in the top-level directory.
|
|
#
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
from qemu_test import QemuSystemTest, LinuxKernelTest, Asset
|
|
from qemu_test import skipFlakyTest
|
|
from qemu_test import interrupt_interactive_console_until_pattern
|
|
from qemu_test import wait_for_console_pattern
|
|
|
|
from mips.test_malta import mips_check_wheezy
|
|
|
|
|
|
class MaltaMachineConsole(LinuxKernelTest):
|
|
|
|
ASSET_KERNEL_4K = Asset(
|
|
('http://mipsdistros.mips.com/LinuxDistro/nanomips/'
|
|
'kernels/v4.15.18-432-gb2eb9a8b07a1-20180627102142/'
|
|
'generic_nano32r6el_page4k.xz'),
|
|
'019e034094ac6cf3aa77df5e130fb023ce4dbc804b04bfcc560c6403e1ae6bdb')
|
|
ASSET_KERNEL_16K = Asset(
|
|
('http://mipsdistros.mips.com/LinuxDistro/nanomips/'
|
|
'kernels/v4.15.18-432-gb2eb9a8b07a1-20180627102142/'
|
|
'generic_nano32r6el_page16k_up.xz'),
|
|
'3a54a10b3108c16a448dca9ea3db378733a27423befc2a45a5bdf990bd85e12c')
|
|
ASSET_KERNEL_64K = Asset(
|
|
('http://mipsdistros.mips.com/LinuxDistro/nanomips/'
|
|
'kernels/v4.15.18-432-gb2eb9a8b07a1-20180627102142/'
|
|
'generic_nano32r6el_page64k_dbg.xz'),
|
|
'ce21ff4b07a981ecb8a39db2876616f5a2473eb2ab459c6f67465b9914b0c6b6')
|
|
|
|
def do_test_mips_malta32el_nanomips(self, kernel):
|
|
kernel_path = self.uncompress(kernel)
|
|
|
|
self.set_machine('malta')
|
|
self.vm.set_console()
|
|
kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE
|
|
+ 'mem=256m@@0x0 '
|
|
+ 'console=ttyS0')
|
|
self.vm.add_args('-cpu', 'I7200',
|
|
'-no-reboot',
|
|
'-kernel', kernel_path,
|
|
'-append', kernel_command_line)
|
|
self.vm.launch()
|
|
console_pattern = 'Kernel command line: %s' % kernel_command_line
|
|
self.wait_for_console_pattern(console_pattern)
|
|
|
|
def test_mips_malta32el_nanomips_4k(self):
|
|
self.do_test_mips_malta32el_nanomips(self.ASSET_KERNEL_4K)
|
|
|
|
def test_mips_malta32el_nanomips_16k_up(self):
|
|
self.do_test_mips_malta32el_nanomips(self.ASSET_KERNEL_16K)
|
|
|
|
def test_mips_malta32el_nanomips_64k_dbg(self):
|
|
self.do_test_mips_malta32el_nanomips(self.ASSET_KERNEL_64K)
|
|
|
|
ASSET_WHEEZY_KERNEL = Asset(
|
|
('https://people.debian.org/~aurel32/qemu/mipsel/'
|
|
'vmlinux-3.2.0-4-4kc-malta'),
|
|
'dc8a3648305b0201ca7a5cd135fe2890067a65d93c38728022bb0e656ad2bf9a')
|
|
|
|
ASSET_WHEEZY_DISK = Asset(
|
|
('https://people.debian.org/~aurel32/qemu/mipsel/'
|
|
'debian_wheezy_mipsel_standard.qcow2'),
|
|
'454f09ae39f7e6461c84727b927100d2c7813841f2a0a5dce328114887ecf914')
|
|
|
|
@skipFlakyTest("https://gitlab.com/qemu-project/qemu/-/issues/3109")
|
|
def test_wheezy(self):
|
|
kernel_path = self.ASSET_WHEEZY_KERNEL.fetch()
|
|
image_path = self.ASSET_WHEEZY_DISK.fetch()
|
|
kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE
|
|
+ 'console=ttyS0 root=/dev/sda1')
|
|
mips_check_wheezy(self,
|
|
kernel_path, image_path, kernel_command_line,
|
|
dl_file='/boot/initrd.img-3.2.0-4-4kc-malta',
|
|
hsum='9fc9f250ed56a74e35e704ddfd5a1c5a5625adefc5c9da91f649288d3ca000f0')
|
|
|
|
|
|
class MaltaMachineYAMON(QemuSystemTest):
|
|
|
|
ASSET_YAMON_ROM = Asset(
|
|
('https://s3-eu-west-1.amazonaws.com/downloads-mips/mips-downloads/'
|
|
'YAMON/yamon-bin-02.22.zip'),
|
|
'eef86f0eed0ef554f041dcd47b87eebea0e6f9f1184ed31f7e9e8b4a803860ab')
|
|
|
|
def test_mipsel_malta_yamon(self):
|
|
yamon_bin = 'yamon-02.22.bin'
|
|
self.archive_extract(self.ASSET_YAMON_ROM)
|
|
yamon_path = self.scratch_file(yamon_bin)
|
|
|
|
self.set_machine('malta')
|
|
self.vm.set_console()
|
|
self.vm.add_args('-bios', yamon_path)
|
|
self.vm.launch()
|
|
|
|
prompt = 'YAMON>'
|
|
pattern = 'YAMON ROM Monitor'
|
|
interrupt_interactive_console_until_pattern(self, pattern, prompt)
|
|
wait_for_console_pattern(self, prompt)
|
|
self.vm.shutdown()
|
|
|
|
|
|
if __name__ == '__main__':
|
|
QemuSystemTest.main()
|