From: Thomas Huth <thuth@redhat.com>
To: qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>
Subject: [PULL 16/22] tests/functional: Convert Aarch64 Raspi3 avocado tests
Date: Tue, 10 Sep 2024 14:37:17 +0200 [thread overview]
Message-ID: <20240910123726.182975-17-thuth@redhat.com> (raw)
In-Reply-To: <20240910123726.182975-1-thuth@redhat.com>
From: Philippe Mathieu-Daudé <philmd@linaro.org>
Straight forward conversion. Update the SHA1 hashes to SHA256
hashes since SHA1 should not be used anymore nowadays.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20240826221058.75126-4-philmd@linaro.org>
[thuth: Use the LinuxKernelTest class]
Message-ID: <20240906180549.792832-11-thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
MAINTAINERS | 1 +
tests/avocado/boot_linux_console.py | 23 --------------
tests/functional/meson.build | 1 +
tests/functional/test_aarch64_raspi3.py | 41 +++++++++++++++++++++++++
4 files changed, 43 insertions(+), 23 deletions(-)
create mode 100755 tests/functional/test_aarch64_raspi3.py
diff --git a/MAINTAINERS b/MAINTAINERS
index 3cc9c19d02..828c469478 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -912,6 +912,7 @@ F: include/hw/arm/rasp*
F: include/hw/*/bcm283*
F: docs/system/arm/raspi.rst
F: tests/functional/test_arm_raspi2.py
+F: tests/functional/test_aarch64_raspi3.py
Real View
M: Peter Maydell <peter.maydell@linaro.org>
diff --git a/tests/avocado/boot_linux_console.py b/tests/avocado/boot_linux_console.py
index 827a286429..e4caf34379 100644
--- a/tests/avocado/boot_linux_console.py
+++ b/tests/avocado/boot_linux_console.py
@@ -979,29 +979,6 @@ def test_arm_orangepi_uboot_netbsd9(self):
# Wait for user-space
wait_for_console_pattern(self, 'Starting root file system check')
- def test_aarch64_raspi3_atf(self):
- """
- :avocado: tags=accel:tcg
- :avocado: tags=arch:aarch64
- :avocado: tags=machine:raspi3b
- :avocado: tags=cpu:cortex-a53
- :avocado: tags=device:pl011
- :avocado: tags=atf
- """
- zip_url = ('https://github.com/pbatard/RPi3/releases/download/'
- 'v1.15/RPi3_UEFI_Firmware_v1.15.zip')
- zip_hash = '74b3bd0de92683cadb14e008a7575e1d0c3cafb9'
- zip_path = self.fetch_asset(zip_url, asset_hash=zip_hash)
-
- archive.extract(zip_path, self.workdir)
- efi_fd = os.path.join(self.workdir, 'RPI_EFI.fd')
-
- self.vm.set_console(console_index=1)
- self.vm.add_args('-nodefaults',
- '-device', 'loader,file=%s,force-raw=true' % efi_fd)
- self.vm.launch()
- self.wait_for_console_pattern('version UEFI Firmware v1.15')
-
def test_alpha_clipper(self):
"""
:avocado: tags=arch:alpha
diff --git a/tests/functional/meson.build b/tests/functional/meson.build
index ff3fe7981e..35eebbe9b9 100644
--- a/tests/functional/meson.build
+++ b/tests/functional/meson.build
@@ -35,6 +35,7 @@ tests_generic_bsduser = [
]
tests_aarch64_system_thorough = [
+ 'aarch64_raspi3',
'aarch64_sbsaref',
'aarch64_virt',
]
diff --git a/tests/functional/test_aarch64_raspi3.py b/tests/functional/test_aarch64_raspi3.py
new file mode 100755
index 0000000000..369f95a3d9
--- /dev/null
+++ b/tests/functional/test_aarch64_raspi3.py
@@ -0,0 +1,41 @@
+#!/usr/bin/env python3
+#
+# Functional test that boots a Linux kernel on a Raspberry Pi machine
+# and checks the console
+#
+# Copyright (c) 2020 Philippe Mathieu-Daudé <f4bug@amsat.org>
+#
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+import os
+from zipfile import ZipFile
+
+from qemu_test import LinuxKernelTest, Asset
+
+
+class Aarch64Raspi3Machine(LinuxKernelTest):
+
+ ASSET_RPI3_UEFI = Asset(
+ ('https://github.com/pbatard/RPi3/releases/download/'
+ 'v1.15/RPi3_UEFI_Firmware_v1.15.zip'),
+ '8cff2e979560048b4c84921f41a91893240b9fb71a88f0b5c5d6c8edd994bd5b')
+
+ def test_aarch64_raspi3_atf(self):
+ efi_name = 'RPI_EFI.fd'
+ zip_path = self.ASSET_RPI3_UEFI.fetch()
+
+ with ZipFile(zip_path, 'r') as zf:
+ zf.extract(efi_name, path=self.workdir)
+ efi_fd = os.path.join(self.workdir, efi_name)
+
+ self.set_machine('raspi3b')
+ self.vm.set_console(console_index=1)
+ self.vm.add_args('-cpu', 'cortex-a53',
+ '-nodefaults',
+ '-device', f'loader,file={efi_fd},force-raw=true')
+ self.vm.launch()
+ self.wait_for_console_pattern('version UEFI Firmware v1.15')
+
+
+if __name__ == '__main__':
+ LinuxKernelTest.main()
--
2.46.0
next prev parent reply other threads:[~2024-09-10 12:41 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-10 12:37 [PULL 00/22] Tests and misc patches Thomas Huth
2024-09-10 12:37 ` [PULL 01/22] meson: Split --enable-sanitizers to --enable-{asan, ubsan} Thomas Huth
2024-09-10 12:37 ` [PULL 02/22] meson: Move -fsanitize=undefined into normal configuraton Thomas Huth
2024-09-10 12:37 ` [PULL 03/22] gitlab-ci: Build MSYS2 job using multiple CPUs Thomas Huth
2024-09-10 12:37 ` [PULL 04/22] contrib/plugins/Makefile: Add a 'distclean' target Thomas Huth
2024-09-10 12:37 ` [PULL 05/22] MAINTAINERS: Remove myself as reviewer Thomas Huth
2024-09-10 12:37 ` [PULL 06/22] MAINTAINERS: Remove myself from the Meson section Thomas Huth
2024-09-10 12:37 ` [PULL 07/22] tests/functional: Add the LinuxKernelTest for testing the Linux boot process Thomas Huth
2024-09-10 12:37 ` [PULL 08/22] tests/functional: Convert the m68k Q800 Avocado test into a functional test Thomas Huth
2024-09-10 12:37 ` [PULL 09/22] tests/functional: Convert mips64el Fuloong2e avocado test (2/2) Thomas Huth
2024-09-10 12:37 ` [PULL 10/22] tests/functional: Convert mips64el I6400 Malta avocado tests Thomas Huth
2024-09-10 12:37 ` [PULL 11/22] tests/functional: Convert mips64el 5KEc " Thomas Huth
2024-09-10 12:37 ` [PULL 12/22] tests/functional: Convert mips32el Malta YAMON avocado test Thomas Huth
2024-09-10 12:37 ` [PULL 13/22] tests/functional: Convert nanomips Malta avocado tests Thomas Huth
2024-09-10 12:37 ` [PULL 14/22] tests/functional: Convert mips32eb 4Kc " Thomas Huth
2024-09-10 12:37 ` [PULL 15/22] tests/functional: Convert ARM Raspi2 " Thomas Huth
2024-09-10 12:37 ` Thomas Huth [this message]
2024-09-10 12:37 ` [PULL 17/22] tests/functional: Convert Aarch64 Raspi4 " Thomas Huth
2024-09-10 12:37 ` [PULL 18/22] tests/functional: Convert the Alpha Clipper Avocado test Thomas Huth
2024-09-10 12:37 ` [PULL 19/22] tests/functional: Convert the m68k MCF5208EVB " Thomas Huth
2024-09-10 12:37 ` [PULL 20/22] tests/functional: Convert the or1k-sim " Thomas Huth
2024-09-10 12:37 ` [PULL 21/22] tests/functional: Convert the multiprocess avocado test into a standalone test Thomas Huth
2024-09-10 12:37 ` [PULL 22/22] tests/functional: Fix bad usage of has_cmd Thomas Huth
2024-09-10 15:38 ` [PULL 00/22] Tests and misc patches Peter Maydell
2024-09-10 19:52 ` Thomas Huth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240910123726.182975-17-thuth@redhat.com \
--to=thuth@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).