diff options
| author | Peter Maydell <peter.maydell@linaro.org> | 2024-10-21 17:12:59 +0100 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2024-10-21 17:12:59 +0100 |
| commit | 6f625ce2f21d6a1243065d236298277c56f972d5 (patch) | |
| tree | 20f2824d34166cf17e3fd4b9073ed5cb36c2fbfb /tests/functional/test_sh4_tuxrun.py | |
| parent | 91e4e1832e3c3fb81673ab730253f7f68064b06f (diff) | |
| parent | c592ff35110a5f7e247d3933871d5aca74fc9288 (diff) | |
| download | focaccia-qemu-6f625ce2f21d6a1243065d236298277c56f972d5.tar.gz focaccia-qemu-6f625ce2f21d6a1243065d236298277c56f972d5.zip | |
Merge tag 'pull-request-2024-10-21' of https://gitlab.com/thuth/qemu into staging
* Convert most Tuxrun Avocado tests to the new functional framework * Update the OpenBSD CI image to OpenBSD v7.6 * Bump timeout of the ide-test * New maintainer for the QTests * Disable the pci-bridge on s390x by default # -----BEGIN PGP SIGNATURE----- # # iQJFBAABCAAvFiEEJ7iIR+7gJQEY8+q5LtnXdP5wLbUFAmcWfCgRHHRodXRoQHJl # ZGhhdC5jb20ACgkQLtnXdP5wLbV6kQ//YwRebyA192IBM+XQK5YYmguieHmWxV8J # fZf0a1dWN8oiT3jzI48YWttiU9P6AMa/dwiuepVl4G9+d+w1c3RhS6kQqJljNbDb # NGw+LVZZcwY1FJpEsEwbDfePkugYHmNXUU672kxz3I8bv/8NmLDc7R3cI5U/7+SP # N4lxVM6Hd3XZZdc+O2S8En20E1oAJ6IvJwwhCqjLlT36Ez8P69KQhE0V8MtLnrBg # FsXZuzmaxt/ZDMhTsiHNl6f7N1oD7Y2TPJrdq7V2aihpDA+zx0RlvBPpzD98ZgeS # PtdkqjL63B5S3RL4fjJUSb/gbL4oChQ5TZDb2Dfw7Q5qPMZ1cgeJLBwdzHZEZrzF # RTtn4fObYUqtRF3M0Ha4xXc8odSzJTV2fvpSVXcljG1E4AMcD6CMK0E472XbhkMS # txZHW+C/IDVJ4OoSncrH8ybi1JasEqJZ0YaPfb+aTsPV058b65l+0jQJtlxLoTIf # p5LluL3exwr0sS3Aq5tcV3pNITtCv1FkcUk7So8sohO2OLQtC9QA300CSXna8XhQ # OxgRA1c3HXw23MTJKSWjseDIt1bajvBu+cr/pmDxlYnWWsSCcEFaAoQohwhOMA6Z # JfJF0tSv+koUsw6hSl7146aylSvDYUKPilAGgAUAy1yscgglMvtmQqWkEta/XGP2 # U8qvX8nUwOM= # =DJf9 # -----END PGP SIGNATURE----- # gpg: Signature made Mon 21 Oct 2024 17:07:04 BST # gpg: using RSA key 27B88847EEE0250118F3EAB92ED9D774FE702DB5 # gpg: issuer "thuth@redhat.com" # gpg: Good signature from "Thomas Huth <th.huth@gmx.de>" [full] # gpg: aka "Thomas Huth <thuth@redhat.com>" [full] # gpg: aka "Thomas Huth <huth@tuxfamily.org>" [full] # gpg: aka "Thomas Huth <th.huth@posteo.de>" [unknown] # Primary key fingerprint: 27B8 8847 EEE0 2501 18F3 EAB9 2ED9 D774 FE70 2DB5 * tag 'pull-request-2024-10-21' of https://gitlab.com/thuth/qemu: tests/functional: Convert the Avocado sh4 tuxrun test Revert "hw/sh4/r2d: Realize IDE controller before accessing it" tests/functional: Convert the Avocado ppc32 tuxrun test tests/functional: Convert the Avocado mips64el tuxrun test tests/functional: Convert the Avocado mips64 tuxrun test tests/functional: Convert the Avocado mipsel tuxrun test tests/functional: Convert the Avocado mips tuxrun test tests/functional: Convert the Avocado x86_64 tuxrun test tests/functional: Convert the Avocado i386 tuxrun test tests/functional: Convert the Avocado riscv64 tuxrun tests tests/functional: Convert the Avocado riscv32 tuxrun tests tests/functional: Convert the Avocado arm tuxrun tests tests/functional: Convert the Avocado s390x tuxrun test tests/functional: Convert the Avocado sparc64 tuxrun test tests/functional: Convert the Avocado ppc64 tuxrun tests tests/functional: Add a base class for the TuxRun tests hw/pci-bridge: Add a Kconfig switch for the normal PCI bridge MAINTAINERS: A new maintainer for the qtests tests/qtest: Raise the ide-test timeout tests/vm: update openbsd image to 7.6 Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'tests/functional/test_sh4_tuxrun.py')
| -rwxr-xr-x | tests/functional/test_sh4_tuxrun.py | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/tests/functional/test_sh4_tuxrun.py b/tests/functional/test_sh4_tuxrun.py new file mode 100755 index 0000000000..352cb360ef --- /dev/null +++ b/tests/functional/test_sh4_tuxrun.py @@ -0,0 +1,57 @@ +#!/usr/bin/env python3 +# +# Functional test that boots known good tuxboot images the same way +# that tuxrun (www.tuxrun.org) does. This tool is used by things like +# the LKFT project to run regression tests on kernels. +# +# Copyright (c) 2023 Linaro Ltd. +# +# Author: +# Alex Bennée <alex.bennee@linaro.org> +# +# SPDX-License-Identifier: GPL-2.0-or-later + +import os +import time + +from unittest import skipUnless +from qemu_test import Asset, exec_command_and_wait_for_pattern, exec_command +from qemu_test.tuxruntest import TuxRunBaselineTest + +class TuxRunSh4Test(TuxRunBaselineTest): + + ASSET_SH4_KERNEL = Asset( + 'https://storage.tuxboot.com/20230331/sh4/zImage', + '29d9b2aba604a0f53a5dc3b5d0f2b8e35d497de1129f8ee5139eb6fdf0db692f') + ASSET_SH4_ROOTFS = Asset( + 'https://storage.tuxboot.com/20230331/sh4/rootfs.ext4.zst', + '3592a7a3d5a641e8b9821449e77bc43c9904a56c30d45da0694349cfd86743fd') + + # Note: some segfaults caused by unaligned userspace access + @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable') + def test_sh4(self): + self.set_machine('r2d') + self.cpu='sh7785' + self.root='sda' + self.console='ttySC1' + + # The test is currently too unstable to do much in userspace + # so we skip common_tuxrun and do a minimal boot and shutdown. + (kernel, disk, dtb) = self.fetch_tuxrun_assets(self.ASSET_SH4_KERNEL, + self.ASSET_SH4_ROOTFS) + + # the console comes on the second serial port + self.prepare_run(kernel, disk, + "driver=ide-hd,bus=ide.0,unit=0", + console_index=1) + self.vm.launch() + + self.wait_for_console_pattern("Welcome to TuxTest") + time.sleep(0.1) + exec_command(self, 'root') + time.sleep(0.1) + exec_command_and_wait_for_pattern(self, 'halt', + "reboot: System halted") + +if __name__ == '__main__': + TuxRunBaselineTest.main() |