Skip to content

Commit 904be13

Browse files
Dovgalyukphilmd
authored andcommitted
tests/acceptance: add kernel record/replay test for x86_64
This patch adds a test for record/replay an execution of x86_64 machine. Execution scenario includes simple kernel boot, which allows testing basic hardware interaction in RR mode. Signed-off-by: Pavel Dovgalyuk <[email protected]> Tested-by: Philippe Mathieu-Daude <[email protected]> Message-Id: <159073589656.20809.14010247947948822435.stgit@pasha-ThinkPad-X280> Reviewed-by: Philippe Mathieu-Daudé <[email protected]> [PMD: Skip test_x86_64_pc on Travis-CI] Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
1 parent c7ebab0 commit 904be13

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

tests/acceptance/replay_kernel.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import logging
1313
import time
1414

15+
from avocado import skipIf
1516
from avocado_qemu import wait_for_console_pattern
1617
from avocado.utils import archive
1718
from avocado.utils import process
@@ -71,3 +72,20 @@ def run_rr(self, kernel_path, kernel_command_line, console_pattern,
7172
False, shift, args, replay_path)
7273
logger = logging.getLogger('replay')
7374
logger.info('replay overhead {:.2%}'.format(t2 / t1 - 1))
75+
76+
@skipIf(os.getenv('CONTINUOUS_INTEGRATION'), 'Running on Travis-CI')
77+
def test_x86_64_pc(self):
78+
"""
79+
:avocado: tags=arch:x86_64
80+
:avocado: tags=machine:pc
81+
"""
82+
kernel_url = ('https://archives.fedoraproject.org/pub/archive/fedora'
83+
'/linux/releases/29/Everything/x86_64/os/images/pxeboot'
84+
'/vmlinuz')
85+
kernel_hash = '23bebd2680757891cf7adedb033532163a792495'
86+
kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash)
87+
88+
kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE + 'console=ttyS0'
89+
console_pattern = 'VFS: Cannot open root device'
90+
91+
self.run_rr(kernel_path, kernel_command_line, console_pattern, shift=5)

0 commit comments

Comments
 (0)