[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 06/11] tests/boot_linux_console: Run BusyBox on 5KEc 64-bit cp
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH v2 06/11] tests/boot_linux_console: Run BusyBox on 5KEc 64-bit cpu |
Date: |
Sat, 19 Oct 2019 17:34:32 +0200 |
This tests boots a Linux kernel on a Malta machine up to a
busybox shell on the serial console. Few commands are executed
before halting the machine (via reboot).
We use the Fedora 24 kernel extracted from the image at:
https://fedoraproject.org/wiki/Architectures/MIPS
and the initrd cpio image from the kerneltests project:
https://kerneltests.org/
If MIPS is a target being built, "make check-acceptance" will
automatically include this test by the use of the "arch:mips" tags.
Alternatively, this test can be run using:
$ avocado --show=console run -t arch:mips64el
tests/acceptance/boot_linux_console.py
console: [ 0.000000] Linux version 3.19.3.mtoman.20150408
(mtoman@debian-co3-1) (gcc version 5.0.0 20150316 (Red Hat 5.0.0-0.20) (GCC) )
#3 Wed Apr 8 14:32:50 UTC 2015
console: [ 0.000000] Early serial console at I/O port 0x3f8 (options
'38400n8')
console: [ 0.000000] bootconsole [uart0] enabled
console: [ 0.000000] CPU0 revision is: 00018900 (MIPS 5KE)
console: [ 0.000000] Checking for the multiply/shift bug... no.
console: [ 0.000000] Checking for the daddiu bug... no.
[...]
console: Boot successful.
console: cat /proc/cpuinfo
console: / # cat /proc/cpuinfo
console: system type : MIPS Malta
console: machine : Unknown
console: processor : 0
console: cpu model : MIPS 5KE V0.0
console: : 1616.89
console: wait instruction : nouname -a
console: microsecond timers : yes
console: tlb_entries : 32
console: extra interrupt vector : yes
console: hardware watchpoint : yes, count: 1, address/irw mask: [0x0ff8]
console: isa : mips1 mips2 mips3 mips4 mips5 mips32r1
mips32r2 mips64r1 mips64r2
console: ASEs implemented :
console: shadow register sets : 1
console: kscratch registers : 0
console: package : 0
console: core : 0
console: VCED exceptions : not available
console: VCEI exceptions : not available
console: / #
console: / # uname -a
console: Linux buildroot 3.19.3.mtoman.20150408 #3 Wed Apr 8 14:32:50 UTC
2015 mips64 GNU/Linux
console: reboot
console: / #
console: / # reboot
console: / #
console: / # reboot: Restarting system
PASS (7.04 s)
JOB TIME : 7.20 s
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
---
tests/acceptance/boot_linux_console.py | 40 ++++++++++++++++++++++++++
1 file changed, 40 insertions(+)
diff --git a/tests/acceptance/boot_linux_console.py
b/tests/acceptance/boot_linux_console.py
index 67d7e96d98..e505a41eed 100644
--- a/tests/acceptance/boot_linux_console.py
+++ b/tests/acceptance/boot_linux_console.py
@@ -166,6 +166,46 @@ class BootLinuxConsole(Test):
exec_command_and_wait_for_pattern(self, 'reboot',
'reboot: Restarting system')
+ def test_mips64el_malta_5KEc_cpio(self):
+ """
+ :avocado: tags=arch:mips64el
+ :avocado: tags=machine:malta
+ :avocado: tags=endian:little
+ """
+ kernel_url = ('https://github.com/philmd/qemu-testing-blob/'
+ 'raw/9ad2df38/mips/malta/mips64el/'
+ 'vmlinux-3.19.3.mtoman.20150408')
+ kernel_hash = '00d1d268fb9f7d8beda1de6bebcc46e884d71754'
+ kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash)
+ initrd_url = ('https://github.com/groeck/linux-build-test/'
+ 'raw/8584a59e/rootfs/'
+ 'mipsel64/rootfs.mipsel64r1.cpio.gz')
+ initrd_hash = '1dbb8a396e916847325284dbe2151167'
+ initrd_path_gz = self.fetch_asset(initrd_url, algorithm='md5',
+ asset_hash=initrd_hash)
+ initrd_path = self.workdir + "rootfs.cpio"
+ archive.gzip_uncompress(initrd_path_gz, initrd_path)
+
+ self.vm.set_machine('malta')
+ self.vm.set_console()
+ kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE
+ + 'console=ttyS0 console=tty '
+ + 'rdinit=/sbin/init noreboot')
+ self.vm.add_args('-cpu', '5KEc',
+ '-kernel', kernel_path,
+ '-initrd', initrd_path,
+ '-append', kernel_command_line,
+ '-no-reboot')
+ self.vm.launch()
+ wait_for_console_pattern(self, 'Boot successful.')
+
+ exec_command_and_wait_for_pattern(self, 'cat /proc/cpuinfo',
+ 'MIPS 5KE')
+ exec_command_and_wait_for_pattern(self, 'uname -a',
+ '3.19.3.mtoman.20150408')
+ exec_command_and_wait_for_pattern(self, 'reboot',
+ 'reboot: Restarting system')
+
def do_test_mips_malta32el_nanomips(self, kernel_url, kernel_hash):
kernel_path_xz = self.fetch_asset(kernel_url, asset_hash=kernel_hash)
kernel_path = self.workdir + "kernel"
--
2.21.0
- [PATCH v2 00/11] tests/acceptance: Fix 64-bit MIPS target tests, Philippe Mathieu-Daudé, 2019/10/19
- [PATCH v2 01/11] Acceptance tests: refactor wait_for_console_pattern, Philippe Mathieu-Daudé, 2019/10/19
- [PATCH v2 02/11] tests/acceptance: Fixe wait_for_console_pattern() hangs, Philippe Mathieu-Daudé, 2019/10/19
- [PATCH v2 03/11] tests/acceptance: Send <carriage return> on serial lines, Philippe Mathieu-Daudé, 2019/10/19
- [PATCH v2 04/11] tests/acceptance: Refactor exec_command_and_wait_for_pattern(), Philippe Mathieu-Daudé, 2019/10/19
- [PATCH v2 05/11] tests/boot_linux_console: Use Avocado archive::gzip_uncompress(), Philippe Mathieu-Daudé, 2019/10/19
- [PATCH v2 07/11] tests/ssh_linux_malta: Run tests using a snapshot image, Philippe Mathieu-Daudé, 2019/10/19
- [PATCH v2 06/11] tests/boot_linux_console: Run BusyBox on 5KEc 64-bit cpu,
Philippe Mathieu-Daudé <=
- [PATCH v2 08/11] tests/ssh_linux_malta: Remove duplicated test, Philippe Mathieu-Daudé, 2019/10/19
- [PATCH v2 09/11] tests/ssh_linux_malta: Match stricter console output, Philippe Mathieu-Daudé, 2019/10/19
- [PATCH v2 10/11] tests/ssh_linux_malta: Refactor how to get image/kernel info, Philippe Mathieu-Daudé, 2019/10/19
- [PATCH v2 11/11] tests/ssh_linux_malta: Fix 64-bit target tests, Philippe Mathieu-Daudé, 2019/10/19
- Re: [PATCH 00/11] tests/acceptance: Fix 64-bit MIPS target tests, Aleksandar Markovic, 2019/10/24