From: Thomas Huth <thuth@redhat.com>
To: qemu-devel@nongnu.org
Cc: Stefan Hajnoczi <stefanha@redhat.com>
Subject: [PULL 11/18] tests/functional: Convert the arm replay avocado tests
Date: Wed, 26 Feb 2025 10:57:24 +0100 [thread overview]
Message-ID: <20250226095731.1172375-12-thuth@redhat.com> (raw)
In-Reply-To: <20250226095731.1172375-1-thuth@redhat.com>
Put the tests into a separate file now (since in the functional
framework, each file is run with one specific qemu-system-* binary).
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20250218152744.228335-10-thuth@redhat.com>
---
tests/avocado/replay_kernel.py | 74 -----------------------------
tests/functional/meson.build | 1 +
tests/functional/test_arm_replay.py | 69 +++++++++++++++++++++++++++
3 files changed, 70 insertions(+), 74 deletions(-)
create mode 100755 tests/functional/test_arm_replay.py
diff --git a/tests/avocado/replay_kernel.py b/tests/avocado/replay_kernel.py
index 4bd48878b7e..02bd868a429 100644
--- a/tests/avocado/replay_kernel.py
+++ b/tests/avocado/replay_kernel.py
@@ -162,54 +162,6 @@ def test_aarch64_virt(self):
self.run_rr(kernel_path, kernel_command_line, console_pattern)
- def test_arm_virt(self):
- """
- :avocado: tags=arch:arm
- :avocado: tags=machine:virt
- """
- kernel_url = ('https://archives.fedoraproject.org/pub/archive/fedora'
- '/linux/releases/29/Everything/armhfp/os/images/pxeboot'
- '/vmlinuz')
- kernel_hash = 'e9826d741b4fb04cadba8d4824d1ed3b7fb8b4d4'
- kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash)
-
- kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE +
- 'console=ttyAMA0')
- console_pattern = 'VFS: Cannot open root device'
-
- self.run_rr(kernel_path, kernel_command_line, console_pattern, shift=1)
-
- def test_arm_cubieboard_initrd(self):
- """
- :avocado: tags=arch:arm
- :avocado: tags=machine:cubieboard
- """
- deb_url = ('https://apt.armbian.com/pool/main/l/'
- 'linux-6.6.16/linux-image-current-sunxi_24.2.1_armhf__6.6.16-Seb3e-D6b4a-P2359-Ce96bHfe66-HK01ba-V014b-B067e-R448a.deb')
- deb_hash = 'f7c3c8c5432f765445dc6e7eab02f3bbe668256b'
- deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash)
- kernel_path = self.extract_from_deb(deb_path,
- '/boot/vmlinuz-6.6.16-current-sunxi')
- dtb_path = '/usr/lib/linux-image-6.6.16-current-sunxi/sun4i-a10-cubieboard.dtb'
- dtb_path = self.extract_from_deb(deb_path, dtb_path)
- initrd_url = ('https://github.com/groeck/linux-build-test/raw/'
- '2eb0a73b5d5a28df3170c546ddaaa9757e1e0848/rootfs/'
- 'arm/rootfs-armv5.cpio.gz')
- initrd_hash = '2b50f1873e113523967806f4da2afe385462ff9b'
- initrd_path_gz = self.fetch_asset(initrd_url, asset_hash=initrd_hash)
- initrd_path = os.path.join(self.workdir, 'rootfs.cpio')
- archive.gzip_uncompress(initrd_path_gz, initrd_path)
-
- kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE +
- 'console=ttyS0,115200 '
- 'usbcore.nousb '
- 'panic=-1 noreboot')
- console_pattern = 'Boot successful.'
- self.run_rr(kernel_path, kernel_command_line, console_pattern, shift=1,
- args=('-dtb', dtb_path,
- '-initrd', initrd_path,
- '-no-reboot'))
-
def test_s390x_s390_ccw_virtio(self):
"""
:avocado: tags=arch:s390x
@@ -241,29 +193,3 @@ def test_alpha_clipper(self):
console_pattern = 'Kernel command line: %s' % kernel_command_line
self.run_rr(uncompressed_kernel, kernel_command_line, console_pattern, shift=9,
args=('-nodefaults', ))
-
- def do_test_advcal_2018(self, file_path, kernel_name, args=None):
- archive.extract(file_path, self.workdir)
-
- for entry in os.scandir(self.workdir):
- if entry.name.startswith('day') and entry.is_dir():
- kernel_path = os.path.join(entry.path, kernel_name)
- break
-
- kernel_command_line = ''
- console_pattern = 'QEMU advent calendar'
- self.run_rr(kernel_path, kernel_command_line, console_pattern,
- args=args)
-
- def test_arm_vexpressa9(self):
- """
- :avocado: tags=arch:arm
- :avocado: tags=machine:vexpress-a9
- """
- tar_hash = '32b7677ce8b6f1471fb0059865f451169934245b'
- tar_url = ('https://qemu-advcal.gitlab.io'
- '/qac-best-of-multiarch/download/day16.tar.xz')
- file_path = self.fetch_asset(tar_url, asset_hash=tar_hash)
- dtb_path = self.workdir + '/day16/vexpress-v2p-ca9.dtb'
- self.do_test_advcal_2018(file_path, 'winter.zImage',
- args=('-dtb', dtb_path))
diff --git a/tests/functional/meson.build b/tests/functional/meson.build
index 995cea4f305..a46c4e89464 100644
--- a/tests/functional/meson.build
+++ b/tests/functional/meson.build
@@ -113,6 +113,7 @@ tests_arm_system_thorough = [
'arm_orangepi',
'arm_quanta_gsj',
'arm_raspi2',
+ 'arm_replay',
'arm_smdkc210',
'arm_sx1',
'arm_vexpress',
diff --git a/tests/functional/test_arm_replay.py b/tests/functional/test_arm_replay.py
new file mode 100755
index 00000000000..e002e6a2647
--- /dev/null
+++ b/tests/functional/test_arm_replay.py
@@ -0,0 +1,69 @@
+#!/usr/bin/env python3
+#
+# Replay test that boots a Linux kernel on arm machines and checks the console
+#
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+from qemu_test import Asset
+from replay_kernel import ReplayKernelBase
+
+
+class ArmReplay(ReplayKernelBase):
+
+ ASSET_VIRT = Asset(
+ ('https://archives.fedoraproject.org/pub/archive/fedora/linux/'
+ 'releases/29/Everything/armhfp/os/images/pxeboot/vmlinuz'),
+ '18dd5f1a9a28bd539f9d047f7c0677211bae528e8712b40ca5a229a4ad8e2591')
+
+ def test_virt(self):
+ self.set_machine('virt')
+ kernel_path = self.ASSET_VIRT.fetch()
+ kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE +
+ 'console=ttyAMA0')
+ console_pattern = 'VFS: Cannot open root device'
+ self.run_rr(kernel_path, kernel_command_line, console_pattern, shift=1)
+
+ ASSET_CUBIE_KERNEL = Asset(
+ ('https://apt.armbian.com/pool/main/l/linux-6.6.16/'
+ 'linux-image-current-sunxi_24.2.1_armhf_'
+ '_6.6.16-Seb3e-D6b4a-P2359-Ce96bHfe66-HK01ba-V014b-B067e-R448a.deb'),
+ '3d968c15b121ede871dce49d13ee7644d6f74b6b121b84c9a40f51b0c80d6d22')
+
+ ASSET_CUBIE_INITRD = Asset(
+ ('https://github.com/groeck/linux-build-test/raw/'
+ '2eb0a73b5d5a28df3170c546ddaaa9757e1e0848/rootfs/arm/rootfs-armv5.cpio.gz'),
+ '334b8d256db67a3f2b3ad070aa08b5ade39624e0e7e35b02f4359a577bc8f39b')
+
+ def test_cubieboard(self):
+ self.set_machine('cubieboard')
+ kernel_path = self.archive_extract(self.ASSET_CUBIE_KERNEL,
+ member='boot/vmlinuz-6.6.16-current-sunxi')
+ dtb_path = self.archive_extract(self.ASSET_CUBIE_KERNEL,
+ member='usr/lib/linux-image-6.6.16-current-sunxi/sun4i-a10-cubieboard.dtb')
+ initrd_path = self.uncompress(self.ASSET_CUBIE_INITRD)
+
+ kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE +
+ 'console=ttyS0,115200 '
+ 'usbcore.nousb '
+ 'panic=-1 noreboot')
+ console_pattern = 'Boot successful.'
+ self.run_rr(kernel_path, kernel_command_line, console_pattern, shift=1,
+ args=('-dtb', dtb_path,
+ '-initrd', initrd_path,
+ '-no-reboot'))
+
+ ASSET_DAY16 = Asset(
+ 'https://qemu-advcal.gitlab.io/qac-best-of-multiarch/download/day16.tar.xz',
+ '63311adb2d4c4e7a73214a86d29988add87266a909719c56acfadd026b4110a7')
+
+ def test_vexpressa9(self):
+ self.set_machine('vexpress-a9')
+ self.archive_extract(self.ASSET_DAY16)
+ kernel_path = self.scratch_file('day16', 'winter.zImage')
+ dtb_path = self.scratch_file('day16', 'vexpress-v2p-ca9.dtb')
+ self.run_rr(kernel_path, self.REPLAY_KERNEL_COMMAND_LINE,
+ 'QEMU advent calendar', args=('-dtb', dtb_path))
+
+
+if __name__ == '__main__':
+ ReplayKernelBase.main()
--
2.48.1
next prev parent reply other threads:[~2025-02-26 10:00 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-26 9:57 [PULL 00/18] Functional and other test improvements Thomas Huth
2025-02-26 9:57 ` [PULL 01/18] tests/functional: Have microblaze tests inherit common parent class Thomas Huth
2025-02-26 9:57 ` [PULL 02/18] tests/qtest/qom-test: Test retrieval of machine class properties Thomas Huth
2025-02-26 9:57 ` [PULL 03/18] tests/functional: Provide a proper name for the VMs in the replay tests Thomas Huth
2025-02-26 9:57 ` [PULL 04/18] tests/functional: Convert the xtensa replay test to the functional framework Thomas Huth
2025-02-26 9:57 ` [PULL 05/18] tests/functional: Convert the sparc replay avocado test Thomas Huth
2025-02-26 9:57 ` [PULL 06/18] tests/functional: Convert the 32-bit ppc replay avocado tests Thomas Huth
2025-02-26 9:57 ` [PULL 07/18] tests/functional: Convert the or1k " Thomas Huth
2025-02-26 9:57 ` [PULL 08/18] tests/functional: Convert the ppc64 " Thomas Huth
2025-02-26 9:57 ` [PULL 09/18] tests/functional: Convert the microblaze " Thomas Huth
2025-02-26 9:57 ` [PULL 10/18] tests/functional: Convert the m68k " Thomas Huth
2025-02-26 9:57 ` Thomas Huth [this message]
2025-03-07 19:08 ` [PULL 11/18] tests/functional: Convert the arm " Peter Maydell
2025-02-26 9:57 ` [PULL 12/18] tests/functional: Convert the alpha " Thomas Huth
2025-02-26 9:57 ` [PULL 13/18] tests/functional: Convert the s390x " Thomas Huth
2025-02-26 9:57 ` [PULL 14/18] tests/functional: Convert the aarch64 " Thomas Huth
2025-02-26 9:57 ` [PULL 15/18] tests/functional: Convert the x86_64 " Thomas Huth
2025-02-26 9:57 ` [PULL 16/18] tests/functional: Bump some arm test timeouts Thomas Huth
2025-02-26 9:57 ` [PULL 17/18] gitlab: use --refetch in check-patch/check-dco jobs Thomas Huth
2025-02-26 9:57 ` [PULL 18/18] tests/functional: Replace the ppc64 e500 advent calendar test Thomas Huth
2025-03-03 12:12 ` [PULL 00/18] Functional and other test improvements Stefan Hajnoczi
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=20250226095731.1172375-12-thuth@redhat.com \
--to=thuth@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/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).