summaryrefslogtreecommitdiffstats
path: root/tests/acceptance/boot_linux_console.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/acceptance/boot_linux_console.py')
-rw-r--r--tests/acceptance/boot_linux_console.py56
1 files changed, 44 insertions, 12 deletions
diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot_linux_console.py
index c6b06a1a13..3f3aa0c854 100644
--- a/tests/acceptance/boot_linux_console.py
+++ b/tests/acceptance/boot_linux_console.py
@@ -28,19 +28,13 @@ try:
except CmdNotFoundError:
P7ZIP_AVAILABLE = False
-class BootLinuxConsole(Test):
- """
- Boots a Linux kernel and checks that the console is operational and the
- kernel command line is properly passed from QEMU to the kernel
- """
-
- timeout = 90
-
+class LinuxKernelTest(Test):
KERNEL_COMMON_COMMAND_LINE = 'printk.time=0 '
- def wait_for_console_pattern(self, success_message):
+ def wait_for_console_pattern(self, success_message, vm=None):
wait_for_console_pattern(self, success_message,
- failure_message='Kernel panic - not syncing')
+ failure_message='Kernel panic - not syncing',
+ vm=vm)
def extract_from_deb(self, deb, path):
"""
@@ -79,6 +73,13 @@ class BootLinuxConsole(Test):
os.chdir(cwd)
return os.path.normpath(os.path.join(self.workdir, path))
+class BootLinuxConsole(LinuxKernelTest):
+ """
+ Boots a Linux kernel and checks that the console is operational and the
+ kernel command line is properly passed from QEMU to the kernel
+ """
+ timeout = 90
+
def test_x86_64_pc(self):
"""
:avocado: tags=arch:x86_64
@@ -307,6 +308,32 @@ class BootLinuxConsole(Test):
console_pattern = 'Kernel command line: %s' % kernel_command_line
self.wait_for_console_pattern(console_pattern)
+ def test_aarch64_xlnx_versal_virt(self):
+ """
+ :avocado: tags=arch:aarch64
+ :avocado: tags=machine:xlnx-versal-virt
+ :avocado: tags=device:pl011
+ :avocado: tags=device:arm_gicv3
+ """
+ kernel_url = ('http://ports.ubuntu.com/ubuntu-ports/dists/'
+ 'bionic-updates/main/installer-arm64/current/images/'
+ 'netboot/ubuntu-installer/arm64/linux')
+ kernel_hash = '5bfc54cf7ed8157d93f6e5b0241e727b6dc22c50'
+ kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash)
+
+ initrd_url = ('http://ports.ubuntu.com/ubuntu-ports/dists/'
+ 'bionic-updates/main/installer-arm64/current/images/'
+ 'netboot/ubuntu-installer/arm64/initrd.gz')
+ initrd_hash = 'd385d3e88d53e2004c5d43cbe668b458a094f772'
+ initrd_path = self.fetch_asset(initrd_url, asset_hash=initrd_hash)
+
+ self.vm.set_console()
+ self.vm.add_args('-m', '2G',
+ '-kernel', kernel_path,
+ '-initrd', initrd_path)
+ self.vm.launch()
+ self.wait_for_console_pattern('Checked W+X mappings: passed')
+
def test_arm_virt(self):
"""
:avocado: tags=arch:arm
@@ -378,13 +405,18 @@ class BootLinuxConsole(Test):
self.vm.set_console()
kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE +
- serial_kernel_cmdline[uart_id])
+ serial_kernel_cmdline[uart_id] +
+ ' root=/dev/mmcblk0p2 rootwait ' +
+ 'dwc_otg.fiq_fsm_enable=0')
self.vm.add_args('-kernel', kernel_path,
'-dtb', dtb_path,
- '-append', kernel_command_line)
+ '-append', kernel_command_line,
+ '-device', 'usb-kbd')
self.vm.launch()
console_pattern = 'Kernel command line: %s' % kernel_command_line
self.wait_for_console_pattern(console_pattern)
+ console_pattern = 'Product: QEMU USB Keyboard'
+ self.wait_for_console_pattern(console_pattern)
def test_arm_raspi2_uart0(self):
"""