mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-09 18:44:58 -06:00
tests/functional: Convert the Alpha Clipper Avocado test
Straight forward conversion, just switch to SHA256 hashsum now. Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20240906180549.792832-13-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
This commit is contained in:
parent
547738be48
commit
9a76bc0433
3 changed files with 42 additions and 21 deletions
|
@ -882,27 +882,6 @@ class BootLinuxConsole(LinuxKernelTest):
|
||||||
# Wait for user-space
|
# Wait for user-space
|
||||||
wait_for_console_pattern(self, 'Starting root file system check')
|
wait_for_console_pattern(self, 'Starting root file system check')
|
||||||
|
|
||||||
def test_alpha_clipper(self):
|
|
||||||
"""
|
|
||||||
:avocado: tags=arch:alpha
|
|
||||||
:avocado: tags=machine:clipper
|
|
||||||
"""
|
|
||||||
kernel_url = ('http://archive.debian.org/debian/dists/lenny/main/'
|
|
||||||
'installer-alpha/20090123lenny10/images/cdrom/vmlinuz')
|
|
||||||
kernel_hash = '3a943149335529e2ed3e74d0d787b85fb5671ba3'
|
|
||||||
kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash)
|
|
||||||
|
|
||||||
uncompressed_kernel = archive.uncompress(kernel_path, self.workdir)
|
|
||||||
|
|
||||||
self.vm.set_console()
|
|
||||||
kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE + 'console=ttyS0'
|
|
||||||
self.vm.add_args('-nodefaults',
|
|
||||||
'-kernel', uncompressed_kernel,
|
|
||||||
'-append', kernel_command_line)
|
|
||||||
self.vm.launch()
|
|
||||||
console_pattern = 'Kernel command line: %s' % kernel_command_line
|
|
||||||
self.wait_for_console_pattern(console_pattern)
|
|
||||||
|
|
||||||
def do_test_advcal_2018(self, day, tar_hash, kernel_name, console=0):
|
def do_test_advcal_2018(self, day, tar_hash, kernel_name, console=0):
|
||||||
tar_url = ('https://qemu-advcal.gitlab.io'
|
tar_url = ('https://qemu-advcal.gitlab.io'
|
||||||
'/qac-best-of-multiarch/download/day' + day + '.tar.xz')
|
'/qac-best-of-multiarch/download/day' + day + '.tar.xz')
|
||||||
|
|
|
@ -41,6 +41,10 @@ tests_aarch64_system_thorough = [
|
||||||
'aarch64_virt',
|
'aarch64_virt',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
tests_alpha_system_thorough = [
|
||||||
|
'alpha_clipper',
|
||||||
|
]
|
||||||
|
|
||||||
tests_arm_system_thorough = [
|
tests_arm_system_thorough = [
|
||||||
'arm_canona1100',
|
'arm_canona1100',
|
||||||
'arm_integratorcp',
|
'arm_integratorcp',
|
||||||
|
|
38
tests/functional/test_alpha_clipper.py
Executable file
38
tests/functional/test_alpha_clipper.py
Executable file
|
@ -0,0 +1,38 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
#
|
||||||
|
# Functional test that boots a Linux kernel on an Alpha Clipper machine
|
||||||
|
# and checks the console
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
import os
|
||||||
|
|
||||||
|
from qemu_test import LinuxKernelTest, Asset
|
||||||
|
from qemu_test.utils import gzip_uncompress
|
||||||
|
|
||||||
|
|
||||||
|
class AlphaClipperTest(LinuxKernelTest):
|
||||||
|
|
||||||
|
ASSET_KERNEL = Asset(
|
||||||
|
('http://archive.debian.org/debian/dists/lenny/main/'
|
||||||
|
'installer-alpha/20090123lenny10/images/cdrom/vmlinuz'),
|
||||||
|
'34f53da3fa32212e4f00b03cb944b2ad81c06bc8faaf9b7193b2e544ceeca576')
|
||||||
|
|
||||||
|
def test_alpha_clipper(self):
|
||||||
|
self.set_machine('clipper')
|
||||||
|
kernel_path = self.ASSET_KERNEL.fetch()
|
||||||
|
|
||||||
|
uncompressed_kernel = os.path.join(self.workdir, 'vmlinux')
|
||||||
|
gzip_uncompress(kernel_path, uncompressed_kernel)
|
||||||
|
|
||||||
|
self.vm.set_console()
|
||||||
|
kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE + 'console=ttyS0'
|
||||||
|
self.vm.add_args('-nodefaults',
|
||||||
|
'-kernel', uncompressed_kernel,
|
||||||
|
'-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()
|
Loading…
Add table
Add a link
Reference in a new issue