From nobody Mon Feb 9 15:46:04 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) 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 (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1632510563730763.1363991177777; Fri, 24 Sep 2021 12:09:23 -0700 (PDT) Received: from localhost ([::1]:43980 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mTqZW-0003Z2-Dd for importer@patchew.org; Fri, 24 Sep 2021 15:09:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39246) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mTqOG-0003cj-QO for qemu-devel@nongnu.org; Fri, 24 Sep 2021 14:57:44 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:34207) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mTqOE-0005Gr-3h for qemu-devel@nongnu.org; Fri, 24 Sep 2021 14:57:44 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-63-3JLuWwrAMuyVRCjCxDczSw-1; Fri, 24 Sep 2021 14:57:37 -0400 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1D385A0CAC; Fri, 24 Sep 2021 18:57:35 +0000 (UTC) Received: from p50.net (unknown [10.22.33.186]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A5FC87621D; Fri, 24 Sep 2021 18:57:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1632509860; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WTc5EJCD/42wZkGhsMM5lcIaAiUqyTwvJKzb/aJWQ9s=; b=cu7+k2hu/47F5QCqDxs4VvzQAI95oCwMIDQgbJv9spguC/i9Co5dkq6x7maoJcaCBzh2/P bDq+4LIg6O6Mr/VrAuc7XbYvWz9NegaUqLpG7ihQzGNXWYieX+Y5swrlCSrFf7rUZrd6f3 AzjKXVlP3aMbz0V4sdPUk6mmgx//P0M= X-MC-Unique: 3JLuWwrAMuyVRCjCxDczSw-1 From: Cleber Rosa To: qemu-devel@nongnu.org Subject: [PATCH 06/16] Acceptance Tests: use extract from package from avocado.utils Date: Fri, 24 Sep 2021 14:54:56 -0400 Message-Id: <20210924185506.2542588-7-crosa@redhat.com> In-Reply-To: <20210924185506.2542588-1-crosa@redhat.com> References: <20210924185506.2542588-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=crosa@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=216.205.24.124; envelope-from=crosa@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -23 X-Spam_score: -2.4 X-Spam_bar: -- X-Spam_report: (-2.4 / 5.0 requ) DKIMWL_WL_HIGH=-1.473, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-ppc@nongnu.org, Thomas Huth , Beraldo Leal , Yoshinori Sato , Pavel Dovgalyuk , =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Greg Kurz , Wainer dos Santos Moschetta , Auger Eric , Kamil Rytarowski , Paolo Bonzini , Reinoud Zandijk , David Gibson , Willian Rampazzo , Cleber Rosa , Alexandre Iooss , Mahmoud Mandour , Ryo ONODERA , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Eduardo Habkost Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1632510565971100001 Content-Type: text/plain; charset="utf-8" There's code in avocado.utils to handle package extractions in various (currently rpm, and deb) formats. Let's use it. Reference: https://avocado-framework.readthedocs.io/en/91.0/api/utils/avoca= do.utils.software_manager.html#avocado.utils.software_manager.SoftwareManag= er.extract_from_package Signed-off-by: Cleber Rosa --- tests/acceptance/boot_linux_console.py | 84 ++++++++++---------------- tests/acceptance/boot_xen.py | 6 +- tests/acceptance/replay_kernel.py | 12 ++-- tests/acceptance/tcg_plugins.py | 2 +- 4 files changed, 41 insertions(+), 63 deletions(-) diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot= _linux_console.py index 4c824bc161..80e3a2f7a6 100644 --- a/tests/acceptance/boot_linux_console.py +++ b/tests/acceptance/boot_linux_console.py @@ -23,6 +23,7 @@ from avocado.utils import process from avocado.utils import archive from avocado.utils.path import find_command, CmdNotFoundError +from avocado.utils.software_manager import SoftwareManager =20 P7ZIP_AVAILABLE =3D True try: @@ -54,42 +55,19 @@ def wait_for_console_pattern(self, success_message, vm= =3DNone): failure_message=3D'Kernel panic - not syn= cing', vm=3Dvm) =20 - def extract_from_deb(self, deb, path): + def extract_from_pkg(self, pkg, path): """ - Extracts a file from a deb package into the test workdir + Extracts a file from a DEB or RPM package into the test workdir =20 - :param deb: path to the deb archive - :param path: path within the deb archive of the file to be extract= ed + :param pkg: path to the DEB or RPM package + :param path: path within the DEB or RPM archive of the file to + be extracted :returns: path of the extracted file """ - cwd =3D os.getcwd() - os.chdir(self.workdir) - file_path =3D 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 complete path to extracted file. Because callers to - # extract_from_deb() specify 'path' with a leading slash, it is - # necessary to use os.path.relpath() as otherwise os.path.join() - # interprets it as an absolute path and drops the self.workdir par= t. + SoftwareManager.extract_from_package(pkg, self.workdir) return os.path.normpath(os.path.join(self.workdir, os.path.relpath(path, '/'))) =20 - def extract_from_rpm(self, rpm, path): - """ - Extracts a file from an RPM package into the test workdir. - - :param rpm: path to the rpm archive - :param path: path within the rpm archive of the file to be extract= ed - needs to be a relative path (starting with './') beca= use - cpio(1), which is used to extract the file, expects t= hat. - :returns: path of the extracted file - """ - cwd =3D os.getcwd() - os.chdir(self.workdir) - process.run("rpm2cpio %s | cpio -id %s" % (rpm, path), shell=3DTru= e) - os.chdir(cwd) - return os.path.normpath(os.path.join(self.workdir, path)) =20 class BootLinuxConsole(LinuxKernelTest): """ @@ -128,7 +106,7 @@ def test_mips_malta(self): 'linux-image-2.6.32-5-4kc-malta_2.6.32-48_mips.deb') deb_hash =3D 'a8cfc28ad8f45f54811fc6cf74fc43ffcfe0ba04' deb_path =3D self.fetch_asset(deb_url, asset_hash=3Ddeb_hash) - kernel_path =3D self.extract_from_deb(deb_path, + kernel_path =3D self.extract_from_pkg(deb_path, '/boot/vmlinux-2.6.32-5-4kc-ma= lta') =20 self.vm.set_console() @@ -160,7 +138,7 @@ def test_mips64el_malta(self): 'linux-image-2.6.32-5-5kc-malta_2.6.32-48_mipsel.deb') deb_hash =3D '1aaec92083bf22fda31e0d27fa8d9a388e5fc3d5' deb_path =3D self.fetch_asset(deb_url, asset_hash=3Ddeb_hash) - kernel_path =3D self.extract_from_deb(deb_path, + kernel_path =3D self.extract_from_pkg(deb_path, '/boot/vmlinux-2.6.32-5-5kc-ma= lta') =20 self.vm.set_console() @@ -181,7 +159,7 @@ def test_mips64el_fuloong2e(self): 'linux-image-3.16.0-6-loongson-2e_3.16.56-1+deb8u1_mips= el.deb') deb_hash =3D 'd04d446045deecf7b755ef576551de0c4184dd44' deb_path =3D self.fetch_asset(deb_url, asset_hash=3Ddeb_hash) - kernel_path =3D self.extract_from_deb(deb_path, + kernel_path =3D self.extract_from_pkg(deb_path, '/boot/vmlinux-3.16.0-6-loongs= on-2e') =20 self.vm.set_console() @@ -203,7 +181,7 @@ def test_mips_malta_cpio(self): 'linux-image-4.5.0-2-4kc-malta_4.5.5-1_mips.deb') deb_hash =3D 'a3c84f3e88b54e06107d65a410d1d1e8e0f340f8' deb_path =3D self.fetch_asset(deb_url, asset_hash=3Ddeb_hash) - kernel_path =3D self.extract_from_deb(deb_path, + kernel_path =3D self.extract_from_pkg(deb_path, '/boot/vmlinux-4.5.0-2-4kc-mal= ta') initrd_url =3D ('https://github.com/groeck/linux-build-test/raw/' '8584a59ed9e5eb5ee7ca91f6d74bbb06619205b8/rootfs/' @@ -454,8 +432,8 @@ def do_test_arm_raspi2(self, uart_id): 'raspberrypi-kernel_1.20190215-1_armhf.deb') deb_hash =3D 'cd284220b32128c5084037553db3c482426f3972' deb_path =3D self.fetch_asset(deb_url, asset_hash=3Ddeb_hash) - kernel_path =3D self.extract_from_deb(deb_path, '/boot/kernel7.img= ') - dtb_path =3D self.extract_from_deb(deb_path, '/boot/bcm2709-rpi-2-= b.dtb') + kernel_path =3D self.extract_from_pkg(deb_path, '/boot/kernel7.img= ') + dtb_path =3D self.extract_from_pkg(deb_path, '/boot/bcm2709-rpi-2-= b.dtb') =20 self.vm.set_console() kernel_command_line =3D (self.KERNEL_COMMON_COMMAND_LINE + @@ -494,8 +472,8 @@ def test_arm_raspi2_initrd(self): 'raspberrypi-kernel_1.20190215-1_armhf.deb') deb_hash =3D 'cd284220b32128c5084037553db3c482426f3972' deb_path =3D self.fetch_asset(deb_url, asset_hash=3Ddeb_hash) - kernel_path =3D self.extract_from_deb(deb_path, '/boot/kernel7.img= ') - dtb_path =3D self.extract_from_deb(deb_path, '/boot/bcm2709-rpi-2-= b.dtb') + kernel_path =3D self.extract_from_pkg(deb_path, '/boot/kernel7.img= ') + dtb_path =3D self.extract_from_pkg(deb_path, '/boot/bcm2709-rpi-2-= b.dtb') =20 initrd_url =3D ('https://github.com/groeck/linux-build-test/raw/' '2eb0a73b5d5a28df3170c546ddaaa9757e1e0848/rootfs/' @@ -537,10 +515,10 @@ def test_arm_exynos4210_initrd(self): '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, + kernel_path =3D self.extract_from_pkg(deb_path, '/boot/vmlinuz-4.19.0-6-armmp') dtb_path =3D '/usr/lib/linux-image-4.19.0-6-armmp/exynos4210-smdkv= 310.dtb' - dtb_path =3D self.extract_from_deb(deb_path, dtb_path) + dtb_path =3D self.extract_from_pkg(deb_path, dtb_path) =20 initrd_url =3D ('https://github.com/groeck/linux-build-test/raw/' '2eb0a73b5d5a28df3170c546ddaaa9757e1e0848/rootfs/' @@ -577,10 +555,10 @@ def test_arm_cubieboard_initrd(self): 'linux-5.10.16-sunxi/linux-image-current-sunxi_21.02.2_= armhf.deb') deb_hash =3D '9fa84beda245cabf0b4fa84cf6eaa7738ead1da0' deb_path =3D self.fetch_asset(deb_url, asset_hash=3Ddeb_hash) - kernel_path =3D self.extract_from_deb(deb_path, + kernel_path =3D self.extract_from_pkg(deb_path, '/boot/vmlinuz-5.10.16-sunxi') dtb_path =3D '/usr/lib/linux-image-current-sunxi/sun4i-a10-cubiebo= ard.dtb' - dtb_path =3D self.extract_from_deb(deb_path, dtb_path) + dtb_path =3D self.extract_from_pkg(deb_path, dtb_path) initrd_url =3D ('https://github.com/groeck/linux-build-test/raw/' '2eb0a73b5d5a28df3170c546ddaaa9757e1e0848/rootfs/' 'arm/rootfs-armv5.cpio.gz') @@ -618,10 +596,10 @@ def test_arm_cubieboard_sata(self): 'linux-5.10.16-sunxi/linux-image-current-sunxi_21.02.2_= armhf.deb') deb_hash =3D '9fa84beda245cabf0b4fa84cf6eaa7738ead1da0' deb_path =3D self.fetch_asset(deb_url, asset_hash=3Ddeb_hash) - kernel_path =3D self.extract_from_deb(deb_path, + kernel_path =3D self.extract_from_pkg(deb_path, '/boot/vmlinuz-5.10.16-sunxi') dtb_path =3D '/usr/lib/linux-image-current-sunxi/sun4i-a10-cubiebo= ard.dtb' - dtb_path =3D self.extract_from_deb(deb_path, dtb_path) + dtb_path =3D self.extract_from_pkg(deb_path, dtb_path) rootfs_url =3D ('https://github.com/groeck/linux-build-test/raw/' '2eb0a73b5d5a28df3170c546ddaaa9757e1e0848/rootfs/' 'arm/rootfs-armv5.ext2.gz') @@ -748,10 +726,10 @@ def test_arm_orangepi(self): 'linux-5.10.16-sunxi/linux-image-current-sunxi_21.02.2_= armhf.deb') deb_hash =3D '9fa84beda245cabf0b4fa84cf6eaa7738ead1da0' deb_path =3D self.fetch_asset(deb_url, asset_hash=3Ddeb_hash) - kernel_path =3D self.extract_from_deb(deb_path, + kernel_path =3D self.extract_from_pkg(deb_path, '/boot/vmlinuz-5.10.16-sunxi') dtb_path =3D '/usr/lib/linux-image-current-sunxi/sun8i-h3-orangepi= -pc.dtb' - dtb_path =3D self.extract_from_deb(deb_path, dtb_path) + dtb_path =3D self.extract_from_pkg(deb_path, dtb_path) =20 self.vm.set_console() kernel_command_line =3D (self.KERNEL_COMMON_COMMAND_LINE + @@ -774,10 +752,10 @@ def test_arm_orangepi_initrd(self): 'linux-5.10.16-sunxi/linux-image-current-sunxi_21.02.2_= armhf.deb') deb_hash =3D '9fa84beda245cabf0b4fa84cf6eaa7738ead1da0' deb_path =3D self.fetch_asset(deb_url, asset_hash=3Ddeb_hash) - kernel_path =3D self.extract_from_deb(deb_path, + kernel_path =3D self.extract_from_pkg(deb_path, '/boot/vmlinuz-5.10.16-sunxi') dtb_path =3D '/usr/lib/linux-image-current-sunxi/sun8i-h3-orangepi= -pc.dtb' - dtb_path =3D self.extract_from_deb(deb_path, dtb_path) + dtb_path =3D self.extract_from_pkg(deb_path, dtb_path) initrd_url =3D ('https://github.com/groeck/linux-build-test/raw/' '2eb0a73b5d5a28df3170c546ddaaa9757e1e0848/rootfs/' 'arm/rootfs-armv7a.cpio.gz') @@ -818,10 +796,10 @@ def test_arm_orangepi_sd(self): 'linux-5.10.16-sunxi/linux-image-current-sunxi_21.02.2_= armhf.deb') deb_hash =3D '9fa84beda245cabf0b4fa84cf6eaa7738ead1da0' deb_path =3D self.fetch_asset(deb_url, asset_hash=3Ddeb_hash) - kernel_path =3D self.extract_from_deb(deb_path, + kernel_path =3D self.extract_from_pkg(deb_path, '/boot/vmlinuz-5.10.16-sunxi') dtb_path =3D '/usr/lib/linux-image-current-sunxi/sun8i-h3-orangepi= -pc.dtb' - dtb_path =3D self.extract_from_deb(deb_path, dtb_path) + dtb_path =3D self.extract_from_pkg(deb_path, dtb_path) rootfs_url =3D ('http://storage.kernelci.org/images/rootfs/buildro= ot/' 'kci-2019.02/armel/base/rootfs.ext2.xz') rootfs_hash =3D '692510cb625efda31640d1de0a8d60e26040f061' @@ -924,7 +902,7 @@ def test_arm_orangepi_uboot_netbsd9(self): # OrangePi "PC" device tree blob with 'setenv fdtfile' in U-Boot p= rompt, # before to boot NetBSD. uboot_path =3D '/usr/lib/u-boot/orangepi_plus/u-boot-sunxi-with-sp= l.bin' - uboot_path =3D self.extract_from_deb(deb_path, uboot_path) + uboot_path =3D self.extract_from_pkg(deb_path, uboot_path) image_url =3D ('https://cdn.netbsd.org/pub/NetBSD/NetBSD-9.0/' 'evbarm-earmv7hf/binary/gzimg/armv7.img.gz') image_hash =3D '2babb29d36d8360adcb39c09e31060945259917a' @@ -1044,7 +1022,7 @@ def test_m68k_q800(self): '/l/linux/kernel-image-5.3.0-1-m68k-di_5.3.7-1_m68k.ude= b') deb_hash =3D '044954bb9be4160a3ce81f8bc1b5e856b75cccd1' deb_path =3D self.fetch_asset(deb_url, asset_hash=3Ddeb_hash) - kernel_path =3D self.extract_from_deb(deb_path, + kernel_path =3D self.extract_from_pkg(deb_path, '/boot/vmlinux-5.3.0-1-m68k') =20 self.vm.set_console() @@ -1133,8 +1111,8 @@ def test_arm_ast2600_debian(self): deb_hash =3D 'db40d32fe39255d05482bea48d72467b67d6225bb2a2a4d6f618= cb8976f1e09e' deb_path =3D self.fetch_asset(deb_url, asset_hash=3Ddeb_hash, algorithm=3D'sha256') - kernel_path =3D self.extract_from_deb(deb_path, '/boot/vmlinuz-5.1= 0.0-3-armmp') - dtb_path =3D self.extract_from_deb(deb_path, + kernel_path =3D self.extract_from_pkg(deb_path, '/boot/vmlinuz-5.1= 0.0-3-armmp') + dtb_path =3D self.extract_from_pkg(deb_path, '/usr/lib/linux-image-5.10.0-3-armmp/aspeed-bmc-opp-tacoma= .dtb') =20 self.vm.set_console() diff --git a/tests/acceptance/boot_xen.py b/tests/acceptance/boot_xen.py index 3479b5233b..b5860b7d88 100644 --- a/tests/acceptance/boot_xen.py +++ b/tests/acceptance/boot_xen.py @@ -77,7 +77,7 @@ def test_arm64_xen_411_and_dom0(self): 'xen-hypervisor-4.11-arm64_4.11.4%2B37-g3263f257ca-1_ar= m64.deb') xen_sha1 =3D '034e634d4416adbad1212d59b62bccdcda63e62a' xen_deb =3D self.fetch_asset(xen_url, asset_hash=3Dxen_sha1) - xen_path =3D self.extract_from_deb(xen_deb, "/boot/xen-4.11-arm64") + xen_path =3D self.extract_from_pkg(xen_deb, "/boot/xen-4.11-arm64") =20 self.launch_xen(xen_path) =20 @@ -95,7 +95,7 @@ def test_arm64_xen_414_and_dom0(self): 'xen-hypervisor-4.14-arm64_4.14.0%2B80-gd101b417b7-1_ar= m64.deb') xen_sha1 =3D 'b9d209dd689ed2b393e625303a225badefec1160' xen_deb =3D self.fetch_asset(xen_url, asset_hash=3Dxen_sha1) - xen_path =3D self.extract_from_deb(xen_deb, "/boot/xen-4.14-arm64") + xen_path =3D self.extract_from_pkg(xen_deb, "/boot/xen-4.14-arm64") =20 self.launch_xen(xen_path) =20 @@ -112,6 +112,6 @@ def test_arm64_xen_415_and_dom0(self): '?path=3D%2F&files=3Dxen-upstream-4.15-unstable.deb') xen_sha1 =3D 'fc191172b85cf355abb95d275a24cc0f6d6579d8' xen_deb =3D self.fetch_asset(xen_url, asset_hash=3Dxen_sha1) - xen_path =3D self.extract_from_deb(xen_deb, "/boot/xen-4.15-unstab= le") + xen_path =3D self.extract_from_pkg(xen_deb, "/boot/xen-4.15-unstab= le") =20 self.launch_xen(xen_path) diff --git a/tests/acceptance/replay_kernel.py b/tests/acceptance/replay_ke= rnel.py index bb32b31240..cfca71e65f 100644 --- a/tests/acceptance/replay_kernel.py +++ b/tests/acceptance/replay_kernel.py @@ -106,7 +106,7 @@ def test_mips_malta(self): 'linux-image-2.6.32-5-4kc-malta_2.6.32-48_mips.deb') deb_hash =3D 'a8cfc28ad8f45f54811fc6cf74fc43ffcfe0ba04' deb_path =3D self.fetch_asset(deb_url, asset_hash=3Ddeb_hash) - kernel_path =3D self.extract_from_deb(deb_path, + kernel_path =3D self.extract_from_pkg(deb_path, '/boot/vmlinux-2.6.32-5-4kc-ma= lta') kernel_command_line =3D self.KERNEL_COMMON_COMMAND_LINE + 'console= =3DttyS0' console_pattern =3D 'Kernel command line: %s' % kernel_command_line @@ -134,7 +134,7 @@ def test_mips64el_malta(self): 'linux-image-2.6.32-5-5kc-malta_2.6.32-48_mipsel.deb') deb_hash =3D '1aaec92083bf22fda31e0d27fa8d9a388e5fc3d5' deb_path =3D self.fetch_asset(deb_url, asset_hash=3Ddeb_hash) - kernel_path =3D self.extract_from_deb(deb_path, + kernel_path =3D self.extract_from_pkg(deb_path, '/boot/vmlinux-2.6.32-5-5kc-ma= lta') kernel_command_line =3D self.KERNEL_COMMON_COMMAND_LINE + 'console= =3DttyS0' console_pattern =3D 'Kernel command line: %s' % kernel_command_line @@ -185,10 +185,10 @@ def test_arm_cubieboard_initrd(self): 'linux-5.10.16-sunxi/linux-image-current-sunxi_21.02.2_= armhf.deb') deb_hash =3D '9fa84beda245cabf0b4fa84cf6eaa7738ead1da0' deb_path =3D self.fetch_asset(deb_url, asset_hash=3Ddeb_hash) - kernel_path =3D self.extract_from_deb(deb_path, + kernel_path =3D self.extract_from_pkg(deb_path, '/boot/vmlinuz-5.10.16-sunxi') dtb_path =3D '/usr/lib/linux-image-current-sunxi/sun4i-a10-cubiebo= ard.dtb' - dtb_path =3D self.extract_from_deb(deb_path, dtb_path) + dtb_path =3D self.extract_from_pkg(deb_path, dtb_path) initrd_url =3D ('https://github.com/groeck/linux-build-test/raw/' '2eb0a73b5d5a28df3170c546ddaaa9757e1e0848/rootfs/' 'arm/rootfs-armv5.cpio.gz') @@ -233,7 +233,7 @@ def test_m68k_q800(self): '/l/linux/kernel-image-5.3.0-1-m68k-di_5.3.7-1_m68k.ude= b') deb_hash =3D '044954bb9be4160a3ce81f8bc1b5e856b75cccd1' deb_path =3D self.fetch_asset(deb_url, asset_hash=3Ddeb_hash) - kernel_path =3D self.extract_from_deb(deb_path, + kernel_path =3D self.extract_from_pkg(deb_path, '/boot/vmlinux-5.3.0-1-m68k') =20 kernel_command_line =3D (self.KERNEL_COMMON_COMMAND_LINE + @@ -368,7 +368,7 @@ def test_mips_malta_cpio(self): 'linux-image-4.5.0-2-4kc-malta_4.5.5-1_mips.deb') deb_hash =3D 'a3c84f3e88b54e06107d65a410d1d1e8e0f340f8' deb_path =3D self.fetch_asset(deb_url, asset_hash=3Ddeb_hash) - kernel_path =3D self.extract_from_deb(deb_path, + kernel_path =3D self.extract_from_pkg(deb_path, '/boot/vmlinux-4.5.0-2-4kc-mal= ta') initrd_url =3D ('https://github.com/groeck/linux-build-test/raw/' '8584a59ed9e5eb5ee7ca91f6d74bbb06619205b8/rootfs/' diff --git a/tests/acceptance/tcg_plugins.py b/tests/acceptance/tcg_plugins= .py index 9ca1515c3b..bfa7f36104 100644 --- a/tests/acceptance/tcg_plugins.py +++ b/tests/acceptance/tcg_plugins.py @@ -59,7 +59,7 @@ def _grab_aarch64_kernel(self): 'linux-image-4.19.0-12-arm64_4.19.152-1_arm64.deb') kernel_sha1 =3D '2036c2792f80ac9c4ccaae742b2e0a28385b6010' kernel_deb =3D self.fetch_asset(kernel_url, asset_hash=3Dkernel_sh= a1) - kernel_path =3D self.extract_from_deb(kernel_deb, + kernel_path =3D self.extract_from_pkg(kernel_deb, "/boot/vmlinuz-4.19.0-12-arm64= ") return kernel_path =20 --=20 2.31.1