qemu/tests/functional/test_arm_sx1.py
Peter Maydell fe95724da2 tests/functional: Bump some arm test timeouts
On my local machine, for a debug build, sbsaref_alpine takes
nearly 900s:

$ (cd build/x86 && ./pyvenv/bin/meson test --setup thorough --suite func-thorough func-aarch64-aarch64_sbsaref_alpine
)

1/1 qemu:func-thorough+func-aarch64-thorough+thorough / func-aarch64-aarch64_sbsaref_alpine
                      OK 896.90s

arm_aspeed_rainier can also run close to its current timeout:
 6/44 qemu:func-thorough+func-arm-thorough+thorough / func-arm-arm_aspeed_rainier
                      OK 215.75s

and arm_aspeed_ast2500 and arm_aspeed_ast2600 can go over:
13/44 qemu:func-thorough+func-arm-thorough+thorough / func-arm-arm_aspeed_ast2600
                      OK 792.94s

27/44 qemu:func-thorough+func-arm-thorough+thorough / func-arm-arm_aspeed_ast2500
                 TIMEOUT 480.01s

The sx1 test fails not on the overall meson timeout but on the
60 second timeout in some of the subtests.

Bump all these timeouts up a bit.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20250221140640.786341-1-peter.maydell@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
2025-02-26 07:43:25 +01:00

72 lines
2.9 KiB
Python
Executable file

#!/usr/bin/env python3
#
# Copyright (c) 2024 Linaro Ltd.
#
# Functional test that boots a Linux kernel on an sx1 machine
# and checks the console. We have three variants:
# * just boot initrd
# * boot with filesystem on SD card
# * boot from flash
# In all cases these images have a userspace that is configured
# to immediately reboot the system on successful boot, so we
# only need to wait for QEMU to exit (via -no-reboot).
#
# SPDX-License-Identifier: GPL-2.0-or-later
from qemu_test import LinuxKernelTest, Asset
class SX1Test(LinuxKernelTest):
ASSET_ZIMAGE = Asset(
'https://github.com/groeck/linux-test-downloads/raw/225223f2ad7d637b34426810bf6c3b727b76a718/sx1/zImage',
'a0271899a8dc2165f9e0adb2d0a57fc839ae3a469722ffc56c77e108a8887615')
ASSET_INITRD = Asset(
'https://github.com/groeck/linux-test-downloads/raw/225223f2ad7d637b34426810bf6c3b727b76a718/sx1/rootfs-armv4.cpio',
'35b0721249821aa544cd85b85d3cb8901db4c6d128eed86ab261e5d9e37d58f8')
ASSET_SD_FS = Asset(
'https://github.com/groeck/linux-test-downloads/raw/225223f2ad7d637b34426810bf6c3b727b76a718/sx1/rootfs-armv4.ext2',
'c1db7f43ef92469ebc8605013728c8950e7608439f01d13678994f0ce101c3a8')
ASSET_FLASH = Asset(
'https://github.com/groeck/linux-test-downloads/raw/225223f2ad7d637b34426810bf6c3b727b76a718/sx1/flash',
'17e6a2758fa38efd2666be0879d4751fd37d194f25168a8deede420df519b676')
CONSOLE_ARGS = 'console=ttyS0,115200 earlycon=uart8250,mmio32,0xfffb0000,115200n8'
def test_arm_sx1_initrd(self):
self.set_machine('sx1')
zimage_path = self.ASSET_ZIMAGE.fetch()
initrd_path = self.ASSET_INITRD.fetch()
self.vm.add_args('-append', f'kunit.enable=0 rdinit=/sbin/init {self.CONSOLE_ARGS}')
self.vm.add_args('-no-reboot')
self.launch_kernel(zimage_path,
initrd=initrd_path)
self.vm.wait(timeout=120)
def test_arm_sx1_sd(self):
self.set_machine('sx1')
zimage_path = self.ASSET_ZIMAGE.fetch()
sd_fs_path = self.ASSET_SD_FS.fetch()
self.vm.add_args('-append', f'kunit.enable=0 root=/dev/mmcblk0 rootwait {self.CONSOLE_ARGS}')
self.vm.add_args('-no-reboot')
self.vm.add_args('-snapshot')
self.vm.add_args('-drive', f'format=raw,if=sd,file={sd_fs_path}')
self.launch_kernel(zimage_path)
self.vm.wait(timeout=120)
def test_arm_sx1_flash(self):
self.set_machine('sx1')
zimage_path = self.ASSET_ZIMAGE.fetch()
flash_path = self.ASSET_FLASH.fetch()
self.vm.add_args('-append', f'kunit.enable=0 root=/dev/mtdblock3 rootwait {self.CONSOLE_ARGS}')
self.vm.add_args('-no-reboot')
self.vm.add_args('-snapshot')
self.vm.add_args('-drive', f'format=raw,if=pflash,file={flash_path}')
self.launch_kernel(zimage_path)
self.vm.wait(timeout=120)
if __name__ == '__main__':
LinuxKernelTest.main()