Skip to content

Commit 4570272

Browse files
FlyGoatphilmd
authored andcommitted
tests/acceptance: Test boot_linux_console for fuloong2e
The kernel comes from debian archive so it's trusted. Invoking the test can be done as follows: $ avocado --show=app,console run -t machine:fuloong2e tests/acceptance/ (1/1) tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_mips64el_fuloong2e: console: [ 0.000000] Initializing cgroup subsys cpuset console: [ 0.000000] Initializing cgroup subsys cpu console: [ 0.000000] Initializing cgroup subsys cpuacct console: [ 0.000000] Linux version 3.16.0-6-loongson-2e ([email protected]) (gcc version 4.8.4 (Debian 4.8.4-1) ) #1 Debian 3.16.56-1+deb8u1 (2018-05-08) console: [ 0.000000] memsize=256, highmemsize=0 console: [ 0.000000] CpuClock = 533080000 console: [ 0.000000] bootconsole [early0] enabled console: [ 0.000000] CPU0 revision is: 00006302 (ICT Loongson-2) console: [ 0.000000] FPU revision is: 00000501 console: [ 0.000000] Checking for the multiply/shift bug... no. console: [ 0.000000] Checking for the daddiu bug... no. console: [ 0.000000] Determined physical RAM map: console: [ 0.000000] memory: 0000000010000000 @ 0000000000000000 (usable) console: [ 0.000000] memory: 0000000004000000 @ 0000000010000000 (reserved) console: [ 0.000000] memory: 0000000003ffffff @ 000000001c000001 (reserved) console: [ 0.000000] Initrd not found or empty - disabling initrd console: [ 0.000000] Zone ranges: console: [ 0.000000] DMA [mem 0x00000000-0x00ffffff] console: [ 0.000000] Normal [mem 0x01000000-0x0fffffff] console: [ 0.000000] Movable zone start for each node console: [ 0.000000] Early memory node ranges console: [ 0.000000] node 0: [mem 0x00000000-0x0fffffff] console: [ 0.000000] Reserving 0MB of memory at 0MB for crashkernel console: [ 0.000000] Primary instruction cache 64kB, VIPT, direct mapped, linesize 32 bytes. console: [ 0.000000] Primary data cache 64kB, 4-way, VIPT, no aliases, linesize 32 bytes console: [ 0.000000] Unified secondary cache 512kB 4-way, linesize 32 bytes. console: [ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16327 console: [ 0.000000] Kernel command line: printk.time=0 console=ttyS0 PASS (2.27 s) Signed-off-by: Jiaxun Yang <[email protected]> Reviewed-by: Wainer dos Santos Moschetta <[email protected]> Reviewed-by: Willian Rampazzo <[email protected]> Reviewed-by: Huacai Chen <[email protected]> Reviewed-by: Philippe Mathieu-Daudé <[email protected]> Tested-by: Philippe Mathieu-Daudé <[email protected]> Message-Id: <[email protected]> [PMD: Added command line example] Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
1 parent e41f27e commit 4570272

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

tests/acceptance/boot_linux_console.py

+21
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,27 @@ def test_mips64el_malta(self):
170170
console_pattern = 'Kernel command line: %s' % kernel_command_line
171171
self.wait_for_console_pattern(console_pattern)
172172

173+
def test_mips64el_fuloong2e(self):
174+
"""
175+
:avocado: tags=arch:mips64el
176+
:avocado: tags=machine:fuloong2e
177+
:avocado: tags=endian:little
178+
"""
179+
deb_url = ('http://archive.debian.org/debian/pool/main/l/linux/'
180+
'linux-image-3.16.0-6-loongson-2e_3.16.56-1+deb8u1_mipsel.deb')
181+
deb_hash = 'd04d446045deecf7b755ef576551de0c4184dd44'
182+
deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash)
183+
kernel_path = self.extract_from_deb(deb_path,
184+
'/boot/vmlinux-3.16.0-6-loongson-2e')
185+
186+
self.vm.set_console()
187+
kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE + 'console=ttyS0'
188+
self.vm.add_args('-kernel', kernel_path,
189+
'-append', kernel_command_line)
190+
self.vm.launch()
191+
console_pattern = 'Kernel command line: %s' % kernel_command_line
192+
self.wait_for_console_pattern(console_pattern)
193+
173194
def test_mips_malta_cpio(self):
174195
"""
175196
:avocado: tags=arch:mips

0 commit comments

Comments
 (0)