summary refs log tree commit diff stats
path: root/tests/functional/test_aarch64_xlnx_versal.py
diff options
context:
space:
mode:
authorThomas Huth <thuth@redhat.com>2024-12-06 11:23:51 +0100
committerThomas Huth <thuth@redhat.com>2024-12-11 09:18:39 +0100
commit490d25e6c52b0c32f78b5176d64cf20a53fde51a (patch)
tree61af90f3ae297464ecaa077f65509e9fae94862b /tests/functional/test_aarch64_xlnx_versal.py
parentcd28b8db0abcf223c9e4b67c4d229be7527410a9 (diff)
downloadfocaccia-qemu-490d25e6c52b0c32f78b5176d64cf20a53fde51a.tar.gz
focaccia-qemu-490d25e6c52b0c32f78b5176d64cf20a53fde51a.zip
tests/functional: Convert the xlnx_versal_virt avocado test
A straight-forward conversion of the xlnx_versal_virt boot
test to the functional framework.

Message-ID: <20241206102358.1186644-2-thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'tests/functional/test_aarch64_xlnx_versal.py')
-rwxr-xr-xtests/functional/test_aarch64_xlnx_versal.py37
1 files changed, 37 insertions, 0 deletions
diff --git a/tests/functional/test_aarch64_xlnx_versal.py b/tests/functional/test_aarch64_xlnx_versal.py
new file mode 100755
index 0000000000..4b9c49e5d6
--- /dev/null
+++ b/tests/functional/test_aarch64_xlnx_versal.py
@@ -0,0 +1,37 @@
+#!/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 XlnxVersalVirtMachine(LinuxKernelTest):
+
+    ASSET_KERNEL = Asset(
+        ('http://ports.ubuntu.com/ubuntu-ports/dists/bionic-updates/main/'
+         'installer-arm64/20101020ubuntu543.19/images/netboot/'
+         'ubuntu-installer/arm64/linux'),
+        'ce54f74ab0b15cfd13d1a293f2d27ffd79d8a85b7bb9bf21093ae9513864ac79')
+
+    ASSET_INITRD = Asset(
+        ('http://ports.ubuntu.com/ubuntu-ports/dists/bionic-updates/main/'
+         'installer-arm64/20101020ubuntu543.19/images/netboot/'
+         '/ubuntu-installer/arm64/initrd.gz'),
+        'e7a5e716b6f516d8be315c06e7331aaf16994fe4222e0e7cfb34bc015698929e')
+
+    def test_aarch64_xlnx_versal_virt(self):
+        self.set_machine('xlnx-versal-virt')
+        kernel_path = self.ASSET_KERNEL.fetch()
+        initrd_path = self.ASSET_INITRD.fetch()
+
+        self.vm.set_console()
+        self.vm.add_args('-m', '2G',
+                         '-accel', 'tcg',
+                         '-kernel', kernel_path,
+                         '-initrd', initrd_path)
+        self.vm.launch()
+        self.wait_for_console_pattern('Checked W+X mappings: passed')
+
+if __name__ == '__main__':
+    LinuxKernelTest.main()