From nobody Sun May 12 02:32:05 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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 ARC-Seal: i=1; a=rsa-sha256; t=1682051074; cv=none; d=zohomail.com; s=zohoarc; b=Ix3p5Tz9EbyIZ0G1kngvMDow79l14AF5562l+Tac1aiXvU71G1NmsBL2GcLE/WfH0z8b0XY8vvDjrODaDDpGnBYCj0rM8s6VUB14o8USKoeGwrk/Sj8jcvmtYAe2sPFn75GLIGXtP5v2dwcfRw4B4Ct1PN2FT+I7bpXXrLP5ki0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1682051074; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=KJMqn+5yO3LTptPCK2oI9MzWS5haxj9WxfinY5oruUM=; b=kLyMxSea7mp9f+zeKzrsm1W2FQIVjyfC2svHXVW3Ad8GG0mbW6z9DLjudzx4WRIvvixEACej8QXkC+CEtYBZFtvy4Ne9k9jBcOU694uKEDA9+po+3SVVGZ/HN3m1msnlK5aPM8Eoh3PyjWv5du0roTsHl7oBZOzJ3vX25UQMT1g= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1682051074624946.9469056013561; Thu, 20 Apr 2023 21:24:34 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ppiJI-0007Fd-L7; Fri, 21 Apr 2023 00:23:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ppiJB-0007Ei-3u for qemu-devel@nongnu.org; Fri, 21 Apr 2023 00:23:45 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ppiJ8-0007eC-Fh for qemu-devel@nongnu.org; Fri, 21 Apr 2023 00:23:40 -0400 Received: from pps.filterd (m0353727.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 33L4JHow030731; Fri, 21 Apr 2023 04:23:36 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3q3kbvg22e-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 21 Apr 2023 04:23:34 +0000 Received: from m0353727.ppops.net (m0353727.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 33L4K9ov032197; Fri, 21 Apr 2023 04:23:33 GMT Received: from ppma06ams.nl.ibm.com (66.31.33a9.ip4.static.sl-reverse.com [169.51.49.102]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3q3kbvg21c-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 21 Apr 2023 04:23:33 +0000 Received: from pps.filterd (ppma06ams.nl.ibm.com [127.0.0.1]) by ppma06ams.nl.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 33KLakKU002549; Fri, 21 Apr 2023 04:23:30 GMT Received: from smtprelay02.fra02v.mail.ibm.com ([9.218.2.226]) by ppma06ams.nl.ibm.com (PPS) with ESMTPS id 3pyk6fkswt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 21 Apr 2023 04:23:30 +0000 Received: from smtpav06.fra02v.mail.ibm.com (smtpav06.fra02v.mail.ibm.com [10.20.54.105]) by smtprelay02.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 33L4NSoP25494182 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 21 Apr 2023 04:23:28 GMT Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E269120049; Fri, 21 Apr 2023 04:23:27 +0000 (GMT) Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8932520040; Fri, 21 Apr 2023 04:23:26 +0000 (GMT) Received: from melvil.aus.stglabs.ibm.com (unknown [9.40.193.168]) by smtpav06.fra02v.mail.ibm.com (Postfix) with ESMTP; Fri, 21 Apr 2023 04:23:26 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=KJMqn+5yO3LTptPCK2oI9MzWS5haxj9WxfinY5oruUM=; b=ZRmyrTV8w40lo3FBq7zyWC/sdllyi/0BsBEi/L96Go/N+kN7UzVxYG+DIVKPEuhDZbK6 y6bm3XTMpGm6WrQ81Sr4UNC3+3CAc01wwI72DMAfjCLw3ovunLZWI4AHWp7a45/RtpUG iJLz1kcqipcRFmMVjlQrKTHL5MZNScnkMyWSLvsELbO+9VFZOxtw1CVQ3aLiUBnkopEk ITpJAqWiWssNr6uVJlWzXrv5481l42LBTpSLQAWCjn4zcX73wrlUSDsx+yGg8bEN96+5 N+WQ3IcsJx5SplRl2ipNWIIwcvkdArelwFbdPVi9Owu/xQVynM7XLzJaz0nyxijW2z96 Pw== From: Kautuk Consul To: =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Thomas Huth , Wainer dos Santos Moschetta , Beraldo Leal , Cleber Rosa Cc: qemu-devel@nongnu.org, Kautuk Consul Subject: [PATCH v4 1/2] avocado_qemu/__init__.py: factor out the qemu-img finding Date: Thu, 20 Apr 2023 23:23:21 -0500 Message-Id: <20230421042322.684093-2-kconsul@linux.vnet.ibm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230421042322.684093-1-kconsul@linux.vnet.ibm.com> References: <20230421042322.684093-1-kconsul@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Proofpoint-GUID: ctWAo-QES3eYoSwJrCidEnP1eCFldYjV X-Proofpoint-ORIG-GUID: SaDNBxkT9viRrvPX9-QnZj-y67x27Whe X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-04-20_17,2023-04-20_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 spamscore=0 adultscore=0 clxscore=1015 suspectscore=0 lowpriorityscore=0 mlxlogscore=999 mlxscore=0 bulkscore=0 impostorscore=0 priorityscore=1501 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303200000 definitions=main-2304210033 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: none client-ip=148.163.156.1; envelope-from=kconsul@linux.vnet.ibm.com; helo=mx0a-001b2d01.pphosted.com X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @ibm.com) X-ZM-MESSAGEID: 1682051076634100003 Content-Type: text/plain; charset="utf-8" Factor out the code that finds the qemu-img binary in the QemuSystemTest class and create a new get_qemu_img() function with it. This function will get called also from the new code in tuxrun_baselines.py avocado test-case. Signed-off-by: Kautuk Consul Reviewed-by: Harsh Prateek Bora Reviewed-by: Philippe Mathieu-Daud=C3=A9 Suggested-by: Thomas Huth --- tests/avocado/avocado_qemu/__init__.py | 27 +++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/tests/avocado/avocado_qemu/__init__.py b/tests/avocado/avocado= _qemu/__init__.py index cb71f50db9..d8f390e27a 100644 --- a/tests/avocado/avocado_qemu/__init__.py +++ b/tests/avocado/avocado_qemu/__init__.py @@ -330,6 +330,19 @@ def _new_vm(self, name, *args): vm.add_args(*args) return vm =20 + def get_qemu_img(self): + self.log.debug('Looking for and selecting a qemu-img binary') + + # If qemu-img has been built, use it, otherwise the system wide one + # will be used. + qemu_img =3D os.path.join(BUILD_DIR, 'qemu-img') + if not os.path.exists(qemu_img): + qemu_img =3D find_command('qemu-img', False) + if qemu_img is False: + self.cancel('Could not find "qemu-img"') + + return qemu_img + @property def vm(self): return self.get_vm(name=3D'default') @@ -594,17 +607,9 @@ def set_up_existing_ssh_keys(self): return (ssh_public_key, ssh_private_key) =20 def download_boot(self): - self.log.debug('Looking for and selecting a qemu-img binary to be ' - 'used to create the bootable snapshot image') - # If qemu-img has been built, use it, otherwise the system wide one - # will be used. If none is available, the test will cancel. - qemu_img =3D os.path.join(BUILD_DIR, 'qemu-img') - if not os.path.exists(qemu_img): - qemu_img =3D find_command('qemu-img', False) - if qemu_img is False: - self.cancel('Could not find "qemu-img", which is required to ' - 'create the bootable image') - vmimage.QEMU_IMG =3D qemu_img + # Set the qemu-img binary. + # If none is available, the test will cancel. + vmimage.QEMU_IMG =3D super().get_qemu_img() =20 self.log.info('Downloading/preparing boot image') # Fedora 31 only provides ppc64le images --=20 2.25.1 From nobody Sun May 12 02:32:05 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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 ARC-Seal: i=1; a=rsa-sha256; t=1682051056; cv=none; d=zohomail.com; s=zohoarc; b=jiY89Ki6NLf4ANT90WGBAuJe2BASntEu6KwFFJ1fJgHj5nGaewELk+fMWdfDSJl50ZXy0ZQFK0y104JZ+Tv2UHKSjYoSi43Wgpdm6WTVdVYCGjMoG/NRnJoM+oBwBLpao9XLm95kon5txWUIKm8jYJS5+DFT4HmNpCwDnoIiubw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1682051056; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=5OYWc/Tam7TwcuMWauC0rQGebd5tW+h0VDsytIBrjsw=; b=PB6sNDfzMr03BaWhdLng/khFW6SNIcMw6HRJiju23ioC4PRvWUiT4zVFBsrHxFtyZII5TKWptULMJn9jTiG8wDCW69qJCcIX1oAS6zZtdtuxtYyhIqtZXeF6iJgY9TfRCr5mFp4o2lJtPFn63lsDsIyQ2b6YPirmVUzP8x9/zIk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1682051056899432.34061058998634; Thu, 20 Apr 2023 21:24:16 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ppiJF-0007Ej-Tp; Fri, 21 Apr 2023 00:23:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ppiJ9-0007EZ-UO for qemu-devel@nongnu.org; Fri, 21 Apr 2023 00:23:40 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ppiJ7-0007eA-TT for qemu-devel@nongnu.org; Fri, 21 Apr 2023 00:23:39 -0400 Received: from pps.filterd (m0353726.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 33L4CJJ4025226; Fri, 21 Apr 2023 04:23:35 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3q3k8kgab9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 21 Apr 2023 04:23:35 +0000 Received: from m0353726.ppops.net (m0353726.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 33L4FrYr005726; Fri, 21 Apr 2023 04:23:34 GMT Received: from ppma06ams.nl.ibm.com (66.31.33a9.ip4.static.sl-reverse.com [169.51.49.102]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3q3k8kgaak-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 21 Apr 2023 04:23:34 +0000 Received: from pps.filterd (ppma06ams.nl.ibm.com [127.0.0.1]) by ppma06ams.nl.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 33KJYWsA002052; Fri, 21 Apr 2023 04:23:32 GMT Received: from smtprelay05.fra02v.mail.ibm.com ([9.218.2.225]) by ppma06ams.nl.ibm.com (PPS) with ESMTPS id 3pyk6fkswu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 21 Apr 2023 04:23:31 +0000 Received: from smtpav06.fra02v.mail.ibm.com (smtpav06.fra02v.mail.ibm.com [10.20.54.105]) by smtprelay05.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 33L4NTkj25625116 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 21 Apr 2023 04:23:29 GMT Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 90B0520043; Fri, 21 Apr 2023 04:23:29 +0000 (GMT) Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3015220040; Fri, 21 Apr 2023 04:23:28 +0000 (GMT) Received: from melvil.aus.stglabs.ibm.com (unknown [9.40.193.168]) by smtpav06.fra02v.mail.ibm.com (Postfix) with ESMTP; Fri, 21 Apr 2023 04:23:28 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-type : content-transfer-encoding : mime-version; s=pp1; bh=5OYWc/Tam7TwcuMWauC0rQGebd5tW+h0VDsytIBrjsw=; b=MiSXhylQruGu65VEZBxsDYa7L1YAdlFrdGCTIu4IESDq7E334xpDDWM9nzU9ZBaCw8kv EKmEOiEMUSvmqgY4vZRpjGfFxwVgh+fAhMiXlytKd1tdpBU1Fyf9SWT8WseHUqZUVPyY 5dHvid2OlamYKcl2KQAwUHJ4kWBjqv4TWJX9Pr3dZ4A52tC8KAMqcjn7xWW/gWv5SgTj OSIQArK9m35X/tfKE2NeqW3qxv20iHW92qcGsjguh2stSlfG/stMjgsQ0hRDqKsZqZCy k1FTM6cyXH7m655lF/dtNFFIs3cPGefhkiuMxkGWJkDUviNK69gLkAbq5QjwXmwnstBz hw== From: Kautuk Consul To: =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Thomas Huth , Wainer dos Santos Moschetta , Beraldo Leal , Cleber Rosa Cc: qemu-devel@nongnu.org, Kautuk Consul Subject: [PATCH v4 2/2] tests/avocado/tuxrun_baselines.py: improve code coverage for ppc64 Date: Thu, 20 Apr 2023 23:23:22 -0500 Message-Id: <20230421042322.684093-3-kconsul@linux.vnet.ibm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230421042322.684093-1-kconsul@linux.vnet.ibm.com> References: <20230421042322.684093-1-kconsul@linux.vnet.ibm.com> Content-Type: text/plain; charset="utf-8" X-TM-AS-GCONF: 00 X-Proofpoint-GUID: b7aIHhM-g871zUwN0qTqKnPOB7g-nVj0 X-Proofpoint-ORIG-GUID: oSgr7PUDh3X36fyd0C1NSFBNgqcEhPSI Content-Transfer-Encoding: quoted-printable X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-04-20_17,2023-04-20_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 mlxscore=0 malwarescore=0 phishscore=0 suspectscore=0 impostorscore=0 priorityscore=1501 lowpriorityscore=0 mlxlogscore=999 adultscore=0 bulkscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303200000 definitions=main-2304210033 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: none client-ip=148.163.156.1; envelope-from=kconsul@linux.vnet.ibm.com; helo=mx0a-001b2d01.pphosted.com X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @ibm.com) X-ZM-MESSAGEID: 1682051058582100003 Commit c0c8687ef0fd990db8db1655a8a6c5a5e35dd4bb disabled the boot_linux.py test-case due to which the code coverage for ppc decreased by around 2%. As per the discussion on https://lore.kernel.org/qemu-devel/87sfdpqcy4.fsf@linaro.org/ it was mentioned that the baseline test for ppc64 could be modified to make up this 2% code coverage. This patch attempts to achieve this 2% code coverage by adding various device command line arguments (to ./qemu-system-ppc64) in the tuxrun_baselines.py test-case. The code coverage report with boot_linux.py, without it and finally with these tuxrun_baselines.py changes is as follows: With boot_linux.py Reported-by: Alex Benn=C3=A9e Reviewed-by: Harsh Prateek Bora Reviewed-by: Philippe Mathieu-Daud=C3=A9 ------------------ lines......: 13.8% (58006 of 420997 lines) functions..: 20.7% (7675 of 36993 functions) branches...: 9.2% (22146 of 240611 branches) Without boot_linux.py (without this patch changes) -------------------------------------------------- lines......: 11.9% (50174 of 420997 lines) functions..: 18.8% (6947 of 36993 functions) branches...: 7.4% (17580 of 239017 branches) Without boot_linux.py (with this patch changes) ----------------------------------------------- lines......: 13.8% (58287 of 420997 lines) functions..: 20.7% (7640 of 36993 functions) branches...: 8.4% (20223 of 240611 branches) Signed-off-by: Kautuk Consul Reported-by: Alex Benn=C3=A9e --- tests/avocado/tuxrun_baselines.py | 68 +++++++++++++++++++++++++++++-- 1 file changed, 64 insertions(+), 4 deletions(-) diff --git a/tests/avocado/tuxrun_baselines.py b/tests/avocado/tuxrun_basel= ines.py index d343376faa..546abd9396 100644 --- a/tests/avocado/tuxrun_baselines.py +++ b/tests/avocado/tuxrun_baselines.py @@ -11,6 +11,7 @@ =20 import os import time +import tempfile =20 from avocado import skip, skipIf from avocado_qemu import QemuSystemTest @@ -72,6 +73,8 @@ def setUp(self): # Occasionally we need extra devices to hook things up self.extradev =3D self.get_tag('extradev') =20 + self.qemu_img =3D super().get_qemu_img() + def wait_for_console_pattern(self, success_message, vm=3DNone): wait_for_console_pattern(self, success_message, failure_message=3D'Kernel panic - not syn= cing', @@ -164,6 +167,63 @@ def common_tuxrun(self, dt=3DNone, self.vm.launch() self.run_tuxtest_tests(haltmsg) =20 + def ppc64_common_tuxrun(self, prefix): + # add device args to command line. + self.vm.add_args('-netdev', 'user,id=3Dvnet,hostfwd=3D:127.0.0.1:0= -:22', + '-device', 'virtio-net,netdev=3Dvnet') + self.vm.add_args('-netdev', '{"type":"user","id":"hostnet0"}', + '-device', '{"driver":"virtio-net-pci","netdev":' + '"hostnet0","id":"net0","mac":"52:54:00:4c:e3:86"= ,' + '"bus":"pci.0","addr":"0x9"}') + self.vm.add_args('-device', '{"driver":"qemu-xhci","p2":15,"p3":15= ,' + '"id":"usb","bus":"pci.0","addr":"0x2"}') + self.vm.add_args('-device', '{"driver":"virtio-scsi-pci","id":"scs= i0"' + ',"bus":"pci.0","addr":"0x3"}') + self.vm.add_args('-device', '{"driver":"virtio-serial-pci","id":' + '"virtio-serial0","bus":"pci.0","addr":"0x4"}') + self.vm.add_args('-device', '{"driver":"scsi-cd","bus":"scsi0.0"' + ',"channel":0,"scsi-id":0,"lun":0,"device_id":' + '"drive-scsi0-0-0-0","id":"scsi0-0-0-0"}') + self.vm.add_args('-device', '{"driver":"virtio-balloon-pci",' + '"id":"balloon0","bus":"pci.0","addr":"0x6"}') + self.vm.add_args('-audiodev', '{"id":"audio1","driver":"none"}') + self.vm.add_args('-device', '{"driver":"usb-tablet","id":"input0"' + ',"bus":"usb.0","port":"1"}') + self.vm.add_args('-device', '{"driver":"usb-kbd","id":"input1"' + ',"bus":"usb.0","port":"2"}') + self.vm.add_args('-device', '{"driver":"VGA","id":"video0",' + '"vgamem_mb":16,"bus":"pci.0","addr":"0x7"}') + self.vm.add_args('-object', '{"qom-type":"rng-random","id":"objrng= 0"' + ',"filename":"/dev/urandom"}', + '-device', '{"driver":"virtio-rng-pci","rng":"obj= rng0"' + ',"id":"rng0","bus":"pci.0","addr":"0x8"}') + self.vm.add_args('-object', '{"qom-type":"cryptodev-backend-builti= n",' + '"id":"objcrypto0","queues":1}', + '-device', '{"driver":"virtio-crypto-pci",' + '"cryptodev":"objcrypto0","id":"crypto0","bus"' + ':"pci.0","addr":"0xa"}') + self.vm.add_args('-device', '{"driver":"spapr-pci-host-bridge"' + ',"index":1,"id":"pci.1"}') + self.vm.add_args('-device', '{"driver":"spapr-vscsi","id":"scsi1"' + ',"reg":12288}') + self.vm.add_args('-m', '2G,slots=3D32,maxmem=3D4G', + '-object', 'memory-backend-ram,id=3Dram1,size=3D1= G', + '-device', 'pc-dimm,id=3Ddimm1,memdev=3Dram1') + + # Create a temporary qcow2 and launch the test-case + with tempfile.NamedTemporaryFile(prefix=3Dprefix, + suffix=3D'.qcow2') as qcow2: + process.run(self.qemu_img + ' create -f qcow2 ' + + qcow2.name + ' 1G') + + self.vm.add_args('-drive', 'file=3D' + qcow2.name + + ',format=3Dqcow2,if=3Dnone,id=3D' + 'drive-virtio-disk1', + '-device', 'virtio-blk-pci,scsi=3Doff,bus=3Dpci.0= ,' + 'addr=3D0xb,drive=3Ddrive-virtio-disk1,id=3Dvirti= o-disk1' + ',bootindex=3D2') + self.common_tuxrun(drive=3D"scsi-hd") + # # The tests themselves. The configuration is derived from how # tuxrun invokes qemu (with minor tweaks like using -blockdev @@ -308,7 +368,7 @@ def test_ppc64(self): """ :avocado: tags=3Darch:ppc64 :avocado: tags=3Dmachine:pseries - :avocado: tags=3Dcpu:POWER8 + :avocado: tags=3Dcpu:POWER10 :avocado: tags=3Dendian:big :avocado: tags=3Dconsole:hvc0 :avocado: tags=3Dtuxboot:ppc64 @@ -316,20 +376,20 @@ def test_ppc64(self): :avocado: tags=3Dextradev:driver=3Dspapr-vscsi :avocado: tags=3Droot:sda """ - self.common_tuxrun(drive=3D"scsi-hd") + self.ppc64_common_tuxrun(prefix=3D'tuxrun_ppc64_') =20 def test_ppc64le(self): """ :avocado: tags=3Darch:ppc64 :avocado: tags=3Dmachine:pseries - :avocado: tags=3Dcpu:POWER8 + :avocado: tags=3Dcpu:POWER10 :avocado: tags=3Dconsole:hvc0 :avocado: tags=3Dtuxboot:ppc64le :avocado: tags=3Dimage:vmlinux :avocado: tags=3Dextradev:driver=3Dspapr-vscsi :avocado: tags=3Droot:sda """ - self.common_tuxrun(drive=3D"scsi-hd") + self.ppc64_common_tuxrun(prefix=3D'tuxrun_ppc64le_') =20 def test_riscv32(self): """ --=20 2.25.1