From nobody Sun Nov 9 17:50:06 2025 Delivered-To: importer@patchew.org Received-SPF: temperror (zoho.com: Error in retrieving data from DNS) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=temperror (zoho.com: Error in retrieving data from DNS) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1551564158696218.32127880596863; Sat, 2 Mar 2019 14:02:38 -0800 (PST) Received: from localhost ([127.0.0.1]:59415 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h0CiB-00064U-76 for importer@patchew.org; Sat, 02 Mar 2019 17:02:27 -0500 Received: from eggs.gnu.org ([209.51.188.92]:60697) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h0CgR-0005Fn-Om for qemu-devel@nongnu.org; Sat, 02 Mar 2019 17:00:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h0Cb4-0002nX-Ak for qemu-devel@nongnu.org; Sat, 02 Mar 2019 16:55:06 -0500 Received: from mx1.redhat.com ([209.132.183.28]:45434) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h0Cb4-0002lS-3x for qemu-devel@nongnu.org; Sat, 02 Mar 2019 16:55:06 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 09C1C86658 for ; Sat, 2 Mar 2019 21:55:05 +0000 (UTC) Received: from x1w.redhat.com (ovpn-204-70.brq.redhat.com [10.40.204.70]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 203695F9CA; Sat, 2 Mar 2019 21:54:57 +0000 (UTC) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: Cleber Rosa , qemu-devel@nongnu.org Date: Sat, 2 Mar 2019 22:54:54 +0100 Message-Id: <20190302215454.6189-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Sat, 02 Mar 2019 21:55:05 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH] BootLinuxConsoleTest: Let extract_from_deb handle various compressions X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Eduardo Habkost , Caio Carrara Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Debian binary package format supports various compressions. Per man deb(5): NAME deb - Debian binary package format FORMAT ... The third, last required member is named data.tar. It contains the filesystem as a tar archive, either not compressed (supported since dpkg 1.10.24), or compressed with gzip (with .gz extension), xz (with .xz extension, supported since dpkg 1.15.6), bzip2 (with .bz2 extension, supported since dpkg 1.10.24) or lzma (with .lzma extension, supported since dpkg 1.13.25). List the archive files to have the 3rd name with the correct extension. The method avocado.utils.archive.extract() will handle the different compression format for us. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Cleber Rosa --- Based-on: 20190221005753.27955-15-crosa@redhat.com tests/acceptance/boot_linux_console.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot= _linux_console.py index d866886067..b62b70bbde 100644 --- a/tests/acceptance/boot_linux_console.py +++ b/tests/acceptance/boot_linux_console.py @@ -58,8 +58,9 @@ class BootLinuxConsole(Test): """ cwd =3D os.getcwd() os.chdir(self.workdir) - process.run("ar x %s data.tar.gz" % deb) - archive.extract("data.tar.gz", self.workdir) + file_path =3D process.system_output("ar t %s" % deb).split()[2].de= code() + process.run("ar x %s %s" % (deb, file_path)) + archive.extract(file_path, self.workdir) os.chdir(cwd) return self.workdir + path =20 --=20 2.20.1