[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH 5/5] tests/boot_linux_console: Add a SLOW test booting Ub
From: |
Cleber Rosa |
Subject: |
Re: [RFC PATCH 5/5] tests/boot_linux_console: Add a SLOW test booting Ubuntu on OrangePi PC |
Date: |
Thu, 19 Dec 2019 17:54:25 -0500 |
On Wed, Dec 18, 2019 at 10:26:08PM +0100, Niek Linnenbank wrote:
> Hi Philippe,
>
> This test has some problems on my host (Ubuntu 18.04.3 LTS, avocado 73.0,
> python 3.6.9):
>
> (4/4)
> tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_arm_orangepi_bionic:
> ERROR: Input format not supported by decoder (3.25 s)
> RESULTS : PASS 3 | ERROR 1 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0
> | CANCEL 0
> JOB TIME : 46.22 s
>
> I suspect it didn't download the image correctly.
>
I don't think it's download related, because the
"archive.lzma_uncompress(image_path_xz, image_path)" line is not
capable of uncompressing that 7z archive.
> Regards,
> Niek
>
> On Tue, Dec 17, 2019 at 7:27 PM Philippe Mathieu-Daudé <address@hidden>
> wrote:
>
> > This test boots Ubuntu Bionic on a OrangePi PC board.
> >
> > As it requires 1GB of storage, and is slow, this test is disabled
> > on automatic CI testing.
> >
> > It is useful for workstation testing. Currently Avocado timeouts too
> > quickly, so we can't run userland commands.
> >
> > The kernel image and DeviceTree blob are built by the Raspbian
> > project (based on Debian):
> > https://www.raspbian.org/RaspbianImages
> >
> > The Ubuntu image is downloaded from:
> > https://dl.armbian.com/orangepipc/Bionic_current
> >
> > This test can be run using:
> >
> > $ AVOCADO_ALLOW_LARGE_STORAGE=yes \
> > avocado --show=app,console run -t machine:orangepi-pc \
> > tests/acceptance/boot_linux_console.py
> > console: Uncompressing Linux... done, booting the kernel.
> > console: Booting Linux on physical CPU 0x0
> > console: Linux version 4.20.7-sunxi (address@hidden) (gcc version
> > 7.2.1 20171011 (Linaro GCC 7.2-2017.11)) #5.75 SMP Fri Feb 8 09:02:10 CET
> > 2019
> > console: CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=50c5387d
> > console: CPU: div instructions available: patching division code
> > console: CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing
> > instruction cache
> > console: OF: fdt: Machine model: Xunlong Orange Pi PC
> > [...]
> > console: sunxi-mmc 1c0f000.mmc: initialized, max. request size: 16384 KB
> > console: NET: Registered protocol family 10
> > console: mmc0: host does not support reading read-only switch, assuming
> > write-enable
> > console: mmc0: Problem switching card into high-speed mode!
> > console: mmc0: new SD card at address 4567
> > console: mmcblk0: mmc0:4567 QEMU! 932 MiB
> > console: Segment Routing with IPv6
> > console: NET: Registered protocol family 17
> > console: NET: Registered protocol family 15
> > console: bridge: filtering via arp/ip/ip6tables is no longer available
> > by default. Update your scripts to load br_netfilter if you need this.
> > console: 8021q: 802.1Q VLAN Support v1.8
> > console: Key type dns_resolver registered
> > console: Registering SWP/SWPB emulation handler
> > console: mmcblk0: p1
> > [...]
> > console: Freeing unused kernel memory: 1024K
> > console: Run /sbin/init as init process
> > console: random: fast init done
> > console: systemd[1]: System time before build time, advancing clock.
> > console: systemd[1]: systemd 237 running in system mode. (+PAM +AUDIT
> > +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT
> > +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 +IDN -PCRE2
> > default-hierarchy=hybrid)
> > console: systemd[1]: Detected architecture arm.
> > console: Welcome to Ubuntu 18.04.3 LTS!
> > console: systemd[1]: Set hostname to <orangepipc>.
> > console: random: systemd: uninitialized urandom read (16 bytes read)
> >
> > Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
> > ---
> > RFC because this is not the definitive test, but it is helpful so
> > for for testing Niek work.
> > ---
> > tests/acceptance/boot_linux_console.py | 41 ++++++++++++++++++++++++++
> > 1 file changed, 41 insertions(+)
> >
> > diff --git a/tests/acceptance/boot_linux_console.py
> > b/tests/acceptance/boot_linux_console.py
> > index 8179b45910..663290e0c7 100644
> > --- a/tests/acceptance/boot_linux_console.py
> > +++ b/tests/acceptance/boot_linux_console.py
> > @@ -520,6 +520,47 @@ class BootLinuxConsole(Test):
> > exec_command_and_wait_for_pattern(self, 'reboot',
> > 'reboot: Restarting
> > system')
> >
> > + @skipUnless(os.getenv('AVOCADO_ALLOW_LARGE_STORAGE'), 'storage
> > limited')
> > + def test_arm_orangepi_bionic(self):
> > + """
> > + :avocado: tags=arch:arm
> > + :avocado: tags=machine:orangepi-pc
> > + """
> > + # This test download a 196MB compressed image and expand it to
> > 932MB...
> > + deb_url = ('https://apt.armbian.com/pool/main/l/'
> > +
> > 'linux-4.20.7-sunxi/linux-image-dev-sunxi_5.75_armhf.deb')
> > + deb_hash = '1334c29c44d984ffa05ed10de8c3361f33d78315'
> > + deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash)
> > + kernel_path = self.extract_from_deb(deb_path,
> > + '/boot/vmlinuz-4.20.7-sunxi')
> > + dtb_path =
> > '/usr/lib/linux-image-dev-sunxi/sun8i-h3-orangepi-pc.dtb'
> > + dtb_path = self.extract_from_deb(deb_path, dtb_path)
> > + image_url = ('https://dl.armbian.com/orangepipc/archive/'
> > + 'Armbian_19.11.3_Orangepipc_bionic_current_5.3.9.7z')
> > + image_hash = '196a8ffb72b0123d92cea4a070894813d305c71e'
> > + image_path_xz = self.fetch_asset(image_url, asset_hash=image_hash)
> > + image_name = 'Armbian_19.11.3_Orangepipc_bionic_current_5.3.9.img'
> > + image_path = os.path.join(self.workdir, image_name)
> > + archive.lzma_uncompress(image_path_xz, image_path)
I'm not sure what magic Philippe was able to do here, but I can not
uncompress this file with lzma_uncompress. I'm looking into adding
proper 7z support to avocado.utils.archive module, by means of either
the 7z library or the py7zr Python module.
- Cleber.
> > +
> > + self.vm.set_machine('orangepi-pc')
> > + self.vm.set_console()
> > + kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE +
> > + 'console=ttyS0,115200 '
> > + 'root=/dev/mmcblk0p1 rootwait rw '
> > + 'systemd.mask=dev-ttyS0.device '
> > + 'systemd.mask=armbian-zram-config.service '
> > + 'systemd.mask=armbian-ramlog.service')
> > + self.vm.add_args('-kernel', kernel_path,
> > + '-dtb', dtb_path,
> > + '-drive', 'file=' + image_path +
> > ',if=sd,format=raw',
> > + '-append', kernel_command_line,
> > + '-nic', 'user',
> > + '-no-reboot')
> > + self.vm.launch()
> > + self.wait_for_console_pattern('Welcome to Ubuntu 18.04.3 LTS!')
> > + self.wait_for_console_pattern('Started Armbian filesystem
> > resize.')
> > +
> > def test_s390x_s390_ccw_virtio(self):
> > """
> > :avocado: tags=arch:s390x
> > --
> > 2.21.0
> >
> >
>
> --
> Niek Linnenbank
signature.asc
Description: PGP signature
- Re: [PATCH 1/5] tests/boot_linux_console: Add a quick test for the OrangePi PC board, (continued)