xref: /qemu/tests/functional/test_aarch64_xlnx_versal.py (revision 513823e7521a09ed7ad1e32e6454bac3b2cbf52d)
1#!/usr/bin/env python3
2#
3# Functional test that boots a Linux kernel and checks the console
4#
5# SPDX-License-Identifier: GPL-2.0-or-later
6
7from qemu_test import LinuxKernelTest, Asset
8
9class XlnxVersalVirtMachine(LinuxKernelTest):
10
11    ASSET_KERNEL = Asset(
12        ('http://ports.ubuntu.com/ubuntu-ports/dists/bionic-updates/main/'
13         'installer-arm64/20101020ubuntu543.19/images/netboot/'
14         'ubuntu-installer/arm64/linux'),
15        'ce54f74ab0b15cfd13d1a293f2d27ffd79d8a85b7bb9bf21093ae9513864ac79')
16
17    ASSET_INITRD = Asset(
18        ('http://ports.ubuntu.com/ubuntu-ports/dists/bionic-updates/main/'
19         'installer-arm64/20101020ubuntu543.19/images/netboot/'
20         '/ubuntu-installer/arm64/initrd.gz'),
21        'e7a5e716b6f516d8be315c06e7331aaf16994fe4222e0e7cfb34bc015698929e')
22
23    def test_aarch64_xlnx_versal_virt(self):
24        self.set_machine('xlnx-versal-virt')
25        kernel_path = self.ASSET_KERNEL.fetch()
26        initrd_path = self.ASSET_INITRD.fetch()
27
28        self.vm.set_console()
29        self.vm.add_args('-m', '2G',
30                         '-accel', 'tcg',
31                         '-kernel', kernel_path,
32                         '-initrd', initrd_path)
33        self.vm.launch()
34        self.wait_for_console_pattern('Checked W+X mappings: passed')
35
36if __name__ == '__main__':
37    LinuxKernelTest.main()
38