@@ -521,57 +521,3 @@ def test_mips64el_malta_5KEc_cpio(self):
console_pattern = 'Boot successful.'
self.run_rr(kernel_path, kernel_command_line, console_pattern, shift=5,
args=('-initrd', initrd_path))
-
- def do_test_mips_malta32el_nanomips(self, kernel_path_xz):
- kernel_path = self.workdir + "kernel"
- with lzma.open(kernel_path_xz, 'rb') as f_in:
- with open(kernel_path, 'wb') as f_out:
- shutil.copyfileobj(f_in, f_out)
-
- kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE +
- 'mem=256m@@0x0 '
- 'console=ttyS0')
- console_pattern = 'Kernel command line: %s' % kernel_command_line
- self.run_rr(kernel_path, kernel_command_line, console_pattern, shift=5)
-
- def test_mips_malta32el_nanomips_4k(self):
- """
- :avocado: tags=arch:mipsel
- :avocado: tags=machine:malta
- :avocado: tags=endian:little
- :avocado: tags=cpu:I7200
- """
- kernel_url = ('http://mipsdistros.mips.com/LinuxDistro/nanomips/'
- 'kernels/v4.15.18-432-gb2eb9a8b07a1-20180627102142/'
- 'generic_nano32r6el_page4k.xz')
- kernel_hash = '477456aafd2a0f1ddc9482727f20fe9575565dd6'
- kernel_path_xz = self.fetch_asset(kernel_url, asset_hash=kernel_hash)
- self.do_test_mips_malta32el_nanomips(kernel_path_xz)
-
- def test_mips_malta32el_nanomips_16k_up(self):
- """
- :avocado: tags=arch:mipsel
- :avocado: tags=machine:malta
- :avocado: tags=endian:little
- :avocado: tags=cpu:I7200
- """
- kernel_url = ('http://mipsdistros.mips.com/LinuxDistro/nanomips/'
- 'kernels/v4.15.18-432-gb2eb9a8b07a1-20180627102142/'
- 'generic_nano32r6el_page16k_up.xz')
- kernel_hash = 'e882868f944c71c816e832e2303b7874d044a7bc'
- kernel_path_xz = self.fetch_asset(kernel_url, asset_hash=kernel_hash)
- self.do_test_mips_malta32el_nanomips(kernel_path_xz)
-
- def test_mips_malta32el_nanomips_64k_dbg(self):
- """
- :avocado: tags=arch:mipsel
- :avocado: tags=machine:malta
- :avocado: tags=endian:little
- :avocado: tags=cpu:I7200
- """
- kernel_url = ('http://mipsdistros.mips.com/LinuxDistro/nanomips/'
- 'kernels/v4.15.18-432-gb2eb9a8b07a1-20180627102142/'
- 'generic_nano32r6el_page64k_dbg.xz')
- kernel_hash = '18d1c68f2e23429e266ca39ba5349ccd0aeb7180'
- kernel_path_xz = self.fetch_asset(kernel_url, asset_hash=kernel_hash)
- self.do_test_mips_malta32el_nanomips(kernel_path_xz)
@@ -35,6 +35,7 @@ test_timeouts = {
'arm_sx1' : 360,
'intel_iommu': 300,
'mips_malta' : 120,
+ 'mipsel_malta' : 500,
'netdev_ethtool' : 180,
'ppc_40p' : 240,
'ppc64_hv' : 1000,
@@ -9,12 +9,13 @@
#
# SPDX-License-Identifier: GPL-2.0-or-later
-from qemu_test import QemuSystemTest, LinuxKernelTest, Asset
+from qemu_test import QemuSystemTest, Asset, wait_for_console_pattern
from qemu_test import interrupt_interactive_console_until_pattern
-from qemu_test import wait_for_console_pattern
+from qemu_test import skipLongRuntime
+from replay_kernel import ReplayKernelBase
-class MaltaMachineConsole(LinuxKernelTest):
+class MaltaMachineConsole(ReplayKernelBase):
ASSET_KERNEL_4K = Asset(
('http://mipsdistros.mips.com/LinuxDistro/nanomips/'
@@ -57,6 +58,29 @@ def test_mips_malta32el_nanomips_16k_up(self):
def test_mips_malta32el_nanomips_64k_dbg(self):
self.do_test_mips_malta32el_nanomips(self.ASSET_KERNEL_64K)
+ def do_test_replay_mips_malta32el_nanomips(self, kernel_asset):
+ self.set_machine('malta')
+ self.cpu = 'I7200'
+ kernel_path = self.uncompress(kernel_asset)
+
+ kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE +
+ 'mem=256m@@0x0 '
+ 'console=ttyS0')
+ console_pattern = 'Kernel command line: %s' % kernel_command_line
+ self.run_rr(kernel_path, kernel_command_line, console_pattern, shift=5)
+
+ @skipLongRuntime()
+ def test_replay_mips_malta32el_nanomips_4k(self):
+ self.do_test_replay_mips_malta32el_nanomips(self.ASSET_KERNEL_4K)
+
+ @skipLongRuntime()
+ def test_replay_mips_malta32el_nanomips_16k_up(self):
+ self.do_test_replay_mips_malta32el_nanomips(self.ASSET_KERNEL_16K)
+
+ @skipLongRuntime()
+ def test_replay_mips_malta32el_nanomips_64k_dbg(self):
+ self.do_test_replay_mips_malta32el_nanomips(self.ASSET_KERNEL_64K)
+
class MaltaMachineYAMON(QemuSystemTest):
Move the mipsel replay tests from tests/avocado/replay_kernel.py to the functional framework. Since the functional tests should be run per target, we cannot stick all replay tests in one file. Thus let's add these tests to the file where we already use the same asset already. Signed-off-by: Thomas Huth <thuth@redhat.com> --- tests/avocado/replay_kernel.py | 54 --------------------------- tests/functional/meson.build | 1 + tests/functional/test_mipsel_malta.py | 30 +++++++++++++-- 3 files changed, 28 insertions(+), 57 deletions(-)