From: Bernhard Beschow <[email protected]> The test currently exercises the Linux kernel and waits for the first daemons to be started. At this point, basic hardware is initialized and if the log message is reached, no driver ended up in an endless loop, thus the system should be usable.
Reviewed-by: Philippe Mathieu-Daudé <[email protected]> Reviewed-by: Bin Meng <[email protected]> Signed-off-by: Bernhard Beschow <[email protected]> Message-ID: <[email protected]> Signed-off-by: Philippe Mathieu-Daudé <[email protected]> --- MAINTAINERS | 1 + tests/functional/arm/meson.build | 2 ++ tests/functional/arm/test_sabrelite.py | 46 ++++++++++++++++++++++++++ 3 files changed, 49 insertions(+) create mode 100755 tests/functional/arm/test_sabrelite.py diff --git a/MAINTAINERS b/MAINTAINERS index 4ca1751e30f5..47fbd05db186 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1069,6 +1069,7 @@ F: include/hw/usb/imx-usb-phy.h F: include/hw/arm/fsl-imx6.h F: include/hw/misc/imx6_*.h F: include/hw/ssi/imx_spi.h +F: tests/functional/arm/test_sabrelite.py SBSA-REF M: Peter Maydell <[email protected]> diff --git a/tests/functional/arm/meson.build b/tests/functional/arm/meson.build index 61b00932db93..989b841555d7 100644 --- a/tests/functional/arm/meson.build +++ b/tests/functional/arm/meson.build @@ -24,6 +24,7 @@ test_arm_timeouts = { 'quanta_gsj' : 240, 'raspi2' : 120, 'replay' : 240, + 'sabrelite' : 240, 'tuxrun' : 240, 'sx1' : 360, } @@ -65,6 +66,7 @@ tests_arm_system_thorough = [ 'raspi2', 'realview', 'replay', + 'sabrelite', 'smdkc210', 'stellaris', 'sx1', diff --git a/tests/functional/arm/test_sabrelite.py b/tests/functional/arm/test_sabrelite.py new file mode 100755 index 000000000000..31a0a49eac4d --- /dev/null +++ b/tests/functional/arm/test_sabrelite.py @@ -0,0 +1,46 @@ +#!/usr/bin/env python3 +# +# Functional test that boots a Linux kernel and checks the console +# +# SPDX-License-Identifier: GPL-2.0-or-later + +from qemu_test import LinuxKernelTest, Asset + + +class SabreliteMachine(LinuxKernelTest): + + ASSET_KERNEL = Asset( + ('https://ftp.debian.org/debian/dists/bookworm/main/installer-armhf/' + '20230607/images/netboot/vmlinuz'), + '5851e9c61465a26db810796db671c4729e66e81c365b3ebb1a4b7f772737605b') + + ASSET_INITRD = Asset( + ('https://ftp.debian.org/debian/dists/bookworm/main/installer-armhf/' + '20230607/images/netboot/initrd.gz'), + 'fe33f836232a9107716d34dc56d36dea81bab039243a2a42ea6583a50c9b92ca') + + ASSET_DTB = Asset( + ('https://ftp.debian.org/debian/dists/bookworm/main/installer-armhf/' + '20230607/images/device-tree/imx6q-sabrelite.dtb'), + '3ad637c8ea55ebd058a67f686e050b82ccb0d1327bc283623c133c48ad87db44') + + def setUp(self): + super().setUp() + + self.kernel_path = self.ASSET_KERNEL.fetch() + self.initrd_path = self.ASSET_INITRD.fetch() + self.dtb_path = self.ASSET_DTB.fetch() + + def test_console(self): + self.require_accelerator("tcg") + self.set_machine('sabrelite') + self.vm.set_console(console_index=1) + self.vm.add_args('-kernel', self.kernel_path, + '-initrd', self.initrd_path, + '-dtb', self.dtb_path) + + self.vm.launch() + self.wait_for_console_pattern('Starting system log daemon:') + +if __name__ == '__main__': + LinuxKernelTest.main() -- 2.55.0
