From nobody Sun Feb 8 10:03:39 2026 Delivered-To: importer@patchew.org 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; 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=oracle.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1580914766413646.9593107013102; Wed, 5 Feb 2020 06:59:26 -0800 (PST) Received: from localhost ([::1]:49148 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1izM9F-0002Oz-B0 for importer@patchew.org; Wed, 05 Feb 2020 09:59:25 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:46530) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1izM8M-0000zi-Dl for qemu-devel@nongnu.org; Wed, 05 Feb 2020 09:58:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1izM8I-0003ci-TD for qemu-devel@nongnu.org; Wed, 05 Feb 2020 09:58:30 -0500 Received: from userp2120.oracle.com ([156.151.31.85]:36040) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1izM8I-0003Ub-J9 for qemu-devel@nongnu.org; Wed, 05 Feb 2020 09:58:26 -0500 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id 015EwIjg177728; Wed, 5 Feb 2020 14:58:18 GMT Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by userp2120.oracle.com with ESMTP id 2xykbpbh9m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 05 Feb 2020 14:58:17 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.27/8.16.0.27) with SMTP id 015ErSbh035785; Wed, 5 Feb 2020 14:56:17 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserp3030.oracle.com with ESMTP id 2xykbs1jba-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 05 Feb 2020 14:56:17 +0000 Received: from abhmp0013.oracle.com (abhmp0013.oracle.com [141.146.116.19]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 015EuGdX031736; Wed, 5 Feb 2020 14:56:16 GMT Received: from ol7.uk.oracle.com (/10.175.206.136) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 05 Feb 2020 06:56:15 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references; s=corp-2019-08-05; bh=uDMebgrMxUcBSr5hvk5FcrO1kO/C3DlsnZ2aqcTB1sE=; b=ejwJBeJ0vvwOmC6eF6DsG+2Dis7Dra6qu3BcmXfrXMgKIkI+mR91tWIe/PYK6YV0buv2 3nTJZQVJmRJnMtPpyaaWZNhCMxWkoypqbOwKWy3+8i1mVEphdHxl8q348HRTFljWMBDu xS74nUaiAqLcVMi5iyG0lnmQSWUKK61dN6ERfeU27Noq7Af8679ybUnrHT0qeGgWRK/P YYvebD7nPkoeIMeFanUyn6cimnW86ZwKI1aV5iGhShzN+qaDaNupFXWBJjQu70Ul/nDS jEs3icz27fGZ6B5L4uJOYA1iuBpHDE4FXoWZxJevzhwd8MM/scD0ckVy1ymP6XBBvJLr oQ== From: Liam Merwick To: alex.bennee@linaro.org, fam@euphon.net, philmd@redhat.com Subject: [PATCH v2 1/6] tests/boot_linux_console: add microvm acceptance test Date: Wed, 5 Feb 2020 14:56:00 +0000 Message-Id: <1580914565-19675-2-git-send-email-liam.merwick@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1580914565-19675-1-git-send-email-liam.merwick@oracle.com> References: <1580914565-19675-1-git-send-email-liam.merwick@oracle.com> X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9521 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=917 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1911140001 definitions=main-2002050118 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9521 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=971 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1911140001 definitions=main-2002050119 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 156.151.31.85 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: slp@redhat.com, qemu-devel@nongnu.org, wainersm@redhat.com, pbonzini@redhat.com, sgarzare@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Refactor test_x86_64_pc() to test_x86_64_machine() so that separate functions which specify the Avocado tag of ':avocado: tags=3Dmachine:' as being either 'pc' or 'microvm' can be used to test booting a compressed kernel using either machine class. Signed-off-by: Liam Merwick Reviewed-by: Stefano Garzarella Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Philippe Mathieu-Daud=C3=A9 --- tests/acceptance/boot_linux_console.py | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot= _linux_console.py index e40b84651b0b..233601b429bd 100644 --- a/tests/acceptance/boot_linux_console.py +++ b/tests/acceptance/boot_linux_console.py @@ -51,10 +51,10 @@ class BootLinuxConsole(Test): os.chdir(cwd) return self.workdir + path =20 - def test_x86_64_pc(self): + def do_test_x86_64_machine(self): """ - :avocado: tags=3Darch:x86_64 - :avocado: tags=3Dmachine:pc + Common routine to boot an x86_64 guest. + Caller must specify tags=3Darch and tags=3Dmachine """ kernel_url =3D ('https://archives.fedoraproject.org/pub/archive/fe= dora' '/linux/releases/29/Everything/x86_64/os/images/pxeb= oot' @@ -70,6 +70,20 @@ class BootLinuxConsole(Test): console_pattern =3D 'Kernel command line: %s' % kernel_command_line self.wait_for_console_pattern(console_pattern) =20 + def test_x86_64_pc(self): + """ + :avocado: tags=3Darch:x86_64 + :avocado: tags=3Dmachine:pc + """ + self.do_test_x86_64_machine() + + def test_x86_64_microvm(self): + """ + :avocado: tags=3Darch:x86_64 + :avocado: tags=3Dmachine:microvm + """ + self.do_test_x86_64_machine() + def test_mips_malta(self): """ :avocado: tags=3Darch:mips --=20 1.8.3.1 From nobody Sun Feb 8 10:03:39 2026 Delivered-To: importer@patchew.org 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; 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=oracle.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1580914759796985.4558738104008; Wed, 5 Feb 2020 06:59:19 -0800 (PST) Received: from localhost ([::1]:49132 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1izM98-000299-Mq for importer@patchew.org; Wed, 05 Feb 2020 09:59:18 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:46437) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1izM8H-0000qC-GU for qemu-devel@nongnu.org; Wed, 05 Feb 2020 09:58:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1izM8G-0003La-7H for qemu-devel@nongnu.org; Wed, 05 Feb 2020 09:58:25 -0500 Received: from aserp2120.oracle.com ([141.146.126.78]:54884) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1izM8F-0003GK-V1 for qemu-devel@nongnu.org; Wed, 05 Feb 2020 09:58:24 -0500 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id 015EwE6d169232; Wed, 5 Feb 2020 14:58:19 GMT Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by aserp2120.oracle.com with ESMTP id 2xykbp3hqn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 05 Feb 2020 14:58:19 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.27/8.16.0.27) with SMTP id 015ErR0P035657; Wed, 5 Feb 2020 14:56:18 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserp3030.oracle.com with ESMTP id 2xykbs1jdc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 05 Feb 2020 14:56:18 +0000 Received: from abhmp0013.oracle.com (abhmp0013.oracle.com [141.146.116.19]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 015EuIRL031803; Wed, 5 Feb 2020 14:56:18 GMT Received: from ol7.uk.oracle.com (/10.175.206.136) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 05 Feb 2020 06:56:17 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references; s=corp-2019-08-05; bh=yK1tWEoUeCtltJVvmq9/DmL/8je7tfJJ4WEQoiB05oM=; b=P39GtlsjfSwEdxwXh72KzoLHgsRDqfyz5H7VPFt2DFYXn90m3aCjzVGYMhxjpxmOo3uA bqATLm+TSIcMoSKtZUSVKRgbURSqXmxp4ZJuf8eb01E5izSqwU6Mq8V2K8m4SqCZOq05 avdGsk9KlXl9UL3fqrbMwn0LH91LaTSb+v9sF2D4iWiCLIcjBGd3mRhbtTKmEUemlut0 YyG68LfvjWhZt492RyUNx54/KpTxXsztwwGkSEA+OlGL/IaBM2CLQvirhPwEcJQwdL3C SL1jRjP0iBEGHsAg7YS1dmN9Ivfaa1BrN1fmKw8Ec4kaxHWawHNkgnOoAp+ZxBdRVN4z 1A== From: Liam Merwick To: alex.bennee@linaro.org, fam@euphon.net, philmd@redhat.com Subject: [PATCH v2 2/6] tests/boot_linux_console: add BIOS acceptance test Date: Wed, 5 Feb 2020 14:56:01 +0000 Message-Id: <1580914565-19675-3-git-send-email-liam.merwick@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1580914565-19675-1-git-send-email-liam.merwick@oracle.com> References: <1580914565-19675-1-git-send-email-liam.merwick@oracle.com> X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9521 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=881 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1911140001 definitions=main-2002050118 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9521 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=935 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1911140001 definitions=main-2002050119 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 141.146.126.78 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: slp@redhat.com, qemu-devel@nongnu.org, wainersm@redhat.com, pbonzini@redhat.com, sgarzare@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Add a test to use qboot with the 'pc' machine class and SeaBIOS with the 'microvm' machine class (since microvm uses qboot by default) by adding the '-bios' option via self.vm.add_args() before calling do_test_x86_64_machine(). Signed-off-by: Liam Merwick Reviewed-by: Stefano Garzarella --- tests/acceptance/boot_linux_console.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot= _linux_console.py index 233601b429bd..e9375590bc1c 100644 --- a/tests/acceptance/boot_linux_console.py +++ b/tests/acceptance/boot_linux_console.py @@ -61,7 +61,6 @@ class BootLinuxConsole(Test): '/vmlinuz') kernel_hash =3D '23bebd2680757891cf7adedb033532163a792495' kernel_path =3D self.fetch_asset(kernel_url, asset_hash=3Dkernel_h= ash) - self.vm.set_console() kernel_command_line =3D self.KERNEL_COMMON_COMMAND_LINE + 'console= =3DttyS0' self.vm.add_args('-kernel', kernel_path, @@ -77,6 +76,14 @@ class BootLinuxConsole(Test): """ self.do_test_x86_64_machine() =20 + def test_x86_64_pc_qboot(self): + """ + :avocado: tags=3Darch:x86_64 + :avocado: tags=3Dmachine:pc + """ + self.vm.add_args('-bios', 'pc-bios/bios-microvm.bin') + self.do_test_x86_64_machine() + def test_x86_64_microvm(self): """ :avocado: tags=3Darch:x86_64 @@ -84,6 +91,14 @@ class BootLinuxConsole(Test): """ self.do_test_x86_64_machine() =20 + def test_x86_64_microvm_seabios(self): + """ + :avocado: tags=3Darch:x86_64 + :avocado: tags=3Dmachine:microvm + """ + self.vm.add_args('-bios', 'pc-bios/bios.bin') + self.do_test_x86_64_machine() + def test_mips_malta(self): """ :avocado: tags=3Darch:mips --=20 1.8.3.1 From nobody Sun Feb 8 10:03:39 2026 Delivered-To: importer@patchew.org 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; 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=oracle.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1580914665998892.3988390959809; Wed, 5 Feb 2020 06:57:45 -0800 (PST) Received: from localhost ([::1]:49052 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1izM7b-0007Dz-BS for importer@patchew.org; Wed, 05 Feb 2020 09:57:43 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:44524) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1izM6Y-0005h3-SX for qemu-devel@nongnu.org; Wed, 05 Feb 2020 09:56:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1izM6X-00054K-Dj for qemu-devel@nongnu.org; Wed, 05 Feb 2020 09:56:38 -0500 Received: from aserp2120.oracle.com ([141.146.126.78]:52830) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1izM6X-0004mr-5b for qemu-devel@nongnu.org; Wed, 05 Feb 2020 09:56:37 -0500 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id 015ErH9m164776; Wed, 5 Feb 2020 14:56:22 GMT Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by aserp2120.oracle.com with ESMTP id 2xykbp3h8u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 05 Feb 2020 14:56:22 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.27/8.16.0.27) with SMTP id 015ErUGA173208; Wed, 5 Feb 2020 14:56:21 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userp3030.oracle.com with ESMTP id 2xymuswyp8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 05 Feb 2020 14:56:21 +0000 Received: from abhmp0013.oracle.com (abhmp0013.oracle.com [141.146.116.19]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 015EuKxu031852; Wed, 5 Feb 2020 14:56:20 GMT Received: from ol7.uk.oracle.com (/10.175.206.136) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 05 Feb 2020 06:56:19 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references; s=corp-2019-08-05; bh=d+mE53yA6sxd7boFHFcdpnS9Vj2kugnjvOvA7GA5L7w=; b=NdL/+hpqNH8dNjbdSHQr3ydjfpEFuwkmLC2GTuD53lFOlKfw1OJKVLPS8In0wcqRe8DS BMRdmX7CWL/LWrPXC+N6wVUbHK8DccvqwU+uj5QuT0FIkuH7cgnWLbY+TwAm1vaPpnRM APWwlDT+/LlRQm96OsnDnDHbuoUNSWT3D78ruq4VOfAkytD2fJYANJSN2K2OYH+CV3g4 F5Cok+IM+k2Nx/Afw34Zt2wd2tomXz3buDQYU9B7MEA9rCnFfAHCbe1Jx6PlQ84q2Om7 v73P0HsTQfTsjByir+1tFkPShzQUFNzdygnb1nyUsk5QenXjKyXPEPqsuJ92kgH+ryu/ 7g== From: Liam Merwick To: alex.bennee@linaro.org, fam@euphon.net, philmd@redhat.com Subject: [PATCH v2 3/6] travis.yml: install rpm2cpio for acceptance tests Date: Wed, 5 Feb 2020 14:56:02 +0000 Message-Id: <1580914565-19675-4-git-send-email-liam.merwick@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1580914565-19675-1-git-send-email-liam.merwick@oracle.com> References: <1580914565-19675-1-git-send-email-liam.merwick@oracle.com> X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9521 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=862 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1911140001 definitions=main-2002050118 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9521 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=926 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1911140001 definitions=main-2002050118 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 141.146.126.78 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: slp@redhat.com, qemu-devel@nongnu.org, wainersm@redhat.com, pbonzini@redhat.com, sgarzare@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" The extract_from_rpm() method added for the PVH acceptance tests needs rpm2cpio to extract a vmlinux binary from an RPM. Signed-off-by: Liam Merwick Reviewed-by: Stefano Garzarella Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 3b35b7cf04d3..59773365823e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -323,6 +323,7 @@ matrix: - python3-pil - python3-pip - python3.5-venv + - rpm2cpio - tesseract-ocr - tesseract-ocr-eng =20 --=20 1.8.3.1 From nobody Sun Feb 8 10:03:39 2026 Delivered-To: importer@patchew.org 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; 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=oracle.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 15809148456441003.4741431183973; Wed, 5 Feb 2020 07:00:45 -0800 (PST) Received: from localhost ([::1]:49190 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1izMAU-0003yM-GA for importer@patchew.org; Wed, 05 Feb 2020 10:00:42 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:46718) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1izM8Y-0001QJ-2h for qemu-devel@nongnu.org; Wed, 05 Feb 2020 09:58:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1izM8W-0004qk-SH for qemu-devel@nongnu.org; Wed, 05 Feb 2020 09:58:41 -0500 Received: from userp2130.oracle.com ([156.151.31.86]:39556) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1izM8W-0004o7-Ip for qemu-devel@nongnu.org; Wed, 05 Feb 2020 09:58:40 -0500 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id 015EwE6x188776; Wed, 5 Feb 2020 14:58:24 GMT Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by userp2130.oracle.com with ESMTP id 2xykbp3hb7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 05 Feb 2020 14:58:24 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.27/8.16.0.27) with SMTP id 015ErRYv035693; Wed, 5 Feb 2020 14:56:23 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserp3030.oracle.com with ESMTP id 2xykbs1jja-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 05 Feb 2020 14:56:23 +0000 Received: from abhmp0013.oracle.com (abhmp0013.oracle.com [141.146.116.19]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 015EuMYZ017963; Wed, 5 Feb 2020 14:56:22 GMT Received: from ol7.uk.oracle.com (/10.175.206.136) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 05 Feb 2020 06:56:21 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=corp-2019-08-05; bh=jKD4F/i81ODMhCydEAUkfu0ajc611DYWcWzceMoBqjs=; b=n8cel0F5VTZhX3px/RMlkhKQNWt6t3xSGtUwsDtfWIsddz1T3XlQ+yC2Cuo/dpITrZSB +vWtgGXipSzgdROQ1ZePE2QJS7OHkHJ8dpBTDb5HGo6Np94cFW+nTgiX/HkTTO+bbkQM 8BZUOFgYRd3YWOWN3XVFHJd66OFCvSpbZUQ61HUT9u+is1hTYaN03S18Ppy6LMl4SKNn u+QFveQCAYPqtFgluVbjfPSsXga4+uTezhrlvthFVqdbeAkbv4M1V9M3a94hm9BXKhJ8 zAU7Q3yfxS4ftWUlZVW6wreYoH2NbQPhwFalfcnTbgd5bDc85cDLCTShyCmif+HvUs69 vA== From: Liam Merwick To: alex.bennee@linaro.org, fam@euphon.net, philmd@redhat.com Subject: [PATCH v2 4/6] tests/boot_linux_console: add extract_from_rpm method Date: Wed, 5 Feb 2020 14:56:03 +0000 Message-Id: <1580914565-19675-5-git-send-email-liam.merwick@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1580914565-19675-1-git-send-email-liam.merwick@oracle.com> References: <1580914565-19675-1-git-send-email-liam.merwick@oracle.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9521 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=940 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1911140001 definitions=main-2002050118 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9521 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1911140001 definitions=main-2002050119 Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by userp2130.oracle.com id 015EwE6x188776 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 156.151.31.86 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: slp@redhat.com, qemu-devel@nongnu.org, wainersm@redhat.com, pbonzini@redhat.com, sgarzare@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Add a method to extract a specified file from an RPM to the test's working directory and return the path to the extracted file. Signed-off-by: Liam Merwick Reviewed-by: Stefano Garzarella Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Philippe Mathieu-Daud=C3=A9 --- tests/acceptance/boot_linux_console.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot= _linux_console.py index e9375590bc1c..6a473363a122 100644 --- a/tests/acceptance/boot_linux_console.py +++ b/tests/acceptance/boot_linux_console.py @@ -51,6 +51,22 @@ class BootLinuxConsole(Test): os.chdir(cwd) return self.workdir + 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)) + def do_test_x86_64_machine(self): """ Common routine to boot an x86_64 guest. --=20 1.8.3.1 From nobody Sun Feb 8 10:03:39 2026 Delivered-To: importer@patchew.org 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; 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=oracle.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1580914668312411.26067769771146; Wed, 5 Feb 2020 06:57:48 -0800 (PST) Received: from localhost ([::1]:49060 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1izM7f-0007J9-3f for importer@patchew.org; Wed, 05 Feb 2020 09:57:47 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:44523) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1izM6Y-0005h2-To for qemu-devel@nongnu.org; Wed, 05 Feb 2020 09:56:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1izM6X-00053g-CK for qemu-devel@nongnu.org; Wed, 05 Feb 2020 09:56:38 -0500 Received: from aserp2120.oracle.com ([141.146.126.78]:52846) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1izM6X-0004n1-3v for qemu-devel@nongnu.org; Wed, 05 Feb 2020 09:56:37 -0500 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id 015ErLTi164936; Wed, 5 Feb 2020 14:56:27 GMT Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by aserp2120.oracle.com with ESMTP id 2xykbp3h93-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 05 Feb 2020 14:56:26 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.27/8.16.0.27) with SMTP id 015EsAvD158746; Wed, 5 Feb 2020 14:56:26 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userp3020.oracle.com with ESMTP id 2xykc31wqs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 05 Feb 2020 14:56:25 +0000 Received: from abhmp0013.oracle.com (abhmp0013.oracle.com [141.146.116.19]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 015EuOdm021980; Wed, 5 Feb 2020 14:56:24 GMT Received: from ol7.uk.oracle.com (/10.175.206.136) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 05 Feb 2020 06:56:23 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references; s=corp-2019-08-05; bh=lNpGPJsnVdcfQaHio7GgIkDxvJeaBi00glRdjay70+8=; b=YPrlwDFBLu/Jnyq3/y3jsCCBUpwGGJQlMjwMe+HKqtLx06yr2WxWMvX9Lhj6DUmeU8l1 jg+nWU0EGevxwOMpJzVF+/1Zvzzs5FCnaXqV/uITHVp2ABHbu1cpRa7qcqLdeizGMK+L Gqa5M5T4Wja9mKN9+3bgeo8GfI8B6JIRebrww9BC3uDl/UJ7lwDtQWXSsOVO/tPX15H3 E11m0ALHMor/F8lo+7w367DqQwNTutd9ABo22blLaO1UDXaqW05uZzjiaJh29db0pqb2 zPkivA1Ixzhojzlj1EkT6Bzo2BcTrzi0k0cxcfYZvO1lSvM8j/aWbAhaMqnTlJxyGg6R PA== From: Liam Merwick To: alex.bennee@linaro.org, fam@euphon.net, philmd@redhat.com Subject: [PATCH v2 5/6] tests/boot_linux_console: add PVH acceptance tests Date: Wed, 5 Feb 2020 14:56:04 +0000 Message-Id: <1580914565-19675-6-git-send-email-liam.merwick@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1580914565-19675-1-git-send-email-liam.merwick@oracle.com> References: <1580914565-19675-1-git-send-email-liam.merwick@oracle.com> X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9521 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1911140001 definitions=main-2002050118 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9521 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1911140001 definitions=main-2002050118 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 141.146.126.78 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: slp@redhat.com, qemu-devel@nongnu.org, wainersm@redhat.com, pbonzini@redhat.com, sgarzare@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Add tests to boot an uncompressed kernel using the x86/HVM direct boot ABI. The vmlinux binary is obtained from a small RPM for Kata containers and extracted using the new extract_from_rpm() method. Signed-off-by: Liam Merwick --- tests/acceptance/boot_linux_console.py | 60 ++++++++++++++++++++++++++++++= ---- 1 file changed, 53 insertions(+), 7 deletions(-) diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot= _linux_console.py index 6a473363a122..9c55218cb5bb 100644 --- a/tests/acceptance/boot_linux_console.py +++ b/tests/acceptance/boot_linux_console.py @@ -67,16 +67,40 @@ class BootLinuxConsole(Test): os.chdir(cwd) return os.path.normpath(os.path.join(self.workdir, path)) =20 - def do_test_x86_64_machine(self): + def do_test_x86_64_machine(self, kernel_type=3D'bzImage'): """ Common routine to boot an x86_64 guest. Caller must specify tags=3Darch and tags=3Dmachine - """ - kernel_url =3D ('https://archives.fedoraproject.org/pub/archive/fe= dora' - '/linux/releases/29/Everything/x86_64/os/images/pxeb= oot' - '/vmlinuz') - kernel_hash =3D '23bebd2680757891cf7adedb033532163a792495' - kernel_path =3D self.fetch_asset(kernel_url, asset_hash=3Dkernel_h= ash) + :param kernel: specify kernel type to be downloaded and booted: + compressed =3D 'bzImage', uncompressed =3D 'vmlinux' + """ + + KERNEL_PATH_INFO =3D { + 'bzImage': { + 'type': 'file', + 'url': 'https://archives.fedoraproject.org/' + 'pub/archive/fedora/linux/releases/29/Everything/' + 'x86_64/os/images/pxeboot/vmlinuz', + 'hash': '23bebd2680757891cf7adedb033532163a792495' + }, + 'vmlinux': { + 'type': 'rpm', + 'url': 'https://yum.oracle.com/' + 'repo/OracleLinux/OL7/olcne/x86_64/getPackage/' + 'kernel-uek-container-4.14.35-1902.6.6.1.el7.x86_64= .rpm', + 'file': './usr/share/kata-containers/' + 'vmlinux-4.14.35-1902.6.6.1.el7.container', + 'hash': '4c781711a9d32dcb8e81da2b397cb98926744e23' + } + } + + k =3D KERNEL_PATH_INFO[kernel_type] + if k['type'] is 'file': + kernel_path =3D self.fetch_asset(k['url'], asset_hash=3Dk['has= h']) + else: + assert k['type'] is 'rpm' + rpm_path =3D self.fetch_asset(k['url'], asset_hash=3Dk['hash']) + kernel_path =3D self.extract_from_rpm(rpm_path, k['file']) self.vm.set_console() kernel_command_line =3D self.KERNEL_COMMON_COMMAND_LINE + 'console= =3DttyS0' self.vm.add_args('-kernel', kernel_path, @@ -100,6 +124,21 @@ class BootLinuxConsole(Test): self.vm.add_args('-bios', 'pc-bios/bios-microvm.bin') self.do_test_x86_64_machine() =20 + def test_x86_64_pc_pvh(self): + """ + :avocado: tags=3Darch:x86_64 + :avocado: tags=3Dmachine:pc + """ + self.do_test_x86_64_machine(kernel_type=3D'vmlinux') + + def test_x86_64_pc_qboot_pvh(self): + """ + :avocado: tags=3Darch:x86_64 + :avocado: tags=3Dmachine:pc + """ + self.vm.add_args('-bios', 'pc-bios/bios-microvm.bin') + self.do_test_x86_64_machine(kernel_type=3D'vmlinux') + def test_x86_64_microvm(self): """ :avocado: tags=3Darch:x86_64 @@ -115,6 +154,13 @@ class BootLinuxConsole(Test): self.vm.add_args('-bios', 'pc-bios/bios.bin') self.do_test_x86_64_machine() =20 + def test_x86_64_microvm_pvh(self): + """ + :avocado: tags=3Darch:x86_64 + :avocado: tags=3Dmachine:microvm + """ + self.do_test_x86_64_machine(kernel_type=3D'vmlinux') + def test_mips_malta(self): """ :avocado: tags=3Darch:mips --=20 1.8.3.1 From nobody Sun Feb 8 10:03:39 2026 Delivered-To: importer@patchew.org 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; 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=oracle.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1580914667388542.5954578906395; Wed, 5 Feb 2020 06:57:47 -0800 (PST) Received: from localhost ([::1]:49056 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1izM7e-0007GN-79 for importer@patchew.org; Wed, 05 Feb 2020 09:57:46 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:44527) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1izM6Y-0005h7-TQ for qemu-devel@nongnu.org; Wed, 05 Feb 2020 09:56:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1izM6X-00057A-Sp for qemu-devel@nongnu.org; Wed, 05 Feb 2020 09:56:38 -0500 Received: from aserp2120.oracle.com ([141.146.126.78]:52862) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1izM6X-0004nC-Ja for qemu-devel@nongnu.org; Wed, 05 Feb 2020 09:56:37 -0500 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id 015ErMPV164944; Wed, 5 Feb 2020 14:56:28 GMT Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by aserp2120.oracle.com with ESMTP id 2xykbp3h99-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 05 Feb 2020 14:56:28 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.27/8.16.0.27) with SMTP id 015EsCEX158884; Wed, 5 Feb 2020 14:56:27 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userp3020.oracle.com with ESMTP id 2xykc31wtm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 05 Feb 2020 14:56:27 +0000 Received: from abhmp0013.oracle.com (abhmp0013.oracle.com [141.146.116.19]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 015EuQeI029164; Wed, 5 Feb 2020 14:56:26 GMT Received: from ol7.uk.oracle.com (/10.175.206.136) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 05 Feb 2020 06:56:25 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references; s=corp-2019-08-05; bh=944UcjO2I/pv72T/OAJrlXdTeg/JyrAktvdNeSTEef4=; b=CwoTmWI7SVEAmwTikutoZHcx2ZZJOkYiqwjRuxHr0ZX7BNzwvZNkOUFbP6Pg4/1gMtm8 025FKLEuK0MsQx/5Tm5PCMJ6aZBBMHr9fJmAgW+6sCuS7Ai29WhINel+oIhE1HBwB2ve uagcPz9MZgmQUkQAk+ABMgdCOSU2iyQBobNvhfp2NeuOVMeShHxF/6u/HjmP/QivG5GJ mBNdYbFmkWszw2mdfEI5ndzNQ1Xb/ed9sxJuu9g/zosvz/SuqKRT/0VFoFs2hb7utLxr Eokj6+1L8itkasXIsr8q6GH9MsMP0CS2GCVQlL8TA8rA8q2bexbvPiN7QUetZ5ihk7/2 bw== From: Liam Merwick To: alex.bennee@linaro.org, fam@euphon.net, philmd@redhat.com Subject: [PATCH v2 6/6] tests/boot_linux_console: use os.path for filesystem paths Date: Wed, 5 Feb 2020 14:56:05 +0000 Message-Id: <1580914565-19675-7-git-send-email-liam.merwick@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1580914565-19675-1-git-send-email-liam.merwick@oracle.com> References: <1580914565-19675-1-git-send-email-liam.merwick@oracle.com> X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9521 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=618 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1911140001 definitions=main-2002050118 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9521 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=688 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1911140001 definitions=main-2002050118 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 141.146.126.78 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: slp@redhat.com, qemu-devel@nongnu.org, wainersm@redhat.com, pbonzini@redhat.com, sgarzare@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Change extract_from_deb() to use os.path routines to manipulate the filesystem path returned when extracting a file. Suggested-by: Wainer dos Santos Moschetta Signed-off-by: Liam Merwick Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Philippe Mathieu-Daud=C3=A9 --- tests/acceptance/boot_linux_console.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot= _linux_console.py index 9c55218cb5bb..434608f12027 100644 --- a/tests/acceptance/boot_linux_console.py +++ b/tests/acceptance/boot_linux_console.py @@ -49,7 +49,12 @@ class BootLinuxConsole(Test): process.run("ar x %s %s" % (deb, file_path)) archive.extract(file_path, self.workdir) os.chdir(cwd) - return self.workdir + path + # 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. + return os.path.normpath(os.path.join(self.workdir, + os.path.relpath(path, '/'))) =20 def extract_from_rpm(self, rpm, path): """ --=20 1.8.3.1