From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by 2002:adf:e804:0:0:0:0:0 with SMTP id o4csp196884wrm; Tue, 8 Oct 2019 16:12:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqxyvGYxjbUY5deZQj2lPPYmiiHg3BEFTd36hiBZPj831vGNoyj/9pW5alJ9nUHHNw1SFSek X-Received: by 2002:a50:b901:: with SMTP id m1mr406678ede.203.1570576369029; Tue, 08 Oct 2019 16:12:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570576369; cv=none; d=google.com; s=arc-20160816; b=pBKb2XaNL470Tc72/CJuHu7s1FDUVFcSVPFY5BEi2p1DFV7sLbv5CJDM18ZrEvvzqc djvaXKb8W9DoqgLkwY4leuAVlPf+KKOqxfK/rXLO9KuFwBNO2C/ZDrjLXq8mD8gGF5Ms 6fd1Sa8bQiKvG2PB1b6ZefBppEiBKXnDckc0vzZqOnvIWcHzXgJS1Yw/90fw5TBTapDL 44zqcy6tIl/dzl5RHpYIXQfa0djIU9eCNK57zMR0bltojmnmGmX4KLnyYUZZro5PAhkP B2fJKYgjpJV97AIG4JwDNJvKY+nUfUWw5f9217fnOxUvNRPXzpoxWf4SeTEhvr4fg4W6 YRJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:to:from:date; bh=53ZsRh0cbAfz/aOphK7DVVyuaVYtWHiHwH23kNcFTLk=; b=khnaFZGLXOiO+zIckCXmj2xWD5Sfm/pekVQwwflGYtNiOVJoXaAXcz/evEszu3RTAs s1fhWveAllWHQEI7yqPMEgQ4ZKA2LDVxBH9Hg5YDE47sFPXefB9TqDJnjF9uYSpBVp8m seUz0/QW5vjLI1EuqL0I8ztsWjjFg94L2HHrAbJEHrVxPyDlL95hz/mX+8TMpSH0u+MQ OC+he7SsbgRvFnmk+oFdIc0gvQHXSz0tzBtRz/YhqndEENNYIZx9mOX+0vBuA0tUtYyR 3ipqEfAY43Zq/5NS6M6oxxJqqpLeqlFUat7wJ+F5zXAJ8mBSuKsbgM+zxX2Aro01DQWe N8aw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id g21si202544ejk.23.2019.10.08.16.12.48 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 08 Oct 2019 16:12:49 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1]:37834 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iHyet-0005Hh-Mf for alex.bennee@linaro.org; Tue, 08 Oct 2019 19:12:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59344) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iHyej-0005HR-Mq for qemu-arm@nongnu.org; Tue, 08 Oct 2019 19:12:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iHyeh-0000Dd-HA for qemu-arm@nongnu.org; Tue, 08 Oct 2019 19:12:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46796) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iHyeh-0000DA-8c; Tue, 08 Oct 2019 19:12:35 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id F337F8342DF; Tue, 8 Oct 2019 23:12:33 +0000 (UTC) Received: from localhost.localdomain (ovpn-122-151.rdu2.redhat.com [10.10.122.151]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6FC895D9CD; Tue, 8 Oct 2019 23:12:28 +0000 (UTC) Date: Tue, 8 Oct 2019 19:12:26 -0400 From: Cleber Rosa To: Philippe =?iso-8859-1?Q?Mathieu-Daud=E9?= Subject: Re: [PATCH 5/5] tests/boot_linux_console: Add sdcard test for the Exynos4210 Message-ID: <20191008231226.GC11091@localhost.localdomain> References: <20191005154748.21718-1-f4bug@amsat.org> <20191005154748.21718-6-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <20191005154748.21718-6-f4bug@amsat.org> User-Agent: Mutt/1.12.1 (2019-06-15) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.69]); Tue, 08 Oct 2019 23:12:34 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-arm@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?iso-8859-1?Q?Fr=E9d=E9ric?= Basse , Peter Maydell , Eduardo Habkost , Evgeny Voevodin , Bartlomiej Zolnierkiewicz , Igor Mitsyanko , qemu-devel@nongnu.org, Krzysztof Kozlowski , Jean-Christophe Dubois , qemu-arm@nongnu.org, Dmitry Solodkiy , Maksim Kozlov , Philippe =?iso-8859-1?Q?Mathieu-Daud=E9?= , Guenter Roeck Errors-To: qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org Sender: "Qemu-arm" X-TUID: w5wI08quWZo/ On Sat, Oct 05, 2019 at 05:47:48PM +0200, Philippe Mathieu-Daud=E9 wrote: > This test boots a Linux kernel on a smdkc210 board and verify > the serial output is working. >=20 > The cpio image used comes from the linux-build-test project: > https://github.com/groeck/linux-build-test >=20 > Since this test is not reliable due to clock timing issues, > it is disabled with the 'skip' property. >=20 > Signed-off-by: Philippe Mathieu-Daud=E9 > --- > tests/acceptance/boot_linux_console.py | 47 ++++++++++++++++++++++++++ > 1 file changed, 47 insertions(+) >=20 > diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/= boot_linux_console.py > index 197358a69c..2d0d82b013 100644 > --- a/tests/acceptance/boot_linux_console.py > +++ b/tests/acceptance/boot_linux_console.py > @@ -14,6 +14,7 @@ import lzma > import gzip > import shutil > =20 > +from avocado import skip > from avocado_qemu import Test > from avocado.utils import process > from avocado.utils import archive > @@ -359,6 +360,52 @@ class BootLinuxConsole(Test): > self.wait_for_console_pattern('Boot successful.') > # TODO user command, for now the uart is stuck > =20 > + @skip("unstable clock timings") On the topic of skipping unstable tests, don't you think this is something that should check for some type of flag? Just for the sake of brainstorming, other possiblity is to build on Avocado's "WARN" test status, and instead of failing a test (and affecting the overall job execution), simply warn the user. A decorator such as "@warn_on" could be implemented similar to the existing "@fail_on" and "@cancel_on". > + def test_arm_exynos4210_sdcard(self): > + """ > + :avocado: tags=3Darch:arm > + :avocado: tags=3Dmachine:smdkc210 > + """ > + deb_url =3D ('https://snapshot.debian.org/archive/debian/' > + '20190928T224601Z/pool/main/l/linux/' > + 'linux-image-4.19.0-6-armmp_4.19.67-2+deb10u1_armhf= .deb') > + deb_hash =3D 'fa9df4a0d38936cb50084838f2cb933f570d7d82' > + deb_path =3D self.fetch_asset(deb_url, asset_hash=3Ddeb_hash) > + kernel_path =3D self.extract_from_deb(deb_path, > + '/boot/vmlinuz-4.19.0-6-ar= mmp') > + dtb_path =3D '/usr/lib/linux-image-4.19.0-6-armmp/exynos4210-s= mdkv310.dtb' > + dtb_path =3D self.extract_from_deb(deb_path, dtb_path) > + > + rootfs_url =3D ('https://github.com/groeck/linux-build-test/ra= w/' > + '2eb0a73b5d5a28df3170c546ddaaa9757e1e0848/rootfs= /' > + 'arm/rootfs-armv5.ext2.gz') > + rootfs_hash =3D '093e89d2b4d982234bf528bc9fb2f2f17a9d1f93' > + rootfs_path_gz =3D self.fetch_asset(rootfs_url, asset_hash=3Dr= ootfs_hash) > + rootfs_path =3D os.path.join(self.workdir, 'rootfs.ext2') > + gunzip(rootfs_path_gz, rootfs_path) I was going to suggest the same thing as the previous patch, but this turned out to be quite interesting. Basically, both compressed and uncompressed verions of this file seems to disguise themselves pretty well as a tar file: $ tar vtf rootfs-armv5.ext2.gz $ gzip -dc rootfs-armv5.ext2.gz | tar vtf - $ python3 -m tarfile -l rootfs-armv5.ext2.gz $ python3 -m tarfile -l rootfs-armv5.ext2 Even though it is not. This affects how "avocado.utils.uncompress" detects the file, and consequently how it tries to uncompress it. So, here, you could instead use: archive.gzip_uncompress(rootfs_path_gz, rootfs_path) To avoid relying on the broken tar file detection. - Cleber. > + > + self.vm.set_machine('smdkc210') > + self.vm.set_console(console_id=3D1) > + kernel_command_line =3D (self.KERNEL_COMMON_COMMAND_LINE + > + 'earlycon=3Dexynos4210,0x13810000 early= printk ' + > + 'console=3DttySAC1,115200n8 ' + > + 'random.trust_cpu=3Doff cryptomgr.notes= ts ' + > + 'root=3D/dev/mmcblk0 rootwait rw ' + > + 'cpuidle.off=3D1 panic=3D-1 noreboot') > + > + self.vm.add_args('-kernel', kernel_path, > + '-dtb', dtb_path, > + '-append', kernel_command_line, > + # The external MMC is on the 3rd slot > + '-drive', 'if=3Dsd,driver=3Dnull-co', > + '-drive', 'if=3Dsd,driver=3Dnull-co', > + '-drive', 'if=3Dsd,file=3D' + rootfs_path + '= ,format=3Draw', > + '-no-reboot') > + self.vm.launch() > + > + self.wait_for_console_pattern('Boot successful.') > + # TODO user command, for now the uart is stuck > + > def test_s390x_s390_ccw_virtio(self): > """ > :avocado: tags=3Darch:s390x > --=20 > 2.20.1 >=20 >=20