summary refs log tree commit diff stats
path: root/tests/functional/test_arm_virt.py
diff options
context:
space:
mode:
authorThomas Huth <thuth@redhat.com>2024-12-05 17:28:07 +0100
committerThomas Huth <thuth@redhat.com>2024-12-17 20:29:03 +0100
commita44b318fc45d59c0904c887957fb24421bf4ddd4 (patch)
treea2c0ec77a5aec5f120a8a80d09fbede55edfcc25 /tests/functional/test_arm_virt.py
parent799d683026e1f1b18380c2629f6c882f4c6c568b (diff)
downloadfocaccia-qemu-a44b318fc45d59c0904c887957fb24421bf4ddd4.tar.gz
focaccia-qemu-a44b318fc45d59c0904c887957fb24421bf4ddd4.zip
tests/functional: Convert the arm virt avocado test
Straight forward conversion, basically just the hashsums needed
to be updated to sha256 now.

Message-ID: <20241206102358.1186644-7-thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'tests/functional/test_arm_virt.py')
-rwxr-xr-xtests/functional/test_arm_virt.py30
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/functional/test_arm_virt.py b/tests/functional/test_arm_virt.py
new file mode 100755
index 0000000000..7b6549176f
--- /dev/null
+++ b/tests/functional/test_arm_virt.py
@@ -0,0 +1,30 @@
+#!/usr/bin/env python3
+#
+# Functional test that boots a Linux kernel and checks the console
+#
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+from qemu_test import LinuxKernelTest, Asset
+
+class ArmVirtMachine(LinuxKernelTest):
+
+    ASSET_KERNEL = Asset(
+        ('https://archives.fedoraproject.org/pub/archive/fedora/linux/'
+         'releases/29/Everything/armhfp/os/images/pxeboot/vmlinuz'),
+        '18dd5f1a9a28bd539f9d047f7c0677211bae528e8712b40ca5a229a4ad8e2591')
+
+    def test_arm_virt(self):
+        self.set_machine('virt')
+        kernel_path = self.ASSET_KERNEL.fetch()
+
+        self.vm.set_console()
+        kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE +
+                               'console=ttyAMA0')
+        self.vm.add_args('-kernel', kernel_path,
+                         '-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()