aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Huth <thuth@redhat.com>2025-02-18 16:27:41 +0100
committerThomas Huth <thuth@redhat.com>2025-02-26 07:43:25 +0100
commit504248520316ac72f11855e14766e6658ec486d4 (patch)
tree1e8cec41e6c2f1fa6153e4f727cf4aea25ea18bd
parent7472862965f77d10b44eba0d9efa9cfb47c94651 (diff)
downloadqemu-504248520316ac72f11855e14766e6658ec486d4.zip
qemu-504248520316ac72f11855e14766e6658ec486d4.tar.gz
qemu-504248520316ac72f11855e14766e6658ec486d4.tar.bz2
tests/functional: Convert the s390x replay avocado tests
Put the tests into a separate file now (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-12-thuth@redhat.com>
-rw-r--r--tests/avocado/replay_kernel.py15
-rw-r--r--tests/functional/meson.build1
-rwxr-xr-xtests/functional/test_s390x_replay.py28
3 files changed, 29 insertions, 15 deletions
diff --git a/tests/avocado/replay_kernel.py b/tests/avocado/replay_kernel.py
index 4347d20..4954360 100644
--- a/tests/avocado/replay_kernel.py
+++ b/tests/avocado/replay_kernel.py
@@ -161,18 +161,3 @@ class ReplayKernelNormal(ReplayKernelBase):
console_pattern = 'VFS: Cannot open root device'
self.run_rr(kernel_path, kernel_command_line, console_pattern)
-
- def test_s390x_s390_ccw_virtio(self):
- """
- :avocado: tags=arch:s390x
- :avocado: tags=machine:s390-ccw-virtio
- """
- kernel_url = ('https://archives.fedoraproject.org/pub/archive'
- '/fedora-secondary/releases/29/Everything/s390x/os/images'
- '/kernel.img')
- kernel_hash = 'e8e8439103ef8053418ef062644ffd46a7919313'
- kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash)
-
- kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE + 'console=sclp0'
- console_pattern = 'Kernel command line: %s' % kernel_command_line
- self.run_rr(kernel_path, kernel_command_line, console_pattern, shift=9)
diff --git a/tests/functional/meson.build b/tests/functional/meson.build
index e8b934d..acab536 100644
--- a/tests/functional/meson.build
+++ b/tests/functional/meson.build
@@ -248,6 +248,7 @@ tests_rx_system_thorough = [
tests_s390x_system_thorough = [
's390x_ccw_virtio',
+ 's390x_replay',
's390x_topology',
's390x_tuxrun',
]
diff --git a/tests/functional/test_s390x_replay.py b/tests/functional/test_s390x_replay.py
new file mode 100755
index 0000000..33b5843
--- /dev/null
+++ b/tests/functional/test_s390x_replay.py
@@ -0,0 +1,28 @@
+#!/usr/bin/env python3
+#
+# Replay test that boots a Linux kernel on an s390x machine
+# and checks the console
+#
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+from qemu_test import Asset
+from replay_kernel import ReplayKernelBase
+
+
+class S390xReplay(ReplayKernelBase):
+
+ ASSET_KERNEL = Asset(
+ ('https://archives.fedoraproject.org/pub/archive/fedora-secondary/'
+ 'releases/29/Everything/s390x/os/images/kernel.img'),
+ 'dace03b8ae0c9f670ebb9b8d6ce5eb24b62987f346de8f1300a439bb00bb99e7')
+
+ def test_s390_ccw_virtio(self):
+ self.set_machine('s390-ccw-virtio')
+ kernel_path = self.ASSET_KERNEL.fetch()
+ kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE + 'console=sclp0'
+ console_pattern = 'Kernel command line: %s' % kernel_command_line
+ self.run_rr(kernel_path, kernel_command_line, console_pattern, shift=9)
+
+
+if __name__ == '__main__':
+ ReplayKernelBase.main()