[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 18/22] tests/functional: Convert the Alpha Clipper Avocado test
From: |
Thomas Huth |
Subject: |
[PULL 18/22] tests/functional: Convert the Alpha Clipper Avocado test |
Date: |
Tue, 10 Sep 2024 14:37:19 +0200 |
Straight forward conversion, just switch to SHA256 hashsum now.
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20240906180549.792832-13-thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
tests/avocado/boot_linux_console.py | 21 --------------
tests/functional/meson.build | 4 +++
tests/functional/test_alpha_clipper.py | 38 ++++++++++++++++++++++++++
3 files changed, 42 insertions(+), 21 deletions(-)
create mode 100755 tests/functional/test_alpha_clipper.py
diff --git a/tests/avocado/boot_linux_console.py
b/tests/avocado/boot_linux_console.py
index a8eac44d9f..75aab90320 100644
--- a/tests/avocado/boot_linux_console.py
+++ b/tests/avocado/boot_linux_console.py
@@ -882,27 +882,6 @@ def test_arm_orangepi_uboot_netbsd9(self):
# Wait for user-space
wait_for_console_pattern(self, 'Starting root file system check')
- def test_alpha_clipper(self):
- """
- :avocado: tags=arch:alpha
- :avocado: tags=machine:clipper
- """
- kernel_url = ('http://archive.debian.org/debian/dists/lenny/main/'
- 'installer-alpha/20090123lenny10/images/cdrom/vmlinuz')
- kernel_hash = '3a943149335529e2ed3e74d0d787b85fb5671ba3'
- kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash)
-
- uncompressed_kernel = archive.uncompress(kernel_path, self.workdir)
-
- self.vm.set_console()
- kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE + 'console=ttyS0'
- self.vm.add_args('-nodefaults',
- '-kernel', uncompressed_kernel,
- '-append', kernel_command_line)
- self.vm.launch()
- console_pattern = 'Kernel command line: %s' % kernel_command_line
- self.wait_for_console_pattern(console_pattern)
-
def do_test_advcal_2018(self, day, tar_hash, kernel_name, console=0):
tar_url = ('https://qemu-advcal.gitlab.io'
'/qac-best-of-multiarch/download/day' + day + '.tar.xz')
diff --git a/tests/functional/meson.build b/tests/functional/meson.build
index a79083b0f9..e1903132a1 100644
--- a/tests/functional/meson.build
+++ b/tests/functional/meson.build
@@ -41,6 +41,10 @@ tests_aarch64_system_thorough = [
'aarch64_virt',
]
+tests_alpha_system_thorough = [
+ 'alpha_clipper',
+]
+
tests_arm_system_thorough = [
'arm_canona1100',
'arm_integratorcp',
diff --git a/tests/functional/test_alpha_clipper.py
b/tests/functional/test_alpha_clipper.py
new file mode 100755
index 0000000000..c1fbf0e395
--- /dev/null
+++ b/tests/functional/test_alpha_clipper.py
@@ -0,0 +1,38 @@
+#!/usr/bin/env python3
+#
+# Functional test that boots a Linux kernel on an Alpha Clipper machine
+# and checks the console
+#
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+import os
+
+from qemu_test import LinuxKernelTest, Asset
+from qemu_test.utils import gzip_uncompress
+
+
+class AlphaClipperTest(LinuxKernelTest):
+
+ ASSET_KERNEL = Asset(
+ ('http://archive.debian.org/debian/dists/lenny/main/'
+ 'installer-alpha/20090123lenny10/images/cdrom/vmlinuz'),
+ '34f53da3fa32212e4f00b03cb944b2ad81c06bc8faaf9b7193b2e544ceeca576')
+
+ def test_alpha_clipper(self):
+ self.set_machine('clipper')
+ kernel_path = self.ASSET_KERNEL.fetch()
+
+ uncompressed_kernel = os.path.join(self.workdir, 'vmlinux')
+ gzip_uncompress(kernel_path, uncompressed_kernel)
+
+ self.vm.set_console()
+ kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE + 'console=ttyS0'
+ self.vm.add_args('-nodefaults',
+ '-kernel', uncompressed_kernel,
+ '-append', kernel_command_line)
+ self.vm.launch()
+ console_pattern = 'Kernel command line: %s' % kernel_command_line
+ self.wait_for_console_pattern(console_pattern)
+
+if __name__ == '__main__':
+ LinuxKernelTest.main()
--
2.46.0
- [PULL 08/22] tests/functional: Convert the m68k Q800 Avocado test into a functional test, (continued)
- [PULL 08/22] tests/functional: Convert the m68k Q800 Avocado test into a functional test, Thomas Huth, 2024/09/10
- [PULL 10/22] tests/functional: Convert mips64el I6400 Malta avocado tests, Thomas Huth, 2024/09/10
- [PULL 11/22] tests/functional: Convert mips64el 5KEc Malta avocado tests, Thomas Huth, 2024/09/10
- [PULL 07/22] tests/functional: Add the LinuxKernelTest for testing the Linux boot process, Thomas Huth, 2024/09/10
- [PULL 13/22] tests/functional: Convert nanomips Malta avocado tests, Thomas Huth, 2024/09/10
- [PULL 15/22] tests/functional: Convert ARM Raspi2 avocado tests, Thomas Huth, 2024/09/10
- [PULL 12/22] tests/functional: Convert mips32el Malta YAMON avocado test, Thomas Huth, 2024/09/10
- [PULL 14/22] tests/functional: Convert mips32eb 4Kc Malta avocado tests, Thomas Huth, 2024/09/10
- [PULL 16/22] tests/functional: Convert Aarch64 Raspi3 avocado tests, Thomas Huth, 2024/09/10
- [PULL 17/22] tests/functional: Convert Aarch64 Raspi4 avocado tests, Thomas Huth, 2024/09/10
- [PULL 18/22] tests/functional: Convert the Alpha Clipper Avocado test,
Thomas Huth <=
- [PULL 19/22] tests/functional: Convert the m68k MCF5208EVB Avocado test, Thomas Huth, 2024/09/10
- [PULL 20/22] tests/functional: Convert the or1k-sim Avocado test, Thomas Huth, 2024/09/10
- [PULL 21/22] tests/functional: Convert the multiprocess avocado test into a standalone test, Thomas Huth, 2024/09/10
- [PULL 22/22] tests/functional: Fix bad usage of has_cmd, Thomas Huth, 2024/09/10
- Re: [PULL 00/22] Tests and misc patches, Peter Maydell, 2024/09/10