From patchwork Thu May 23 16:18:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 1104303 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=amsat.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="pKxEwwbo"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 458w0V5Jqgz9s5c for ; Fri, 24 May 2019 02:28:10 +1000 (AEST) Received: from localhost ([127.0.0.1]:40361 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hTqZc-0000e3-P1 for incoming@patchwork.ozlabs.org; Thu, 23 May 2019 12:28:08 -0400 Received: from eggs.gnu.org ([209.51.188.92]:37504) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hTqQQ-0002OF-7W for qemu-devel@nongnu.org; Thu, 23 May 2019 12:18:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hTqQP-0006TD-AL for qemu-devel@nongnu.org; Thu, 23 May 2019 12:18:38 -0400 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]:37427) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hTqQP-0006Sa-3L for qemu-devel@nongnu.org; Thu, 23 May 2019 12:18:37 -0400 Received: by mail-wr1-x442.google.com with SMTP id e15so6963018wrs.4 for ; Thu, 23 May 2019 09:18:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=t+fpOzpoYMTvZREMygefSwOqjQyndhbSY04K2Iq39pg=; b=pKxEwwboJZUmeKt5OoQX2Rivx1lS7LvoJgAtURLdWDf3ldBnS/Z4dBxnxSx2CRH6sC MEjefgUTYU+Mg5fw4pfrFPMW8z/KPWkXrxh5xaIkhtWeezf1mjRXTPez5MTJjo2XrSGq rEAORtBeXUPaAQPXdQ6kPRS/kvU46QOtbQyyubDcioUrKFqTsUoFKJKk8+Wzcp+5mNqy 1haJc8QDxs1azQ7KccQ7PvHihPNP3l5E5KBhgBXqlWt/QVEZmL5c5OpiMAod7eqLkfGo YC8osiiSSk/WD71rQsowiRWYl4KIQV+bQTZLfRatqiVvOEJlMQ4uHHzz3wFUYI9h5Tl9 /pBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=t+fpOzpoYMTvZREMygefSwOqjQyndhbSY04K2Iq39pg=; b=fGv8PYox//J+bm6/ISy7+oE9i6VkaxizTrr5Wv4NXosPlBqTfDvabb+8hCwJY5eSHc v8Sa/e2Z0Ro6TX75zl3IQEznimVwwnm6BsDDLXquR0bKfMrubCNuy1zc6wu03SG1wfj9 /2RVrc62rVsof/YX/hTL0li356kdYFwX7O7qYyl2DO7FY/DqBD6LY9+O+rwBjst3SbUx hYAZ09SmmPcs3HPoFMHKdvqfcE8/lb7TiyzYq2dB1fL2+gE4euLDeMiJtPWPVVB+dW4x a8pqSXsimY4dztBk2M7HuDsKN+QFnaSYBYR11qlOJpG82ama8wLg5a4D2vnZoyNCt/N+ TlgA== X-Gm-Message-State: APjAAAWfbPTaDlHRF0zetUSMYK9uWUcmOpzoC1R1t6ysslimJR0lZl5H Vc3qPHNMl8uBOk4evxo/kZM= X-Google-Smtp-Source: APXvYqyZOHTmTWBYjU7/FHaxxOBDtQLgthd1J+dX2g8Z3I4Wpqsb+3MyMEeXXQC87Ijp5BQ+JW7fxw== X-Received: by 2002:adf:e2c8:: with SMTP id d8mr7265314wrj.14.1558628316001; Thu, 23 May 2019 09:18:36 -0700 (PDT) Received: from x1.local (228.red-83-52-173.dynamicip.rima-tde.net. [83.52.173.228]) by smtp.gmail.com with ESMTPSA id q16sm10273222wmj.17.2019.05.23.09.18.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 May 2019 09:18:35 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Eduardo Habkost , qemu-devel@nongnu.org, Cleber Rosa Date: Thu, 23 May 2019 18:18:29 +0200 Message-Id: <20190523161832.22490-2-f4bug@amsat.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190523161832.22490-1-f4bug@amsat.org> References: <20190523161832.22490-1-f4bug@amsat.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::442 Subject: [Qemu-devel] [PATCH v2 1/4] 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: Aleksandar Rikalo , =?utf-8?q?Philippe_Mathieu-D?= =?utf-8?b?YXVkw6k=?= , Aleksandar Markovic , Aleksandar Markovic , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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 function avocado.utils.archive.extract() will handle the different compression format for us. Signed-off-by: Philippe Mathieu-Daudé --- This patch is already in Eduardo's queue, but is required in this series. --- 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 d5c500ea30..6aa084e049 100644 --- a/tests/acceptance/boot_linux_console.py +++ b/tests/acceptance/boot_linux_console.py @@ -55,8 +55,9 @@ class BootLinuxConsole(Test): """ cwd = os.getcwd() os.chdir(self.workdir) - process.run("ar x %s data.tar.gz" % deb) - archive.extract("data.tar.gz", self.workdir) + file_path = process.run("ar t %s" % deb).stdout_text.split()[2] + process.run("ar x %s %s" % (deb, file_path)) + archive.extract(file_path, self.workdir) os.chdir(cwd) return self.workdir + path