Signed-off-by: Bernhard Beschow <[email protected]> --- MAINTAINERS | 1 + tests/functional/arm/meson.build | 1 + tests/functional/arm/test_sabrelite.py | 46 ++++++++++++++++++++++++++ 3 files changed, 48 insertions(+) create mode 100755 tests/functional/arm/test_sabrelite.py
diff --git a/MAINTAINERS b/MAINTAINERS index 6be9c5725b..7cc9e558f9 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1051,6 +1051,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 61b00932db..761b371a8d 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, } diff --git a/tests/functional/arm/test_sabrelite.py b/tests/functional/arm/test_sabrelite.py new file mode 100755 index 0000000000..31a0a49eac --- /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
