On Mon, Oct 28, 2019 at 08:34:37AM +0100, Philippe Mathieu-Daudé wrote:
> From: Philippe Mathieu-Daudé <[email protected]>
>
> Add a test which boots Linux and run basic commands using the serial
> port console.
>
> The kernel image is built by the Debian project:
> https://wiki.debian.org/RaspberryPi
>
> The DeviceTree blob comes from the official Raspberry Pi project:
> https://www.raspberrypi.org/
>
> The cpio image used comes from the linux-build-test project:
> https://github.com/groeck/linux-build-test
>
> This test can be run using:
>
> $ avocado run --show=console,app run -t machine:raspi3 tests/acceptance
> console: [ 0.000000] Linux version 4.14.0-3-arm64
> ([email protected]) (gcc version 7.2.0 (Debian 7.2.0-18)) #1 SMP
> Debian 4.14.12-2 (2018-01-06)
> console: [ 0.000000] Boot CPU: AArch64 Processor [410fd034]
> console: [ 0.000000] Machine model: Raspberry Pi 3 Model B
> console: [ 0.000000] earlycon: pl11 at MMIO 0x000000003f201000 (options
> '')
> console: [ 0.000000] bootconsole [pl11] enabled
> [...]
> console: Starting network: OK
> console: Found console ttyAMA0
> console: Boot successful.
> console: / # cat /proc/cpuinfo
> console: processor : 0
> console: BogoMIPS : 125.00
> console: r : 0x41
> console: CPU architecture: 8
> console: CPU variant
> console: : 0x0
> console: CPU part : 0xd03
> console: CPU revision : 4
> console: / # uname -a
> console: Linux buildroot 4.14.0-3-arm64 #1 SMP Debian 4.14.12-2
> (2018-01-06) aarch64 GNU/Linux
> console: reboot
> console: / # reboot
> console: / # Found console ttyAMA0
> console: Stopping network: OK
> console: Saving random seed... done.
> console: Stopping logging: OK
> console: umount: devtmpfs busy - remounted read-only
> console: umount: can't unmount /: Invalid argument
> console: The system is going down NOW!
> console: Sent SIGTERM to all processes
> console: Sent SIGKILL to all processes
> console: Requesting system reboot
> console: kvm: exiting hardware virtualization
> console: reboot: Restarting system
> PASS (11.08 s)
>
> Reviewed-by: Cleber Rosa <[email protected]>
> Tested-by: Cleber Rosa <[email protected]>
> Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
> ---
> v2: Use archive.gzip_uncompress (Cleber)
>
> some chars are scrambled on the console?
> Cleber ran this 100 times and doesn't have issue.
> ---
Now, I'm not getting good vibes from this test. It spawns QEMU and
then gets stuck on every single execution.
VM launch command: 'aarch64-softmmu/qemu-system-aarch64 -chardev
socket,id=mon,path=/var/tmp/tmpgpee0g1h/qemu-23397-monitor.sock -mon
chardev=mon,mode=control -display none -vga none -machine raspi3 -chardev
socket,id=console,path=/var/tmp/tmpgpee0g1h/qemu-23397-console.sock,server,nowait
-serial chardev:console -kernel
/var/tmp/avocado_7ks9sppd/avocado_job_wsp2727i/1-tests_acceptance_boot_linux_console.py_BootLinuxConsole.test_arm_raspi3_initrd_uart0/boot/vmlinuz-4.14.0-3-arm64
-dtb
/home/cleber/avocado/data/cache/by_location/cd5c65e442f2375a87c174b91963be739bcdae77/bcm2710-rpi-3-b.dtb
-initrd
/var/tmp/avocado_7ks9sppd/avocado_job_wsp2727i/1-tests_acceptance_boot_linux_console.py_BootLinuxConsole.test_arm_raspi3_initrd_uart0rootfs.cpio
-append printk.time=0 earlycon=pl011,0x3f201000 console=ttyAMA0 panic=-1
noreboot -no-reboot'
>>> {'execute': 'qmp_capabilities'}
<<< {'return': {}}
Given that I've tested this before, and I see some changes to raspi3
since then, I'll try to bisect the possible culprit. If you have any
clues, they would be much appreciated.
- Cleber.