Skip to content

Commit 2f2d83a

Browse files
Dovgalyukphilmd
authored andcommitted
tests/acceptance: add record/replay test for arm
This patch adds a test for record/replay of the kernel image boot for two different arm platforms. Signed-off-by: Pavel Dovgalyuk <[email protected]> Tested-by: Philippe Mathieu-Daude <[email protected]> Message-Id: <159073590785.20809.17654573764167037499.stgit@pasha-ThinkPad-X280> Reviewed-by: Philippe Mathieu-Daudé <[email protected]> Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
1 parent 152a41b commit 2f2d83a

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

tests/acceptance/replay_kernel.py

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,3 +108,51 @@ def test_aarch64_virt(self):
108108

109109
self.run_rr(kernel_path, kernel_command_line, console_pattern,
110110
args=('-cpu', 'cortex-a53'))
111+
112+
def test_arm_virt(self):
113+
"""
114+
:avocado: tags=arch:arm
115+
:avocado: tags=machine:virt
116+
"""
117+
kernel_url = ('https://archives.fedoraproject.org/pub/archive/fedora'
118+
'/linux/releases/29/Everything/armhfp/os/images/pxeboot'
119+
'/vmlinuz')
120+
kernel_hash = 'e9826d741b4fb04cadba8d4824d1ed3b7fb8b4d4'
121+
kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash)
122+
123+
kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE +
124+
'console=ttyAMA0')
125+
console_pattern = 'VFS: Cannot open root device'
126+
127+
self.run_rr(kernel_path, kernel_command_line, console_pattern, shift=1)
128+
129+
def test_arm_cubieboard_initrd(self):
130+
"""
131+
:avocado: tags=arch:arm
132+
:avocado: tags=machine:cubieboard
133+
"""
134+
deb_url = ('https://apt.armbian.com/pool/main/l/'
135+
'linux-4.20.7-sunxi/linux-image-dev-sunxi_5.75_armhf.deb')
136+
deb_hash = '1334c29c44d984ffa05ed10de8c3361f33d78315'
137+
deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash)
138+
kernel_path = self.extract_from_deb(deb_path,
139+
'/boot/vmlinuz-4.20.7-sunxi')
140+
dtb_path = '/usr/lib/linux-image-dev-sunxi/sun4i-a10-cubieboard.dtb'
141+
dtb_path = self.extract_from_deb(deb_path, dtb_path)
142+
initrd_url = ('https://github.com/groeck/linux-build-test/raw/'
143+
'2eb0a73b5d5a28df3170c546ddaaa9757e1e0848/rootfs/'
144+
'arm/rootfs-armv5.cpio.gz')
145+
initrd_hash = '2b50f1873e113523967806f4da2afe385462ff9b'
146+
initrd_path_gz = self.fetch_asset(initrd_url, asset_hash=initrd_hash)
147+
initrd_path = os.path.join(self.workdir, 'rootfs.cpio')
148+
archive.gzip_uncompress(initrd_path_gz, initrd_path)
149+
150+
kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE +
151+
'console=ttyS0,115200 '
152+
'usbcore.nousb '
153+
'panic=-1 noreboot')
154+
console_pattern = 'Boot successful.'
155+
self.run_rr(kernel_path, kernel_command_line, console_pattern, shift=1,
156+
args=('-dtb', dtb_path,
157+
'-initrd', initrd_path,
158+
'-no-reboot'))

0 commit comments

Comments
 (0)