diff options
| author | Peter Maydell <peter.maydell@linaro.org> | 2024-10-29 12:54:42 +0000 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2024-10-29 15:04:46 +0000 |
| commit | aff835834b745b5a60483aa436b7f3db4c45c753 (patch) | |
| tree | 3bb559a500bb4063b16ab5f55138ef63fb1e6929 | |
| parent | 77dd098a5e790e3ede0dea5ddd5f690086fe608c (diff) | |
| download | focaccia-qemu-aff835834b745b5a60483aa436b7f3db4c45c753.tar.gz focaccia-qemu-aff835834b745b5a60483aa436b7f3db4c45c753.zip | |
tests/functional: Add a functional test for the collie board
Add a functional test for the collie board that uses the kernel and rootfs provided by Guenter Roeck in the linux-test-downloads repo: https://github.com/groeck/linux-test-downloads/ This just boots Linux with a userspace that immediately reboots the board, so we wait for the reboot log line. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-id: 20241017163247.711244-2-peter.maydell@linaro.org
| -rw-r--r-- | MAINTAINERS | 1 | ||||
| -rw-r--r-- | tests/functional/meson.build | 1 | ||||
| -rwxr-xr-x | tests/functional/test_arm_collie.py | 31 |
3 files changed, 33 insertions, 0 deletions
diff --git a/MAINTAINERS b/MAINTAINERS index f48d9142b8..6b1fa225d6 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -929,6 +929,7 @@ F: hw/arm/strongarm* F: hw/gpio/zaurus.c F: include/hw/arm/sharpsl.h F: docs/system/arm/collie.rst +F: tests/functional/test_arm_collie.py Stellaris M: Peter Maydell <peter.maydell@linaro.org> diff --git a/tests/functional/meson.build b/tests/functional/meson.build index 97c1c597e8..9538e103d6 100644 --- a/tests/functional/meson.build +++ b/tests/functional/meson.build @@ -54,6 +54,7 @@ tests_alpha_system_thorough = [ tests_arm_system_thorough = [ 'arm_aspeed', 'arm_canona1100', + 'arm_collie', 'arm_integratorcp', 'arm_raspi2', 'arm_vexpress', diff --git a/tests/functional/test_arm_collie.py b/tests/functional/test_arm_collie.py new file mode 100755 index 0000000000..7e144a0a8f --- /dev/null +++ b/tests/functional/test_arm_collie.py @@ -0,0 +1,31 @@ +#!/usr/bin/env python3 +# +# Functional test that boots a Linux kernel on a collie machine +# and checks the console +# +# SPDX-License-Identifier: GPL-2.0-or-later + +from qemu_test import LinuxKernelTest, Asset +from qemu_test.utils import archive_extract + +class CollieTest(LinuxKernelTest): + + ASSET_ZIMAGE = Asset( + 'https://github.com/groeck/linux-test-downloads/raw/225223f2ad7d637b34426810bf6c3b727b76a718/collie/zImage', + '10ace8abf9e0875ef8a83b8829cc3b5b50bc6d7bc3ca29f19f49f5673a43c13b') + + ASSET_ROOTFS = Asset( + 'https://github.com/groeck/linux-test-downloads/raw/225223f2ad7d637b34426810bf6c3b727b76a718/collie/rootfs-sa110.cpio', + '89ccaaa5c6b33331887047e1618ffe81b0f55909173944347d5d2426f3bcc1f2') + + def test_arm_collie(self): + self.set_machine('collie') + zimage_path = self.ASSET_ZIMAGE.fetch() + rootfs_path = self.ASSET_ROOTFS.fetch() + self.vm.add_args('-append', 'rdinit=/sbin/init console=ttySA1') + self.launch_kernel(zimage_path, + initrd=rootfs_path, + wait_for='reboot: Restarting system') + +if __name__ == '__main__': + LinuxKernelTest.main() |