qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Cleber Rosa <crosa@redhat.com>
To: Niek Linnenbank <nieklinnenbank@gmail.com>
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
	qemu-arm <qemu-arm@nongnu.org>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	"Guenter Roeck" <linux@roeck-us.net>,
	"QEMU Developers" <qemu-devel@nongnu.org>
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	[thread overview]
Message-ID: <20191219225425.GB28892@localhost.localdomain> (raw)
In-Reply-To: <CAPan3WrgL-ULAMQPTHj7zbNMS_xaTuNprp1W4GzhryQbMcPQOA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 7433 bytes --]

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é <f4bug@amsat.org>
> 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 (root@armbian.com) (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é <f4bug@amsat.org>
> > ---
> > 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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      reply	other threads:[~2019-12-19 22:55 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-17 18:27 [PATCH 0/5] tests/boot_linux_console: Add various OrangePi PC tests Philippe Mathieu-Daudé
2019-12-17 18:27 ` [PATCH 1/5] tests/boot_linux_console: Add a quick test for the OrangePi PC board Philippe Mathieu-Daudé
2019-12-18 21:20   ` Niek Linnenbank
2019-12-19  1:05   ` Cleber Rosa
2019-12-19 18:25     ` Cleber Rosa
2019-12-21 18:22   ` Niek Linnenbank
2019-12-17 18:27 ` [PATCH 2/5] tests/boot_linux_console: Add initrd test for the Orange Pi " Philippe Mathieu-Daudé
2019-12-18 21:21   ` Niek Linnenbank
2019-12-19 18:22   ` Cleber Rosa
2019-12-17 18:27 ` [PATCH 3/5] tests/boot_linux_console: Add a SD card test for the OrangePi " Philippe Mathieu-Daudé
2019-12-18 21:22   ` Niek Linnenbank
2019-12-19 20:04   ` Cleber Rosa
2019-12-17 18:27 ` [RFC PATCH 4/5] !fixup "hw: arm: add Xunlong Orange Pi PC machine" Philippe Mathieu-Daudé
2019-12-18 21:23   ` Niek Linnenbank
2019-12-17 18:27 ` [RFC PATCH 5/5] tests/boot_linux_console: Add a SLOW test booting Ubuntu on OrangePi PC Philippe Mathieu-Daudé
2019-12-18 21:26   ` Niek Linnenbank
2019-12-19 22:54     ` Cleber Rosa [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191219225425.GB28892@localhost.localdomain \
    --to=crosa@redhat.com \
    --cc=f4bug@amsat.org \
    --cc=linux@roeck-us.net \
    --cc=nieklinnenbank@gmail.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).