summary refs log tree commit diff stats
path: root/tests/functional
diff options
context:
space:
mode:
authorThomas Huth <thuth@redhat.com>2025-04-14 13:30:18 +0200
committerThomas Huth <thuth@redhat.com>2025-04-23 07:51:25 +0200
commit0e756f404d73ddf7b5506e9109e2c074f30fb79e (patch)
treee9d7439d0f3ede3bc8e9b7802662887329d3ed8c /tests/functional
parent951ededf12a89534195cf5c5210242a169a85656 (diff)
downloadfocaccia-qemu-0e756f404d73ddf7b5506e9109e2c074f30fb79e.tar.gz
focaccia-qemu-0e756f404d73ddf7b5506e9109e2c074f30fb79e.zip
tests/functional: Convert the i386 replay avocado test
Since this was the last test in tests/avocado/replay_kernel.py,
we can remove that Avocado file now.

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-ID: <20250414113031.151105-5-thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'tests/functional')
-rw-r--r--tests/functional/meson.build1
-rwxr-xr-xtests/functional/test_i386_replay.py28
2 files changed, 29 insertions, 0 deletions
diff --git a/tests/functional/meson.build b/tests/functional/meson.build
index 7b0f4ab0b1..4113b221de 100644
--- a/tests/functional/meson.build
+++ b/tests/functional/meson.build
@@ -151,6 +151,7 @@ tests_i386_system_quick = [
 ]
 
 tests_i386_system_thorough = [
+  'i386_replay',
   'i386_tuxrun',
 ]
 
diff --git a/tests/functional/test_i386_replay.py b/tests/functional/test_i386_replay.py
new file mode 100755
index 0000000000..7c4c2602da
--- /dev/null
+++ b/tests/functional/test_i386_replay.py
@@ -0,0 +1,28 @@
+#!/usr/bin/env python3
+#
+# Replay test that boots a Linux kernel on a i386 machine
+# and checks the console
+#
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+from qemu_test import Asset
+from replay_kernel import ReplayKernelBase
+
+
+class I386Replay(ReplayKernelBase):
+
+    ASSET_KERNEL = Asset(
+         'https://storage.tuxboot.com/20230331/i386/bzImage',
+        'a3e5b32a354729e65910f5a1ffcda7c14a6c12a55e8213fb86e277f1b76ed956')
+
+    def test_pc(self):
+        self.set_machine('pc')
+        kernel_url = ()
+        kernel_path = self.ASSET_KERNEL.fetch()
+        kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE + 'console=ttyS0'
+        console_pattern = 'VFS: Cannot open root device'
+        self.run_rr(kernel_path, kernel_command_line, console_pattern, shift=5)
+
+
+if __name__ == '__main__':
+    ReplayKernelBase.main()