From patchwork Wed Feb 5 14:56:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Liam Merwick X-Patchwork-Id: 11366443 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5A32C13A4 for ; Wed, 5 Feb 2020 14:59:13 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 31D69217F4 for ; Wed, 5 Feb 2020 14:59:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="ejwJBeJ0" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 31D69217F4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oracle.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:49148 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1izM92-0002Oz-Bl for patchwork-qemu-devel@patchwork.kernel.org; Wed, 05 Feb 2020 09:59:12 -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 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== 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 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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" Refactor test_x86_64_pc() to test_x86_64_machine() so that separate functions which specify the Avocado tag of ':avocado: tags=machine:' 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é Tested-by: Philippe Mathieu-Daudé --- 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 - def test_x86_64_pc(self): + def do_test_x86_64_machine(self): """ - :avocado: tags=arch:x86_64 - :avocado: tags=machine:pc + Common routine to boot an x86_64 guest. + Caller must specify tags=arch and tags=machine """ kernel_url = ('https://archives.fedoraproject.org/pub/archive/fedora' '/linux/releases/29/Everything/x86_64/os/images/pxeboot' @@ -70,6 +70,20 @@ class BootLinuxConsole(Test): console_pattern = 'Kernel command line: %s' % kernel_command_line self.wait_for_console_pattern(console_pattern) + def test_x86_64_pc(self): + """ + :avocado: tags=arch:x86_64 + :avocado: tags=machine:pc + """ + self.do_test_x86_64_machine() + + def test_x86_64_microvm(self): + """ + :avocado: tags=arch:x86_64 + :avocado: tags=machine:microvm + """ + self.do_test_x86_64_machine() + def test_mips_malta(self): """ :avocado: tags=arch:mips From patchwork Wed Feb 5 14:56:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liam Merwick X-Patchwork-Id: 11366441 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 90A5414D5 for ; Wed, 5 Feb 2020 14:59:03 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 681C0217BA for ; Wed, 5 Feb 2020 14:59:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="P39Gtlsj" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 681C0217BA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oracle.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:49132 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1izM8s-000299-Kh for patchwork-qemu-devel@patchwork.kernel.org; Wed, 05 Feb 2020 09:59:02 -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 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== 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 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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" 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 = '23bebd2680757891cf7adedb033532163a792495' kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash) - self.vm.set_console() kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE + 'console=ttyS0' self.vm.add_args('-kernel', kernel_path, @@ -77,6 +76,14 @@ class BootLinuxConsole(Test): """ self.do_test_x86_64_machine() + def test_x86_64_pc_qboot(self): + """ + :avocado: tags=arch:x86_64 + :avocado: tags=machine: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=arch:x86_64 @@ -84,6 +91,14 @@ class BootLinuxConsole(Test): """ self.do_test_x86_64_machine() + def test_x86_64_microvm_seabios(self): + """ + :avocado: tags=arch:x86_64 + :avocado: tags=machine:microvm + """ + self.vm.add_args('-bios', 'pc-bios/bios.bin') + self.do_test_x86_64_machine() + def test_mips_malta(self): """ :avocado: tags=arch:mips From patchwork Wed Feb 5 14:56:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Liam Merwick X-Patchwork-Id: 11366433 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 44B16186E for ; Wed, 5 Feb 2020 14:57:25 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CEC4321741 for ; Wed, 5 Feb 2020 14:57:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="NdL/+hpq" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CEC4321741 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oracle.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:49052 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1izM7H-0007Dz-Mj for patchwork-qemu-devel@patchwork.kernel.org; Wed, 05 Feb 2020 09:57:23 -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 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== 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 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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" 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é --- .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 From patchwork Wed Feb 5 14:56:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Liam Merwick X-Patchwork-Id: 11366447 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0AFB4112B for ; Wed, 5 Feb 2020 15:00:16 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D606921741 for ; Wed, 5 Feb 2020 15:00:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="n8cel0F5" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D606921741 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oracle.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:49190 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1izMA3-0003yM-1O for patchwork-qemu-devel@patchwork.kernel.org; Wed, 05 Feb 2020 10:00:15 -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 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== 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 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 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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" 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é Tested-by: Philippe Mathieu-Daudé --- 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 + 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 extracted + needs to be a relative path (starting with './') because + cpio(1), which is used to extract the file, expects that. + :returns: path of the extracted file + """ + cwd = os.getcwd() + os.chdir(self.workdir) + process.run("rpm2cpio %s | cpio -id %s" % (rpm, path), shell=True) + 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. From patchwork Wed Feb 5 14:56:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liam Merwick X-Patchwork-Id: 11366437 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 99C95186E for ; Wed, 5 Feb 2020 14:57:26 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 711B121741 for ; Wed, 5 Feb 2020 14:57:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="YPrlwDFB" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 711B121741 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oracle.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:49060 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1izM7J-0007J9-IB for patchwork-qemu-devel@patchwork.kernel.org; Wed, 05 Feb 2020 09:57:25 -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 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== 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 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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" 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)) - def do_test_x86_64_machine(self): + def do_test_x86_64_machine(self, kernel_type='bzImage'): """ Common routine to boot an x86_64 guest. Caller must specify tags=arch and tags=machine - """ - kernel_url = ('https://archives.fedoraproject.org/pub/archive/fedora' - '/linux/releases/29/Everything/x86_64/os/images/pxeboot' - '/vmlinuz') - kernel_hash = '23bebd2680757891cf7adedb033532163a792495' - kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash) + :param kernel: specify kernel type to be downloaded and booted: + compressed = 'bzImage', uncompressed = 'vmlinux' + """ + + KERNEL_PATH_INFO = { + '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 = KERNEL_PATH_INFO[kernel_type] + if k['type'] is 'file': + kernel_path = self.fetch_asset(k['url'], asset_hash=k['hash']) + else: + assert k['type'] is 'rpm' + rpm_path = self.fetch_asset(k['url'], asset_hash=k['hash']) + kernel_path = self.extract_from_rpm(rpm_path, k['file']) self.vm.set_console() kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE + 'console=ttyS0' 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() + def test_x86_64_pc_pvh(self): + """ + :avocado: tags=arch:x86_64 + :avocado: tags=machine:pc + """ + self.do_test_x86_64_machine(kernel_type='vmlinux') + + def test_x86_64_pc_qboot_pvh(self): + """ + :avocado: tags=arch:x86_64 + :avocado: tags=machine:pc + """ + self.vm.add_args('-bios', 'pc-bios/bios-microvm.bin') + self.do_test_x86_64_machine(kernel_type='vmlinux') + def test_x86_64_microvm(self): """ :avocado: tags=arch:x86_64 @@ -115,6 +154,13 @@ class BootLinuxConsole(Test): self.vm.add_args('-bios', 'pc-bios/bios.bin') self.do_test_x86_64_machine() + def test_x86_64_microvm_pvh(self): + """ + :avocado: tags=arch:x86_64 + :avocado: tags=machine:microvm + """ + self.do_test_x86_64_machine(kernel_type='vmlinux') + def test_mips_malta(self): """ :avocado: tags=arch:mips From patchwork Wed Feb 5 14:56:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Liam Merwick X-Patchwork-Id: 11366435 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AAC4314E3 for ; Wed, 5 Feb 2020 14:57:25 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8224121741 for ; Wed, 5 Feb 2020 14:57:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="CwoTmWI7" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8224121741 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oracle.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:49056 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1izM7I-0007GN-Lg for patchwork-qemu-devel@patchwork.kernel.org; Wed, 05 Feb 2020 09:57:24 -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 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== 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 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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" 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é Tested-by: Philippe Mathieu-Daudé --- 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 part. + return os.path.normpath(os.path.join(self.workdir, + os.path.relpath(path, '/'))) def extract_from_rpm(self, rpm, path): """