From nobody Sun Nov 16 09:18:41 2025 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; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1741348565; cv=none; d=zohomail.com; s=zohoarc; b=BNSrQueCruGUC+IPO/i172P73ltarz03MxgXqfdJ3U7X4LmHMRVt2c4c7OFCAjTXvnIVHn2rlb4xtqF8DKYV/cBWLNYCk23Y3oP0/TPM4TQIq00iHylWmlu6Zrktwxltlhb51RS1dVKZ6p7xc+j5wr5dpTZ+LT8U+Uz4Ma8EvjU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741348565; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=vMXYg46E1/EKnELVNv+IsZFJNwROo+euEPEQdc5q1+M=; b=HJ5TvSYS2i5r8hoxPeIZbAYJmoXLR7uv/Rs5mG94sfSKBMk+ASctxSwUph6AW3tUAszhnt7wIhm7fWlibJkMNapUZHAzuBE3wAwxPgklUMwylRe3OdouLQj3QuqdPsemcG4lEAYOIZAJlD+zejzMwfd9tfE5dNJcRKHTYJc3pnk= 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741348565069329.8522233777187; Fri, 7 Mar 2025 03:56:05 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tqWGm-0002Jq-F6; Fri, 07 Mar 2025 06:53:36 -0500 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 1tqWGf-0002Im-Eq for qemu-devel@nongnu.org; Fri, 07 Mar 2025 06:53:29 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tqWGc-0000Hm-UE for qemu-devel@nongnu.org; Fri, 07 Mar 2025 06:53:29 -0500 Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-620-rpJTABDjOTmo2DS93rYPhQ-1; Fri, 07 Mar 2025 06:53:22 -0500 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id AF25B19560B3; Fri, 7 Mar 2025 11:53:21 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.44.32.60]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 5A77C1944E45; Fri, 7 Mar 2025 11:53:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1741348406; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vMXYg46E1/EKnELVNv+IsZFJNwROo+euEPEQdc5q1+M=; b=c1fKdsmuvneyhqTgn2cVft/QaqiINOhaEQb9LAMdViRTtWur2fydG+Z2MPhTy0SMX3svxW WcljG/db9Jc9laRyc1T5wVTmO0jhyxp/mcXbPckDIUyIn+cAd3FhMcQRctpJkNaNPthVpc bRcTGlbd0RPk7SucTjFCgTxzBMPcMqQ= X-MC-Unique: rpJTABDjOTmo2DS93rYPhQ-1 X-Mimecast-MFC-AGG-ID: rpJTABDjOTmo2DS93rYPhQ_1741348401 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Richard Henderson Subject: [PULL 01/15] tests/functional: remove unused 'bin_prefix' variable Date: Fri, 7 Mar 2025 12:53:00 +0100 Message-ID: <20250307115314.1096373-2-thuth@redhat.com> In-Reply-To: <20250307115314.1096373-1-thuth@redhat.com> References: <20250307115314.1096373-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.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 @redhat.com) X-ZM-MESSAGEID: 1741348566456019100 From: Daniel P. Berrang=C3=A9 This was copied over from avocado but has not been used in the new functional tests. Reviewed-by: Thomas Huth Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Richard Henderson Message-ID: <20250228102738.3064045-2-berrange@redhat.com> Signed-off-by: Thomas Huth --- tests/functional/qemu_test/testcase.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/functional/qemu_test/testcase.py b/tests/functional/qemu= _test/testcase.py index 869f3949fe9..9d5611c4d7f 100644 --- a/tests/functional/qemu_test/testcase.py +++ b/tests/functional/qemu_test/testcase.py @@ -192,7 +192,7 @@ def assets_available(self): return False return True =20 - def setUp(self, bin_prefix): + def setUp(self): self.assertIsNotNone(self.qemu_bin, 'QEMU_TEST_QEMU_BINARY must be= set') self.arch =3D self.qemu_bin.split('-')[-1] self.socketdir =3D None @@ -254,7 +254,7 @@ def main(): class QemuUserTest(QemuBaseTest): =20 def setUp(self): - super().setUp('qemu-') + super().setUp() self._ldpath =3D [] =20 def add_ldpath(self, ldpath): @@ -277,7 +277,7 @@ class QemuSystemTest(QemuBaseTest): def setUp(self): self._vms =3D {} =20 - super().setUp('qemu-system-') + super().setUp() =20 console_log =3D logging.getLogger('console') console_log.setLevel(logging.DEBUG) --=20 2.48.1 From nobody Sun Nov 16 09:18:41 2025 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; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1741348531; cv=none; d=zohomail.com; s=zohoarc; b=EBkw/BdJpTp1c0yqReehaBCYQX+vR2wDs/s6GOgycz1JQMIV9l1INzT6UzRtdBFQO+qiPyVnktaAe4Ge4yokLJ5rsoiD6uOlPBv8xMbFgeQv8MFHieOGuvYkRB6P+3s+uZyXdbojFwDiVNLL9Fto+mI0o8scCwtNDJ3KfBdry50= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741348531; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=MfhLHfgKPr/FwlLhvjlnugv1UxVPm/hPYhqF6xil7OY=; b=UdQwRYrKmSUtq3I9jfPUcMaGAKV4rQL9r+NfoUBjhsEipkv4Eoj9QjkW9fm5ik1G9CwUfxXpO3xW/mWHpaVBiPgCERpQzjs2Utd0KBiXqxfYskGMtzZU4bkm9UFBWoE+bYf7kg6PGPRennAktU8AECgE6iNmQJVvBKFqMgMqQn4= 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741348531344969.2508147562794; Fri, 7 Mar 2025 03:55:31 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tqWGo-0002Kf-FY; Fri, 07 Mar 2025 06:53:38 -0500 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 1tqWGl-0002Jk-Ts for qemu-devel@nongnu.org; Fri, 07 Mar 2025 06:53:36 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tqWGg-0000IJ-NL for qemu-devel@nongnu.org; Fri, 07 Mar 2025 06:53:35 -0500 Received: from mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-86-tjL5iULGOhmwDoIzDT0zIg-1; Fri, 07 Mar 2025 06:53:26 -0500 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id AB6A91956048; Fri, 7 Mar 2025 11:53:25 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.44.32.60]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 213F11944F2E; Fri, 7 Mar 2025 11:53:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1741348409; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MfhLHfgKPr/FwlLhvjlnugv1UxVPm/hPYhqF6xil7OY=; b=CyucGqpd9VxXsuLX3Hj9lRNGQRAPITDXPQcpTQ0CzUkyVnl48bIYeC0k5wNcwVH/jYucno puejda410ZjuLOd/LLdEf4lWPZllcwaEMhcXdUusGnJBifE2Wh/j+8zkVgzW7y+WyEacz7 BXsti6Cmr5A8e1MbCAbojp/ZXe7QhjM= X-MC-Unique: tjL5iULGOhmwDoIzDT0zIg-1 X-Mimecast-MFC-AGG-ID: tjL5iULGOhmwDoIzDT0zIg_1741348405 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Richard Henderson Subject: [PULL 02/15] tests/functional: set 'qemu_bin' as an object level field Date: Fri, 7 Mar 2025 12:53:01 +0100 Message-ID: <20250307115314.1096373-3-thuth@redhat.com> In-Reply-To: <20250307115314.1096373-1-thuth@redhat.com> References: <20250307115314.1096373-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.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 @redhat.com) X-ZM-MESSAGEID: 1741348533187019000 From: Daniel P. Berrang=C3=A9 The 'qemu_bin' field is currently set on the class, despite being accessed as if it were an object instance field with 'self.qemu_bin'. This is no obvious need to have it as a class field, so move it into the object instance. Reviewed-by: Thomas Huth Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Richard Henderson Message-ID: <20250228102738.3064045-3-berrange@redhat.com> Signed-off-by: Thomas Huth --- docs/devel/testing/functional.rst | 2 +- tests/functional/qemu_test/testcase.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/devel/testing/functional.rst b/docs/devel/testing/functio= nal.rst index ecc738922b7..bcb5509512e 100644 --- a/docs/devel/testing/functional.rst +++ b/docs/devel/testing/functional.rst @@ -173,7 +173,7 @@ QEMU binary selection ^^^^^^^^^^^^^^^^^^^^^ =20 The QEMU binary used for the ``self.vm`` QEMUMachine instance will -primarily depend on the value of the ``qemu_bin`` class attribute. +primarily depend on the value of the ``qemu_bin`` instance attribute. If it is not explicitly set by the test code, its default value will be the result the QEMU_TEST_QEMU_BINARY environment variable. =20 diff --git a/tests/functional/qemu_test/testcase.py b/tests/functional/qemu= _test/testcase.py index 9d5611c4d7f..058bf270eca 100644 --- a/tests/functional/qemu_test/testcase.py +++ b/tests/functional/qemu_test/testcase.py @@ -33,7 +33,6 @@ =20 class QemuBaseTest(unittest.TestCase): =20 - qemu_bin =3D os.getenv('QEMU_TEST_QEMU_BINARY') arch =3D None =20 workdir =3D None @@ -193,6 +192,7 @@ def assets_available(self): return True =20 def setUp(self): + self.qemu_bin =3D os.getenv('QEMU_TEST_QEMU_BINARY') self.assertIsNotNone(self.qemu_bin, 'QEMU_TEST_QEMU_BINARY must be= set') self.arch =3D self.qemu_bin.split('-')[-1] self.socketdir =3D None --=20 2.48.1 From nobody Sun Nov 16 09:18:41 2025 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; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1741348453; cv=none; d=zohomail.com; s=zohoarc; b=A4Cp5wLff7gMlKItumJ5lEXjnFq3RywZH9jFMmCKzB1xOlFadu7ZV8Vn3XwWys72ZyA9BsL5TKQGNGZZNgOn1VHl3tTsvpMjHyN1Cb1mAmOdbzIzwYWvHxwRmBqMkyvK0qAszjsr1myw7QC8TrI5jefwX93jRFOdugrUnCaQouE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741348453; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=Ejp1ZFIkd5EIz6blSxhMLbiNuuiZYj+Bxa1o9Ig30bo=; b=DQ/CV3OW6kZyFe8P98BKmeyvCbxVTMgS/qhb9Z3FPfpbPHcdBmvinecP97BFC7a/7PpazlWCBTRTfQk930MpKmvSA9c6fVMV0yCgWXIgpQ1VhfP0W4nCYBYG6c9PQf2pryTqbmsCXdur7TP+nJNvgYUDaw85Us5cBtFR6Jjg610= 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741348453832339.9092513892342; Fri, 7 Mar 2025 03:54:13 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tqWGn-0002K4-TD; Fri, 07 Mar 2025 06:53:37 -0500 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 1tqWGl-0002Jf-Jx for qemu-devel@nongnu.org; Fri, 07 Mar 2025 06:53:35 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tqWGj-0000Ii-Hi for qemu-devel@nongnu.org; Fri, 07 Mar 2025 06:53:34 -0500 Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-615-sD_uyH57NSCzK6Okz27Mjg-1; Fri, 07 Mar 2025 06:53:29 -0500 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 5B0D21956083; Fri, 7 Mar 2025 11:53:28 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.44.32.60]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 497621944F2E; Fri, 7 Mar 2025 11:53:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1741348412; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Ejp1ZFIkd5EIz6blSxhMLbiNuuiZYj+Bxa1o9Ig30bo=; b=A4LDiN0oqKAbCFVhD4GPyqQDC9zsPj2XddFTFezRm8HexRwpiKHxHf4fXeb3SdXJLCf0b2 YTueUV177n5W2nxmwvHizkyOCkAEO9HcMagnduO26NsgipvcOcn2GKaqIUdlQPp/SxehGU ItxCXhAnLVvunTtMHSDpyqv+rbQqaLY= X-MC-Unique: sD_uyH57NSCzK6Okz27Mjg-1 X-Mimecast-MFC-AGG-ID: sD_uyH57NSCzK6Okz27Mjg_1741348408 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Richard Henderson Subject: [PULL 03/15] tests/functional: reduce tuxrun maxmem to work on 32-bit hosts Date: Fri, 7 Mar 2025 12:53:02 +0100 Message-ID: <20250307115314.1096373-4-thuth@redhat.com> In-Reply-To: <20250307115314.1096373-1-thuth@redhat.com> References: <20250307115314.1096373-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.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 @redhat.com) X-ZM-MESSAGEID: 1741348455720019000 From: Daniel P. Berrang=C3=A9 maxmem=3D4G is too large to address on 32-bit hosts, so reduce it to 2G since the tuxrun tests don't actually need such an elevated memory limit. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Thomas Huth Reviewed-by: Richard Henderson Message-ID: <20250228102738.3064045-5-berrange@redhat.com> Signed-off-by: Thomas Huth --- tests/functional/test_ppc64_tuxrun.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/functional/test_ppc64_tuxrun.py b/tests/functional/test_= ppc64_tuxrun.py index 05c6162b5e2..e8f79c676e5 100755 --- a/tests/functional/test_ppc64_tuxrun.py +++ b/tests/functional/test_ppc64_tuxrun.py @@ -64,7 +64,7 @@ def ppc64_common_tuxrun(self, kernel_asset, rootfs_asset,= prefix): ',"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', + self.vm.add_args('-m', '1G,slots=3D32,maxmem=3D2G', '-object', 'memory-backend-ram,id=3Dram1,size=3D1= G', '-device', 'pc-dimm,id=3Ddimm1,memdev=3Dram1') =20 --=20 2.48.1 From nobody Sun Nov 16 09:18:41 2025 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; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1741348481; cv=none; d=zohomail.com; s=zohoarc; b=W6pKthzJrnFadXXXh2DPRe0ldgeVpxOXPc+P3sIqrAaRRN/zTeM0ePcBEspL3/WFLEeC4C9ExV+I9wQT6hV/VTGMtNiaW3jFhRqGpNUpj5ChEZVBe0KCisJlhISt+QBU2P0ZrPl4qFVh1IvzkB15oRvz7Vp3ZrxaP5myqHrrie0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741348481; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=sFIj52HEqL4CVM8+Q2FkoJyupOGXw0vbWu8bUIBllpY=; b=anOA+x0ymDn/TiOOqUNnq4l3aR29dKZvG9seLU2W3BvPSwoB7wsfq2cZrow+w5UhWnejzsZ1qvFgEK1ZoDNCY+TflHtZVmaBGLIx5WUJu39FIxhi+n09DO7MIIDWHyjOwwHlBc4/F10aUiyMD/TCrXVFOmGws4yszUR3C3lk7m0= 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 17413484813121012.509356130378; Fri, 7 Mar 2025 03:54:41 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tqWGp-0002Kp-JO; Fri, 07 Mar 2025 06:53:39 -0500 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 1tqWGm-0002Jx-VX for qemu-devel@nongnu.org; Fri, 07 Mar 2025 06:53:37 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tqWGk-0000Is-8Y for qemu-devel@nongnu.org; Fri, 07 Mar 2025 06:53:36 -0500 Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-679-txTOqhDqOU2AragtrFlNfg-1; Fri, 07 Mar 2025 06:53:31 -0500 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 73E1B1800EC5 for ; Fri, 7 Mar 2025 11:53:30 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.44.32.60]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id DBDE71944F2E; Fri, 7 Mar 2025 11:53:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1741348413; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sFIj52HEqL4CVM8+Q2FkoJyupOGXw0vbWu8bUIBllpY=; b=bUNCKlZEOLnYlUhvkNziQRIWaqSDNP7OMPAIc3GAOkGXeN3ubUQ+Xok7/al9uvgeqDfMDM tjZIvobm0Tv5BNAc4rU0Tbk2pk74At2QB6qjJB7jQhhHZ1rZjqh4CGr90UddZTUyICv7cp vhOPhMnHMbKI8sMzUEI2TL712AZZBGg= X-MC-Unique: txTOqhDqOU2AragtrFlNfg-1 X-Mimecast-MFC-AGG-ID: txTOqhDqOU2AragtrFlNfg_1741348410 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PULL 04/15] tests/functional: skip memaddr tests on 32-bit builds Date: Fri, 7 Mar 2025 12:53:03 +0100 Message-ID: <20250307115314.1096373-5-thuth@redhat.com> In-Reply-To: <20250307115314.1096373-1-thuth@redhat.com> References: <20250307115314.1096373-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.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 @redhat.com) X-ZM-MESSAGEID: 1741348484037019000 From: Daniel P. Berrang=C3=A9 If the QEMU binary was built for a 32-bit ELF target we cannot run the memory address space tests as they all require ability to address more RAM that can be represented on 32-bit. We can't use a decorator to skip the tests as we need setUp() to run to pick the QEMU binary, thus we must call a method at the start of each test to check and skip it. The functional result is effectively the same as using a decorator, just less pretty. This code will go away when 32-bit hosts are full dropped from QEMU. The code allows any non-ELF target since all macOS versions supported at 64-bit only and we already dropped support for 32-bit Windows. Signed-off-by: Daniel P. Berrang=C3=A9 Message-ID: <20250228102738.3064045-6-berrange@redhat.com> [thuth: Add missing byteorder=3D'little' to from_bytes()] Signed-off-by: Thomas Huth --- tests/functional/test_mem_addr_space.py | 34 +++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/tests/functional/test_mem_addr_space.py b/tests/functional/tes= t_mem_addr_space.py index bb0cf062ca7..2d9d31efb59 100755 --- a/tests/functional/test_mem_addr_space.py +++ b/tests/functional/test_mem_addr_space.py @@ -20,6 +20,25 @@ class MemAddrCheck(QemuSystemTest): # this reason. DELAY_Q35_BOOT_SEQUENCE =3D 1 =20 + # This helper can go away when the 32-bit host deprecation + # turns into full & final removal of support. + def ensure_64bit_binary(self): + with open(self.qemu_bin, "rb") as fh: + ident =3D fh.read(4) + + # "\x7fELF" + if ident !=3D bytes([0x7f, 0x45, 0x4C, 0x46]): + # Non-ELF file implies macOS or Windows which + # we already assume to be 64-bit only + return + + # bits =3D=3D 1 -> 32-bit; bits =3D=3D 2 -> 64-bit + bits =3D int.from_bytes(fh.read(1), byteorder=3D'little') + if bits !=3D 2: + # 32-bit ELF builds won't be able to address sufficient + # RAM to run the tests + self.skipTest("64-bit build host is required") + # first, lets test some 32-bit processors. # for all 32-bit cases, pci64_hole_size is 0. def test_phybits_low_pse36(self): @@ -38,6 +57,7 @@ def test_phybits_low_pse36(self): If maxmem is set to 59.5G with all other QEMU parameters identical= , QEMU should start fine. """ + self.ensure_64bit_binary() self.vm.add_args('-S', '-machine', 'q35', '-m', '512,slots=3D1,maxmem=3D59.6G', '-cpu', 'pentium,pse36=3Don', '-display', 'none', @@ -55,6 +75,7 @@ def test_phybits_low_pae(self): access up to a maximum of 64GiB of memory. Rest is the same as the= case with pse36 above. """ + self.ensure_64bit_binary() self.vm.add_args('-S', '-machine', 'q35', '-m', '512,slots=3D1,maxmem=3D59.6G', '-cpu', 'pentium,pae=3Don', '-display', 'none', @@ -71,6 +92,7 @@ def test_phybits_ok_pentium_pse36(self): Setting maxmem to 59.5G and making sure that QEMU can start with t= he same options as the failing case above with pse36 cpu feature. """ + self.ensure_64bit_binary() self.vm.add_args('-machine', 'q35', '-m', '512,slots=3D1,maxmem=3D59.5G', '-cpu', 'pentium,pse36=3Don', '-display', 'none', @@ -88,6 +110,7 @@ def test_phybits_ok_pentium_pae(self): Setting maxmem to 59.5G and making sure that QEMU can start fine with the same options as the case above. """ + self.ensure_64bit_binary() self.vm.add_args('-machine', 'q35', '-m', '512,slots=3D1,maxmem=3D59.5G', '-cpu', 'pentium,pae=3Don', '-display', 'none', @@ -104,6 +127,7 @@ def test_phybits_ok_pentium2(self): Pentium2 has 36 bits of addressing, so its same as pentium with pse36 ON. """ + self.ensure_64bit_binary() self.vm.add_args('-machine', 'q35', '-m', '512,slots=3D1,maxmem=3D59.5G', '-cpu', 'pentium2', '-display', 'none', @@ -123,6 +147,7 @@ def test_phybits_low_nonpse36(self): message because the region for memory hotplug is always placed above 4 GiB due to the PCI hole and simplicity. """ + self.ensure_64bit_binary() self.vm.add_args('-S', '-machine', 'q35', '-m', '512,slots=3D1,maxmem=3D4G', '-cpu', 'pentium', '-display', 'none', @@ -150,6 +175,7 @@ def test_phybits_low_tcg_q35_70_amd(self): which is equal to 987.5 GiB. Setting the value to 988 GiB should make QEMU fail with the error message. """ + self.ensure_64bit_binary() self.vm.add_args('-S', '-machine', 'pc-q35-7.0', '-m', '512,slots=3D1,maxmem=3D988G', '-display', 'none', @@ -170,6 +196,7 @@ def test_phybits_low_tcg_q35_71_amd(self): Make sure QEMU fails when maxmem size is 976 GiB (12 GiB less than 988 GiB). """ + self.ensure_64bit_binary() self.vm.add_args('-S', '-machine', 'pc-q35-7.1', '-m', '512,slots=3D1,maxmem=3D976G', '-display', 'none', @@ -186,6 +213,7 @@ def test_phybits_ok_tcg_q35_70_amd(self): Same as q35-7.0 AMD case except that here we check that QEMU can successfully start when maxmem is < 988G. """ + self.ensure_64bit_binary() self.vm.add_args('-S', '-machine', 'pc-q35-7.0', '-m', '512,slots=3D1,maxmem=3D987.5G', '-display', 'none', @@ -202,6 +230,7 @@ def test_phybits_ok_tcg_q35_71_amd(self): Same as q35-7.1 AMD case except that here we check that QEMU can successfully start when maxmem is < 976G. """ + self.ensure_64bit_binary() self.vm.add_args('-S', '-machine', 'pc-q35-7.1', '-m', '512,slots=3D1,maxmem=3D975.5G', '-display', 'none', @@ -219,6 +248,7 @@ def test_phybits_ok_tcg_q35_71_intel(self): Intel cpu instead. QEMU should start fine in this case as "above_4G" memory starts at 4G. """ + self.ensure_64bit_binary() self.vm.add_args('-S', '-cpu', 'Skylake-Server', '-machine', 'pc-q35-7.1', '-m', '512,slots=3D1,maxmem=3D976G', @@ -243,6 +273,7 @@ def test_phybits_low_tcg_q35_71_amd_41bits(self): memory for the VM (1024 - 32 - 1 + 0.5). With 992 GiB, QEMU should fail to start. """ + self.ensure_64bit_binary() self.vm.add_args('-S', '-cpu', 'EPYC-v4,phys-bits=3D41', '-machine', 'pc-q35-7.1', '-m', '512,slots=3D1,maxmem=3D992G', @@ -261,6 +292,7 @@ def test_phybits_ok_tcg_q35_71_amd_41bits(self): Same as above but by setting maxram between 976 GiB and 992 Gib, QEMU should start fine. """ + self.ensure_64bit_binary() self.vm.add_args('-S', '-cpu', 'EPYC-v4,phys-bits=3D41', '-machine', 'pc-q35-7.1', '-m', '512,slots=3D1,maxmem=3D990G', @@ -281,6 +313,7 @@ def test_phybits_low_tcg_q35_intel_cxl(self): So maxmem here should be at most 986 GiB considering all memory bo= undary alignment constraints with 40 bits (1 TiB) of processor physical b= its. """ + self.ensure_64bit_binary() self.vm.add_args('-S', '-cpu', 'Skylake-Server,phys-bits=3D40', '-machine', 'q35,cxl=3Don', '-m', '512,slots=3D1,maxmem=3D987G', @@ -299,6 +332,7 @@ def test_phybits_ok_tcg_q35_intel_cxl(self): with the exact same parameters as above, QEMU should start fine ev= en with cxl enabled. """ + self.ensure_64bit_binary() self.vm.add_args('-S', '-cpu', 'Skylake-Server,phys-bits=3D40', '-machine', 'q35,cxl=3Don', '-m', '512,slots=3D1,maxmem=3D987G', --=20 2.48.1 From nobody Sun Nov 16 09:18:41 2025 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; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1741348493; cv=none; d=zohomail.com; s=zohoarc; b=NfvRlk1T0lLHbllylMUXtX/XJsmKuPJRsHt1bkiFiRK6pOLl5twCxR66m0cNkUj6gxKj5P7+jvqOH90ztUztEKuwab4u1ggDos2t9XAmwjs8+5vO1iTAorm6M9GsQ3iMKUpUOc4LJN48JM6IloFfYWUv3hkQSQxXMvxUE2ZgiW4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741348493; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=LIAO22KFy9kDFijwrho+kmya6T4frgqQLKWLiJSbcGQ=; b=UUmqzYnZlopbMTGOrrt8m1y8S1O9Vz1B80NHn9aVJf0tiBdi7XFZ7Hvb08aIIaEW6G3mzqUjpT59sRq+iHk+Evpi4BSCC+sZUC+ZH22SbhSKVmU1aNvTK36EBT/d/FY1XZOxFI8bHcJhNCk+1i1ZXrFBEMmMraPWEGymVijq9oY= 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741348493022303.99311689958574; Fri, 7 Mar 2025 03:54:53 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tqWGq-0002Kr-EX; Fri, 07 Mar 2025 06:53:40 -0500 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 1tqWGo-0002K6-1l for qemu-devel@nongnu.org; Fri, 07 Mar 2025 06:53:38 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tqWGm-0000JA-7x for qemu-devel@nongnu.org; Fri, 07 Mar 2025 06:53:37 -0500 Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-694-J3L1GuEXN1ekNZb9s6n1CQ-1; Fri, 07 Mar 2025 06:53:33 -0500 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 0866C180AF52 for ; Fri, 7 Mar 2025 11:53:33 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.44.32.60]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 225DF1944F2E; Fri, 7 Mar 2025 11:53:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1741348415; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LIAO22KFy9kDFijwrho+kmya6T4frgqQLKWLiJSbcGQ=; b=G5HkhD0RM3syr7+yXNEpF+r1VDgKsXCYfwSc+uPpSArMJUbthUH2Bei4f2CB7M5jOFmEne 0gtCsaoApGvn0XJ7+2c3Y7Fj39j34BBopeQNRNyo+oY0kCcVuoxsBL6nc3G2Jvo6iqZaI4 yXRlxTVQZ4q2WIvD7w6Fx0IRc14Q1qo= X-MC-Unique: J3L1GuEXN1ekNZb9s6n1CQ-1 X-Mimecast-MFC-AGG-ID: J3L1GuEXN1ekNZb9s6n1CQ_1741348413 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PULL 05/15] tests/functional: drop unused 'get_tag' method Date: Fri, 7 Mar 2025 12:53:04 +0100 Message-ID: <20250307115314.1096373-6-thuth@redhat.com> In-Reply-To: <20250307115314.1096373-1-thuth@redhat.com> References: <20250307115314.1096373-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.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 @redhat.com) X-ZM-MESSAGEID: 1741348496160019100 From: Daniel P. Berrang=C3=A9 Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Thomas Huth Message-ID: <20250228102738.3064045-7-berrange@redhat.com> Signed-off-by: Thomas Huth --- tests/functional/qemu_test/tuxruntest.py | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/tests/functional/qemu_test/tuxruntest.py b/tests/functional/qe= mu_test/tuxruntest.py index 41a4945a14f..ad74156f9c5 100644 --- a/tests/functional/qemu_test/tuxruntest.py +++ b/tests/functional/qemu_test/tuxruntest.py @@ -24,17 +24,6 @@ class TuxRunBaselineTest(QemuSystemTest): # Tests are ~10-40s, allow for --debug/--enable-gcov overhead timeout =3D 100 =20 - def get_tag(self, tagname, default=3DNone): - """ - Get the metadata tag or return the default. - """ - utag =3D self._get_unique_tag_val(tagname) - print(f"{tagname}/{default} -> {utag}") - if utag: - return utag - - return default - def setUp(self): super().setUp() =20 --=20 2.48.1 From nobody Sun Nov 16 09:18:41 2025 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; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1741348556; cv=none; d=zohomail.com; s=zohoarc; b=FiMqtFTgxk4Pbn/gjik2Gny47R9bbqtz7wQzRyAbjdwglPsF37GXmpqrykniD1BGEI71sZXWiQvGFGFm5zikM0I37sH/RWoCB0lQh0AKZUyej2YkirNdhYflBvE3+v9zNka/E4Ot7hZI6rKsvBmgtN9cw5VA0lyyaKARhFqY2VU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741348556; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=6ODttkY/S+wdI4qfJM7IuKT40adwY7alCOmfckIuHiI=; b=QIeBV/zaPE2o73DIAB+xQKR86EuXXrqWQvvWSc+b8Iv3Os7A5OJSQ/bKDj3jTQvW31ktcYfeckv2p44Pxgn39E276SaorAwI+FN7FBLgaR+3dYz4rQRt2gvt5lcHiFArMNoC6rLW2G8s6z1LiZ4im2VPmyGotJkC+pzvqbf6f3Q= 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741348556410342.0863435127651; Fri, 7 Mar 2025 03:55:56 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tqWGs-0002La-E8; Fri, 07 Mar 2025 06:53:42 -0500 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 1tqWGq-0002Ks-EW for qemu-devel@nongnu.org; Fri, 07 Mar 2025 06:53:40 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tqWGo-0000Jw-Vc for qemu-devel@nongnu.org; Fri, 07 Mar 2025 06:53:40 -0500 Received: from mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-116-8mLW6mMAMs6zK0TWCchM8Q-1; Fri, 07 Mar 2025 06:53:37 -0500 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 3C0771956048 for ; Fri, 7 Mar 2025 11:53:36 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.44.32.60]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id B28231944F2E; Fri, 7 Mar 2025 11:53:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1741348418; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6ODttkY/S+wdI4qfJM7IuKT40adwY7alCOmfckIuHiI=; b=B2I17mIV3/KGGqh4svGebo4LzdFlZnwEVO5PDbi0wSdkbnUYK1JEcMkD682iN20cA+aMom nm5urOCIkYIDgm8CT52OSbpd+OoBIfcTbMvIMw7LRRC5uwSsYb64JjjrrS05IhfYPGNuvw wrPmDQgnD0CGpL0op+mET1swvKpg6Xc= X-MC-Unique: 8mLW6mMAMs6zK0TWCchM8Q-1 X-Mimecast-MFC-AGG-ID: 8mLW6mMAMs6zK0TWCchM8Q_1741348416 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PULL 06/15] tests/functional: stop output from zstd command when uncompressing Date: Fri, 7 Mar 2025 12:53:05 +0100 Message-ID: <20250307115314.1096373-7-thuth@redhat.com> In-Reply-To: <20250307115314.1096373-1-thuth@redhat.com> References: <20250307115314.1096373-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.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 @redhat.com) X-ZM-MESSAGEID: 1741348558268019100 From: Daniel P. Berrang=C3=A9 The zstd command will print incremental decompression progress to stderr when running. Fortunately it is not on stdout as that would confuse the TAP parsing, but we should still not have this printed. By switching from 'check_call' to 'run' with the check=3DTrue and capture_output=3DTrue we'll get the desired silence on success, and on failure the raised exception will automatically include stdout/stderr data for diagnosis purposes. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Thomas Huth Message-ID: <20250228102738.3064045-8-berrange@redhat.com> Signed-off-by: Thomas Huth --- tests/functional/qemu_test/uncompress.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/functional/qemu_test/uncompress.py b/tests/functional/qe= mu_test/uncompress.py index 76dcf223856..ce79da1b686 100644 --- a/tests/functional/qemu_test/uncompress.py +++ b/tests/functional/qemu_test/uncompress.py @@ -13,7 +13,7 @@ import stat import shutil from urllib.parse import urlparse -from subprocess import check_call, CalledProcessError +from subprocess import run, CalledProcessError, DEVNULL =20 from .asset import Asset =20 @@ -46,8 +46,8 @@ def zstd_uncompress(zstd_path, output_path): return =20 try: - check_call(['zstd', "-f", "-d", zstd_path, - "-o", output_path]) + run(['zstd', "-f", "-d", zstd_path, + "-o", output_path], capture_output=3DTrue, check=3DTrue) except CalledProcessError as e: os.remove(output_path) raise Exception( --=20 2.48.1 From nobody Sun Nov 16 09:18:41 2025 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; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1741348654; cv=none; d=zohomail.com; s=zohoarc; b=XY+KmmNjBA5hFYnXvjG/odLMiyrLv7K6Q6DXGFbd5JXQOWC5kjFwK9ci+mSJK4ynmizqwVEoJbvsrUo9QccdBbBbSQM8eTs0tdTIeM5p/F9jAGnpCEWqBnYGi9i3I7Javw6f7qRiemqDLIEYaXPezz9EeXa7+6LsV0CmzgfYou8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741348654; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=X/Gx09Fa5xKgnrPHQVMi3DB/WVQEZMM2n1MRlNhuThA=; b=SUUf/r8VQ0hd5rtCXOric4BhXOmCvjketNhxRp4NDjkTFOwkzeKuXr+s20tNJ1U4c9sbbISh4O400dnWM7dnyBJBH+Iuu2UZOyzn5bSGOrRzJJWt+Hpi5lSfeqzbIDwGG0raLK/V/bbZYs8zsp+pfaTY9uWLJJ5j+lSDs7Wl48o= 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741348654751372.2059718056511; Fri, 7 Mar 2025 03:57:34 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tqWH2-0002NM-6f; Fri, 07 Mar 2025 06:53:52 -0500 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 1tqWGz-0002Mu-IH for qemu-devel@nongnu.org; Fri, 07 Mar 2025 06:53:49 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tqWGx-0000Ks-V7 for qemu-devel@nongnu.org; Fri, 07 Mar 2025 06:53:49 -0500 Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-623-EtZJ8h8qPe6Wd2fXBR_Uww-1; Fri, 07 Mar 2025 06:53:43 -0500 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id D1ADD1800258 for ; Fri, 7 Mar 2025 11:53:38 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.44.32.60]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 44C441944E45; Fri, 7 Mar 2025 11:53:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1741348424; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=X/Gx09Fa5xKgnrPHQVMi3DB/WVQEZMM2n1MRlNhuThA=; b=RQKGeNUNrVGWdj3QTmehYVPpcJ/IymjIkaL5P52yaSQpt1SmOPY4JjAyztLy5GNibh2yZh yheTmc2+ypptQTA6rD3HDryoIX2lrHsUJbNv5JDKe/7942JCeStKriLKW37+HdE57cH8q9 o8lRu3o9am1Spq9F30lfCxtjHRIEzUs= X-MC-Unique: EtZJ8h8qPe6Wd2fXBR_Uww-1 X-Mimecast-MFC-AGG-ID: EtZJ8h8qPe6Wd2fXBR_Uww_1741348418 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi Subject: [PULL 07/15] tests/functional: Move the code for testing HTTP downloads to a common function Date: Fri, 7 Mar 2025 12:53:06 +0100 Message-ID: <20250307115314.1096373-8-thuth@redhat.com> In-Reply-To: <20250307115314.1096373-1-thuth@redhat.com> References: <20250307115314.1096373-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.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 @redhat.com) X-ZM-MESSAGEID: 1741348655943019000 Content-Type: text/plain; charset="utf-8" We are going to use this code in other tests, too, so let's move it to the qemu_test module to be able to re-use it more easily. Message-ID: <20250227103915.19795-2-thuth@redhat.com> Signed-off-by: Thomas Huth --- tests/functional/qemu_test/linuxkernel.py | 26 ++++++++++++++++++++++- tests/functional/test_intel_iommu.py | 22 +------------------ 2 files changed, 26 insertions(+), 22 deletions(-) diff --git a/tests/functional/qemu_test/linuxkernel.py b/tests/functional/q= emu_test/linuxkernel.py index 2c9598102d0..2aca0ee3cd0 100644 --- a/tests/functional/qemu_test/linuxkernel.py +++ b/tests/functional/qemu_test/linuxkernel.py @@ -3,8 +3,12 @@ # This work is licensed under the terms of the GNU GPL, version 2 or # later. See the COPYING file in the top-level directory. =20 +import hashlib +import urllib.request + +from .cmd import wait_for_console_pattern, exec_command_and_wait_for_patte= rn from .testcase import QemuSystemTest -from .cmd import wait_for_console_pattern +from .utils import get_usernet_hostfwd_port =20 =20 class LinuxKernelTest(QemuSystemTest): @@ -26,3 +30,23 @@ def launch_kernel(self, kernel, initrd=3DNone, dtb=3DNon= e, console_index=3D0, self.vm.launch() if wait_for: self.wait_for_console_pattern(wait_for) + + def check_http_download(self, filename, hashsum, guestport=3D8080, + pythoncmd=3D'python3 -m http.server'): + exec_command_and_wait_for_pattern(self, + f'{pythoncmd} {guestport} & sleep 1', + f'Serving HTTP on 0.0.0.0 port {guestport}') + hl =3D hashlib.sha256() + hostport =3D get_usernet_hostfwd_port(self.vm) + url =3D f'http://localhost:{hostport}{filename}' + self.log.info(f'Downloading {url} ...') + with urllib.request.urlopen(url) as response: + while True: + chunk =3D response.read(1 << 20) + if not chunk: + break + hl.update(chunk) + + digest =3D hl.hexdigest() + self.log.info(f'sha256sum of download is {digest}.') + self.assertEqual(digest, hashsum) diff --git a/tests/functional/test_intel_iommu.py b/tests/functional/test_i= ntel_iommu.py index a9e8f82ab59..62268d6f278 100755 --- a/tests/functional/test_intel_iommu.py +++ b/tests/functional/test_intel_iommu.py @@ -10,11 +10,7 @@ # This work is licensed under the terms of the GNU GPL, version 2 or # later. See the COPYING file in the top-level directory. =20 -import hashlib -import urllib.request - from qemu_test import LinuxKernelTest, Asset, exec_command_and_wait_for_pa= ttern -from qemu_test.utils import get_usernet_hostfwd_port =20 =20 class IntelIOMMU(LinuxKernelTest): @@ -125,23 +121,7 @@ def run_and_check(self): =20 # Check virtio-net via HTTP: exec_command_and_wait_for_pattern(self, 'dhclient eth0', prompt) - exec_command_and_wait_for_pattern(self, - f'python3 -m http.server {self.GUEST_PORT} & sleep= 1', - f'Serving HTTP on 0.0.0.0 port {self.GUEST_PORT}') - hl =3D hashlib.sha256() - hostport =3D get_usernet_hostfwd_port(self.vm) - url =3D f'http://localhost:{hostport}{filename}' - self.log.info(f'Downloading {url} ...') - with urllib.request.urlopen(url) as response: - while True: - chunk =3D response.read(1 << 20) - if not chunk: - break - hl.update(chunk) - - digest =3D hl.hexdigest() - self.log.info(f'sha256sum of download is {digest}.') - self.assertEqual(digest, hashsum) + self.check_http_download(filename, hashsum, self.GUEST_PORT) =20 def test_intel_iommu(self): self.common_vm_setup() --=20 2.48.1 From nobody Sun Nov 16 09:18:41 2025 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; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1741348487; cv=none; d=zohomail.com; s=zohoarc; b=Ti2i+E/Cf/KeTxX3oCfMOQHWwzkoqG/ZEZmHUTOn6NHL/d6nbRTc8rdy5qBNg+44VdPsGb4B6O0chJSS91G7SbSrvN9NxoSI2zRqg8JKXuLSg00GZGyaxunNqBeW/vVawsmM3COoWtBN3LMWTNPAkd/uYGQBZU469rmGOaZoVdI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741348487; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=6avlNywYqNBs21pMU25Gyd2Sd9eIGLD/4nwfd+flrBM=; b=SETfvkjB5eNEhpkFhQgZonBlqkmvitoeFtkrCYby/LR1y3+nfvfGqV75ZrcL+TJRxAMopNxzUZpx9SMevoeGdk4Nsg7Ak7ou6wtXsJ8QrLvHmx75NpvVfxbQqaHp3z1vgKgt2i28gIi1wEIN71pjYWiaA6oxH7n9YqWdbLa3vNo= 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741348487936687.4170229162219; Fri, 7 Mar 2025 03:54:47 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tqWGx-0002MK-E3; Fri, 07 Mar 2025 06:53:48 -0500 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 1tqWGv-0002M8-Gr for qemu-devel@nongnu.org; Fri, 07 Mar 2025 06:53:45 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tqWGt-0000Kb-Sx for qemu-devel@nongnu.org; Fri, 07 Mar 2025 06:53:45 -0500 Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-426-xFsjYEHhN7ipkKFRKnkMdg-1; Fri, 07 Mar 2025 06:53:41 -0500 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id DB1BD19560B8 for ; Fri, 7 Mar 2025 11:53:40 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.44.32.60]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 94A741944E45; Fri, 7 Mar 2025 11:53:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1741348423; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6avlNywYqNBs21pMU25Gyd2Sd9eIGLD/4nwfd+flrBM=; b=iS7qMS170EzHi+1HFWx7KJWkVGIEJP9jS5RuauhZt3DfM3YrnkizwRNA9X8i1T9z7K85LX y762uPcg0rVZ8+GxRYBh/9dHWFyvNmPDjRlowx97pSEJD5705n+Y4sGLRDXUFs4+2bHdRy aS17+oV9NBCYc1EZYJZELCaYsGM3IPI= X-MC-Unique: xFsjYEHhN7ipkKFRKnkMdg-1 X-Mimecast-MFC-AGG-ID: xFsjYEHhN7ipkKFRKnkMdg_1741348421 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi Subject: [PULL 08/15] tests/functional/test_mips_malta: Add a network test via the pcnet NIC Date: Fri, 7 Mar 2025 12:53:07 +0100 Message-ID: <20250307115314.1096373-9-thuth@redhat.com> In-Reply-To: <20250307115314.1096373-1-thuth@redhat.com> References: <20250307115314.1096373-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.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 @redhat.com) X-ZM-MESSAGEID: 1741348490195019100 Content-Type: text/plain; charset="utf-8" The kernel has a driver for the pcnet NIC included, and the initrd has a "tftp" command, so we can test a simple network transfer here, too. Message-ID: <20250227103915.19795-3-thuth@redhat.com> Signed-off-by: Thomas Huth --- tests/functional/test_mips_malta.py | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/tests/functional/test_mips_malta.py b/tests/functional/test_mi= ps_malta.py index eaf372255ba..9697c7d63f8 100755 --- a/tests/functional/test_mips_malta.py +++ b/tests/functional/test_mips_malta.py @@ -45,12 +45,15 @@ def test_mips_malta(self): 'dcfe3a7fe3200da3a00d176b95caaa086495eb158f2bff64afc67d7e1eb2cddc') =20 def test_mips_malta_cpio(self): + self.require_netdev('user') + self.set_machine('malta') + self.require_device('pcnet') + kernel_path =3D self.archive_extract( self.ASSET_KERNEL_4_5_0, member=3D'boot/vmlinux-4.5.0-2-4kc-malta') initrd_path =3D self.uncompress(self.ASSET_INITRD) =20 - self.set_machine('malta') self.vm.set_console() kernel_command_line =3D (self.KERNEL_COMMON_COMMAND_LINE + 'console=3DttyS0 console=3Dtty ' @@ -58,6 +61,8 @@ def test_mips_malta_cpio(self): self.vm.add_args('-kernel', kernel_path, '-initrd', initrd_path, '-append', kernel_command_line, + '-netdev', 'user,id=3Dn1,tftp=3D' + self.scratch_= file('boot'), + '-device', 'pcnet,netdev=3Dn1', '-no-reboot') self.vm.launch() self.wait_for_console_pattern('Boot successful.') @@ -66,6 +71,19 @@ def test_mips_malta_cpio(self): 'BogoMIPS') exec_command_and_wait_for_pattern(self, 'uname -a', 'Debian') + + exec_command_and_wait_for_pattern(self, 'ip link set eth0 up', + 'eth0: link up') + exec_command_and_wait_for_pattern(self, + 'ip addr add 10.0.2.15 dev eth0', + '#') + exec_command_and_wait_for_pattern(self, 'route add default eth0', = '#') + exec_command_and_wait_for_pattern(self, + 'tftp -g -r vmlinux-4.5.0-2-4kc-malta 10.0.2.2', = '#') + exec_command_and_wait_for_pattern(self, + 'md5sum vmlinux-4.5.0-2-4kc-malt= a', + 'a98218a7efbdefb2dfdf9ecd08c9831= 8') + exec_command_and_wait_for_pattern(self, 'reboot', 'reboot: Restarting system= ') # Wait for VM to shut down gracefully --=20 2.48.1 From nobody Sun Nov 16 09:18:41 2025 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; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1741348624; cv=none; d=zohomail.com; s=zohoarc; b=V3j/Op9eHFFuSB77mxhUd6xI/uNQ0QONcS+QeXVkN8MXybJJh5uEVcXjYp20xY6C9KQ3okOUPXJ8YnWVyLCLgq4ljVgnwtlqJmpULYV71+aludt8yWPgqTev9qNtEaV3ugcaoBKJe1Fdk96DLNyRVoH1uaVW2jMnJt7kGyJw2tY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741348624; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=VULVujJos844NR1dojjTrUoFW/kedQHxAt34zYV8+Ps=; b=AFDBSvL87lnNiPu4D8u5UbsMDFUc3+lxCHIDZWWZp9Nu12L/26Xi0F0wI8vmSrLV+E7BVy85xRzLE+4anh+BLw3hjxL9lXJ0lar+92rv6afyx3BI/EexSVyW6jOQ0AMTo4+cxuLITluJpjdbTcy8HwDfFcfj/XGgyUMpsLJ13VU= 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741348624414389.9618103376007; Fri, 7 Mar 2025 03:57:04 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tqWH0-0002NJ-Cv; Fri, 07 Mar 2025 06:53:50 -0500 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 1tqWGy-0002Mk-Nw for qemu-devel@nongnu.org; Fri, 07 Mar 2025 06:53:48 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tqWGx-0000LF-Bz for qemu-devel@nongnu.org; Fri, 07 Mar 2025 06:53:48 -0500 Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-53-LxVnEADiPPCKhJxlM-O1vA-1; Fri, 07 Mar 2025 06:53:44 -0500 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 7E47F1800260 for ; Fri, 7 Mar 2025 11:53:43 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.44.32.60]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id AAE141944F2E; Fri, 7 Mar 2025 11:53:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1741348426; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=VULVujJos844NR1dojjTrUoFW/kedQHxAt34zYV8+Ps=; b=WVq7vZhJY3ZOoDOJU8efAnSlnQgKgLb0Ehy5fQproXfZcNgUV3pmvuUzENpnKKftni1PCI wp9/ynCXPI4E/tFz8/pYqekHEy+oPXRim4826LcK1frJbmapxLOZ6MPx2OBxiAoje/o1K7 xMzlj4A4pLIUrlk/XPcmtaYwcraPcS4= X-MC-Unique: LxVnEADiPPCKhJxlM-O1vA-1 X-Mimecast-MFC-AGG-ID: LxVnEADiPPCKhJxlM-O1vA_1741348423 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PULL 09/15] tests/functional: Increase the timeout of the mips64el_replay test Date: Fri, 7 Mar 2025 12:53:08 +0100 Message-ID: <20250307115314.1096373-10-thuth@redhat.com> In-Reply-To: <20250307115314.1096373-1-thuth@redhat.com> References: <20250307115314.1096373-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.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 @redhat.com) X-ZM-MESSAGEID: 1741348626656019100 We run the gitlab-CI with the untrusted tests enabled, and the test_replay_mips64el_malta_5KEc_cpio subtest is rather slow, so this already hit the standard 90 seconds timeout in the CI. Increase the timeout for more headroom. Reported-by: Stefan Hajnoczi Message-ID: <20250305074353.52552-1-thuth@redhat.com> Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Stefan Hajnoczi Signed-off-by: Thomas Huth --- tests/functional/meson.build | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/functional/meson.build b/tests/functional/meson.build index 3fd2652c078..97c3f4ad4e9 100644 --- a/tests/functional/meson.build +++ b/tests/functional/meson.build @@ -36,6 +36,7 @@ test_timeouts =3D { 'intel_iommu': 300, 'mips_malta' : 120, 'mipsel_replay' : 480, + 'mips64el_replay' : 180, 'netdev_ethtool' : 180, 'ppc_40p' : 240, 'ppc64_hv' : 1000, --=20 2.48.1 From nobody Sun Nov 16 09:18:41 2025 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; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1741348562; cv=none; d=zohomail.com; s=zohoarc; b=K8PimktuJZ5JkIxS27n1AC5dSafsZ5WJKK4xpBJaIrLBK1ZILXs2Zh80Cy6UQD4M+GA9atl7zzVv461JY6qh2/XGAhREZegZaUpcXMDzW1nr77jwC2ZgB1O3Z3la30RLQ3rfy0XiLj8Wpx2Vm5uYSbesgjFZM5KzZ31k8JSmXHk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741348562; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=Cd6O1VZDeIT786/XOF02v5jigOV2z1r9juG1O4n0MAM=; b=l5XCczeA5nPP2Qa7uPIwR4dHy3i7MJxpWi+uBPdSsfM/pBN4kHQ3XNbUG2BISAP7CizwnIFN+YmdwU6JcSq2r1nw757A2oUdDLv6Iy5w627gKzODIHIn1+R7Dm0Z0ds66IsG+ugMBV3vmPAcqpYVC7eV+bazCRtlinCRKQATU0k= 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741348562467365.7920954214104; Fri, 7 Mar 2025 03:56:02 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tqWH5-0002Ny-Df; Fri, 07 Mar 2025 06:53:55 -0500 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 1tqWH4-0002Ni-1g for qemu-devel@nongnu.org; Fri, 07 Mar 2025 06:53:54 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tqWH2-0000Lb-FL for qemu-devel@nongnu.org; Fri, 07 Mar 2025 06:53:53 -0500 Received: from mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-169-_pdVH5ESOMSRMxsgZakQLw-1; Fri, 07 Mar 2025 06:53:47 -0500 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id BD9EA19560A1 for ; Fri, 7 Mar 2025 11:53:46 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.44.32.60]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 66C561944F2E; Fri, 7 Mar 2025 11:53:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1741348430; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Cd6O1VZDeIT786/XOF02v5jigOV2z1r9juG1O4n0MAM=; b=YYw31uqsWAEemIzRC/JuY509eLYUeLTDNYem6tMtfnuQqlE5ROz9aK2IeVlrvjJaNwZjAO S7jX4JvA+P2Io3jV2XDnfJCSxdvhZNtXuVHJfnknh7+WtCQUoA2U49sGz2Z4iMzX1FLK7J jvn++tyebc90cYCeTFrNkJAkBJQuCUI= X-MC-Unique: _pdVH5ESOMSRMxsgZakQLw-1 X-Mimecast-MFC-AGG-ID: _pdVH5ESOMSRMxsgZakQLw_1741348426 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , David Hildenbrand Subject: [PULL 10/15] tests/functional: fix race in virtio balloon test Date: Fri, 7 Mar 2025 12:53:09 +0100 Message-ID: <20250307115314.1096373-11-thuth@redhat.com> In-Reply-To: <20250307115314.1096373-1-thuth@redhat.com> References: <20250307115314.1096373-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.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 @redhat.com) X-ZM-MESSAGEID: 1741348563355019000 From: Daniel P. Berrang=C3=A9 There are two race conditions in the recently added virtio balloon test * The /dev/vda device node is not ready * The virtio-balloon driver has not issued the first stats refresh To fix the former, monitor dmesg for a line about 'vda'. To fix the latter, retry the stats query until seeing fresh data. Adding 'quiet' to the kernel command line reduces serial output which otherwise slows boot, making it less likely to hit the former race too. Signed-off-by: Daniel P. Berrang=C3=A9 Message-ID: <20250304183340.3749797-1-berrange@redhat.com> Reviewed-by: Thomas Huth Reviewed-by: David Hildenbrand [thuth: Break long line to avoid checkpatch error] Signed-off-by: Thomas Huth --- tests/functional/test_virtio_balloon.py | 26 ++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/tests/functional/test_virtio_balloon.py b/tests/functional/tes= t_virtio_balloon.py index 67b48e1b4e8..082bf08c4e8 100755 --- a/tests/functional/test_virtio_balloon.py +++ b/tests/functional/test_virtio_balloon.py @@ -32,7 +32,7 @@ class VirtioBalloonx86(QemuSystemTest): 'e3c1b309d9203604922d6e255c2c5d098a309c2d46215d8fc026954f3c5c27a0') =20 DEFAULT_KERNEL_PARAMS =3D ('root=3D/dev/vda1 console=3DttyS0 net.ifnam= es=3D0 ' - 'rd.rescue') + 'rd.rescue quiet') =20 def wait_for_console_pattern(self, success_message, vm=3DNone): wait_for_console_pattern( @@ -47,6 +47,11 @@ def mount_root(self): prompt =3D '# ' self.wait_for_console_pattern(prompt) =20 + # Synchronize on virtio-block driver creating the root device + exec_command_and_wait_for_pattern(self, + "while ! (dmesg -c | grep vda:) ; do sleep 1 ; don= e", + "vda1") + exec_command_and_wait_for_pattern(self, 'mount /dev/vda1 /sysroot', prompt) exec_command_and_wait_for_pattern(self, 'chroot /sysroot', @@ -65,10 +70,21 @@ def assert_initial_stats(self): assert val =3D=3D UNSET_STATS_VALUE =20 def assert_running_stats(self, then): - ret =3D self.vm.qmp('qom-get', - {'path': '/machine/peripheral/balloon', - 'property': 'guest-stats'})['return'] - when =3D ret.get('last-update') + # We told the QEMU to refresh stats every 100ms, but + # there can be a delay between virtio-ballon driver + # being modprobed and seeing the first stats refresh + # Retry a few times for robustness under heavy load + retries =3D 10 + when =3D 0 + while when =3D=3D 0 and retries: + ret =3D self.vm.qmp('qom-get', + {'path': '/machine/peripheral/balloon', + 'property': 'guest-stats'})['return'] + when =3D ret.get('last-update') + if when =3D=3D 0: + retries =3D retries - 1 + time.sleep(0.5) + now =3D time.time() =20 assert when > then and when < now --=20 2.48.1 From nobody Sun Nov 16 09:18:41 2025 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; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1741348533; cv=none; d=zohomail.com; s=zohoarc; b=PAUCGB/UUvniLaCX3E37PiDGLD9PXtOwY6t/TUGNFY8QEZCXuuh86RTmfRFjCeTavKb8rSYJJ1PHxN6KEHVSMw8J8RDhFMIUkmAboDQWQdHYMRjNXEEMBzuuJ2cSca10DOKOaYH5wGYThq6NuMjF6M9UVHZsPri+aqpnlW2ODd0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741348533; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=v9KadL5vdr7SKy68eKgZ8dWZa4b1SmWVaaLeb6HSmlQ=; b=Enajj5WsMPGoZIVi64Qyw0PVqtEYB06hl1LvAW7HPcLtdBQV2SPT62TbloEJEz0lbVTosTZ1TgE8DNvoD53fBgrzYKJKqgxXDQizj8QWr4DsO1EfU9OaMRtG9xEUXv9DoXdtdQJNug2nYAVLGjlPTaogbGgCTActApRl2BCZQlw= 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741348533666407.8858843100264; Fri, 7 Mar 2025 03:55:33 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tqWH7-0002OT-9X; Fri, 07 Mar 2025 06:53:57 -0500 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 1tqWH3-0002Nh-Up for qemu-devel@nongnu.org; Fri, 07 Mar 2025 06:53:53 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tqWH2-0000Lk-Fd for qemu-devel@nongnu.org; Fri, 07 Mar 2025 06:53:53 -0500 Received: from mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-14-DGRZ1yeiOpeN0orzR77kHg-1; Fri, 07 Mar 2025 06:53:50 -0500 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id D0FA0195609F for ; Fri, 7 Mar 2025 11:53:49 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.44.32.60]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 0C5A41944F2E; Fri, 7 Mar 2025 11:53:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1741348432; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=v9KadL5vdr7SKy68eKgZ8dWZa4b1SmWVaaLeb6HSmlQ=; b=CD0rVS3hBIW7jwMiUAzoQOYNkl+dAqKI2116h00WOVvgfIvMOqifc2aSLY0BRLLgEk0qBp a+WPsZ/89eEUxQXApoGM6iSnbL1ok6P/cfncMS3ehKjkpmsaEAYzwIsjFaJiotRmzy3Hen z+5meEu+coDacV0vqgeu86vG6uAQV1U= X-MC-Unique: DGRZ1yeiOpeN0orzR77kHg-1 X-Mimecast-MFC-AGG-ID: DGRZ1yeiOpeN0orzR77kHg_1741348429 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , David Hildenbrand Subject: [PULL 11/15] tests/functional/test_virtio_balloon: Only use KVM for running this test Date: Fri, 7 Mar 2025 12:53:10 +0100 Message-ID: <20250307115314.1096373-12-thuth@redhat.com> In-Reply-To: <20250307115314.1096373-1-thuth@redhat.com> References: <20250307115314.1096373-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.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 @redhat.com) X-ZM-MESSAGEID: 1741348536250019100 Content-Type: text/plain; charset="utf-8" The virtio_balloon test is currently hanging for unknown reasons when being run on the shared gitlab CI runners (which don't provide KVM, thus it's running in TCG mode there). All other functional tests that use the same asset (the Fedora 31 kernel) have already been marked to work only with KVM in the past, so those other tests are skipped on the shared gitlab CI runners. As long as the problem isn't fully understood and fixed, let's do the same with the virtio_balloon test to avoid that the CI is failing here. Message-ID: <20250307063904.1081961-1-thuth@redhat.com> Reviewed-by: David Hildenbrand Signed-off-by: Thomas Huth --- tests/functional/test_virtio_balloon.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/functional/test_virtio_balloon.py b/tests/functional/tes= t_virtio_balloon.py index 082bf08c4e8..5877b6c408c 100755 --- a/tests/functional/test_virtio_balloon.py +++ b/tests/functional/test_virtio_balloon.py @@ -110,6 +110,7 @@ def assert_running_stats(self, then): =20 def test_virtio_balloon_stats(self): self.set_machine('q35') + self.require_accelerator("kvm") kernel_path =3D self.ASSET_KERNEL.fetch() initrd_path =3D self.ASSET_INITRD.fetch() diskimage_path =3D self.ASSET_DISKIMAGE.fetch() @@ -122,7 +123,7 @@ def test_virtio_balloon_stats(self): # reset, we can reliably catch the clean stats again in BIOS # phase before the guest OS launches self.vm.add_args("-boot", "menu=3Don") - self.vm.add_args("-machine", "q35,accel=3Dkvm:tcg") + self.vm.add_args("-accel", "kvm") self.vm.add_args("-device", "virtio-balloon,id=3Dballoon") self.vm.add_args('-drive', f'file=3D{diskimage_path},if=3Dnone,id=3Ddrv0,sna= pshot=3Don') --=20 2.48.1 From nobody Sun Nov 16 09:18:41 2025 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; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1741348600; cv=none; d=zohomail.com; s=zohoarc; b=CKTdJBs73XXAq3Dcf9d5wrn/ZQy49JcndAbTMUuA8s+UVjnGnlPDGBy+LJbccLzw7d03pU6waENBQcyts+hs28iGMUSl0jWwSmf2N+ad8FXdkffHmZ7ER0dsGIfuwVU424kUhRQxRNeyam4e7TuKwF85Hxzlj9dL4RuUt/o2dQc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741348600; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=zauGDAHW/VZ8KQXAC0Fs6S1Kmclqu/+eitmfaMVBHpU=; b=V1tdqMI6Dbc/wOOUFLJz+ejp7KR3BGT0WTA7LBrADeZm24D04N0+nShcbGgNuhsKb4WrVHggC6r6m/9DD4zXTUPvk3/0YkWvTCyLX0OacG5h1cPiS77kZgpEPpEF0CFZxQFW9djyAeis5PULdOwYKnu+Z4pUunz8hzQdyaXPf64= 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 174134860052488.84034255774452; Fri, 7 Mar 2025 03:56:40 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tqWHC-0002PE-Iz; Fri, 07 Mar 2025 06:54:02 -0500 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 1tqWHB-0002Op-0P for qemu-devel@nongnu.org; Fri, 07 Mar 2025 06:54:01 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tqWH8-0000Mj-Ua for qemu-devel@nongnu.org; Fri, 07 Mar 2025 06:54:00 -0500 Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-572-L0Y6Xg6-OhyyX9I90jUeHQ-1; Fri, 07 Mar 2025 06:53:54 -0500 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 2BE001955BC9; Fri, 7 Mar 2025 11:53:53 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.44.32.60]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 93E461944F2E; Fri, 7 Mar 2025 11:53:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1741348438; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zauGDAHW/VZ8KQXAC0Fs6S1Kmclqu/+eitmfaMVBHpU=; b=Q6VjhsNV/d2Glx/CKTOqDKua3W3cn6xzm+CGJdZ2pkILRTpyj03O496ol5T77+mBq9HwSH IJIWLpmM3/B1teYs1+tMrLyFz1klAV/E1esjQDwsMpdVIju2HARzSP9NNQJ2TSlAxYdI4s ClRyMY8AGDpkdAzDmrDXKbg/02yzaUQ= X-MC-Unique: L0Y6Xg6-OhyyX9I90jUeHQ-1 X-Mimecast-MFC-AGG-ID: L0Y6Xg6-OhyyX9I90jUeHQ_1741348433 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , Aditya Gupta , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 12/15] doc: add missing 'Asset' type in function test doc Date: Fri, 7 Mar 2025 12:53:11 +0100 Message-ID: <20250307115314.1096373-13-thuth@redhat.com> In-Reply-To: <20250307115314.1096373-1-thuth@redhat.com> References: <20250307115314.1096373-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.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 @redhat.com) X-ZM-MESSAGEID: 1741348602388019100 From: Aditya Gupta Seems 'Asset' got missed in the documentation by mistake. Also fix the one spellcheck issue pointed by spellcheck Signed-off-by: Aditya Gupta Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20250306060706.1982992-1-adityag@linux.ibm.com> Signed-off-by: Thomas Huth --- docs/devel/testing/functional.rst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/devel/testing/functional.rst b/docs/devel/testing/functio= nal.rst index bcb5509512e..a9fa45eac1f 100644 --- a/docs/devel/testing/functional.rst +++ b/docs/devel/testing/functional.rst @@ -251,7 +251,7 @@ Many functional tests download assets (e.g. Linux kerne= ls, initrds, firmware images, etc.) from the internet to be able to run tests with them. This imposes additional challenges to the test framework. =20 -First there is the the problem that some people might not have an +First there is the problem that some people might not have an unconstrained internet connection, so such tests should not be run by default when running ``make check``. To accomplish this situation, the tests that download files should only be added to the "thorough" @@ -274,7 +274,9 @@ the tests are run. This pre-caching is done with the qe= mu_test.Asset class. To use it in your test, declare an asset in your test class with its URL and SHA256 checksum like this:: =20 - ASSET_somename =3D ( + from qemu_test import Asset + + ASSET_somename =3D Asset( ('https://www.qemu.org/assets/images/qemu_head_200.png'), '34b74cad46ea28a2966c1d04e102510daf1fd73e6582b6b74523940d5da029dd') =20 --=20 2.48.1 From nobody Sun Nov 16 09:18:41 2025 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; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1741348472; cv=none; d=zohomail.com; s=zohoarc; b=GqqWlg7cVohrS1mVOZfgDYjgdMTy2VqDpALtOccs3YOYQ4oyCCrt0WQzEIMLRe3MEHDiWak6hmjSpPxH9pMLyjERUUeLALiPNPeNyBLLAmep4chabacvU3ZxEB+eoHJaZx4tmuSRNQoDJ7oRG+dVLcBwLF7NZSE1A4P81p0IFx4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741348472; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=7udbWAMuJ/RtyTgIwMZdCmjiUDRpbrQ+8huO/rVeuZ0=; b=NpGXUt34FuL+67FwNcAX7UI1yu8OVyMkDNEn0Nmn37aV/tMauFo+5x8657T0ehHcClXfQ6KhxT0cQrrAX1S33//z0dz01DUVWQbIIdKC3+Xu39PFKJfvJDYjfBSlQqCAHJHR6cwoP/ZiMtuwwAKDEvqsBGoAAShvS0E9XZkSdY4= 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741348472110274.4415496582591; Fri, 7 Mar 2025 03:54:32 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tqWHB-0002Ox-Se; Fri, 07 Mar 2025 06:54:01 -0500 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 1tqWHA-0002Oe-3w for qemu-devel@nongnu.org; Fri, 07 Mar 2025 06:54:00 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tqWH8-0000MX-Cp for qemu-devel@nongnu.org; Fri, 07 Mar 2025 06:53:59 -0500 Received: from mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-167--a9oCsz2Mfy6zNFSpIX3ww-1; Fri, 07 Mar 2025 06:53:56 -0500 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 750111955DCC; Fri, 7 Mar 2025 11:53:55 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.44.32.60]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id E35661944F2E; Fri, 7 Mar 2025 11:53:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1741348437; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7udbWAMuJ/RtyTgIwMZdCmjiUDRpbrQ+8huO/rVeuZ0=; b=cEKd5LkpAx52D81H4BUGU8QTyjxYWo7+nNdoSvVQjrAvfGtscbSV0e/2SSfY4eoN0T/k1Y Jxetbl5QrMNWgh2jm+VOMRbfWJrpJRUA+ZVSOD5wIxWTl67xuTGLZcCEhlJanQQ/uA9vgo uavUyMGd39t1/BrDv8WaN/4ePl+XdTg= X-MC-Unique: -a9oCsz2Mfy6zNFSpIX3ww-1 X-Mimecast-MFC-AGG-ID: -a9oCsz2Mfy6zNFSpIX3ww_1741348435 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 13/15] MAINTAINERS: Add docs/devel/testing/functional.rst to the functional section Date: Fri, 7 Mar 2025 12:53:12 +0100 Message-ID: <20250307115314.1096373-14-thuth@redhat.com> In-Reply-To: <20250307115314.1096373-1-thuth@redhat.com> References: <20250307115314.1096373-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.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 @redhat.com) X-ZM-MESSAGEID: 1741348474148019100 Add an entry for docs/devel/testing/functional.rst to get notified on patches that change this file. Message-ID: <20250306105124.702131-1-thuth@redhat.com> Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Thomas Huth --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 692628cd780..51f424ee848 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -4228,6 +4228,7 @@ Functional testing framework M: Thomas Huth R: Philippe Mathieu-Daud=C3=A9 R: Daniel P. Berrange +F: docs/devel/testing/functional.rst F: tests/functional/qemu_test/ =20 Windows Hosted Continuous Integration --=20 2.48.1 From nobody Sun Nov 16 09:18:41 2025 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; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1741348546; cv=none; d=zohomail.com; s=zohoarc; b=Bqi0IQ4Bhz/110gxqzAyMo9Ix5m/WgVXaSKiccTqLvknrqjdnDTPV6YAioeAre15133DjOelOpnD5ymUW/R9B72Bmkr3W5cSjNvMi2Pi7SqbPuO+bKtscDl6ai5i0e2zyTjrVEeCJYbGVExhrzVwwH+xYS46BU+civH6eSZHA5Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741348546; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=qdZJenEy80PQuP0HMGPq24Ow0Y3p5xVvgW0zoHhCcBY=; b=cSG7uBTGJs7C6CJH6hAMe+SAoxe8J23egXtfQiNG97Odupldz10Hs5D2AYA39J5bT9nnJqEb72WjsKULTUzvwvedzUl4kMcPP0GtkuWkMQYcfrxdtfW+Fel/YaYW1h4u2c2Btjqc4UIV1rEyYfeiGZoONnxqx4VcP649UVuRQWQ= 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741348546745803.1327890031538; Fri, 7 Mar 2025 03:55:46 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tqWHF-0002QW-Gg; Fri, 07 Mar 2025 06:54:05 -0500 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 1tqWHD-0002PX-D5 for qemu-devel@nongnu.org; Fri, 07 Mar 2025 06:54:03 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tqWHB-0000ND-Ar for qemu-devel@nongnu.org; Fri, 07 Mar 2025 06:54:02 -0500 Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-77-qmyjsjg5NY6uGvuk_Kvt6Q-1; Fri, 07 Mar 2025 06:53:59 -0500 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 1DC58180AF52; Fri, 7 Mar 2025 11:53:58 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.44.32.60]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 0A2501944F2E; Fri, 7 Mar 2025 11:53:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1741348440; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qdZJenEy80PQuP0HMGPq24Ow0Y3p5xVvgW0zoHhCcBY=; b=jV4zRsdfL+MSfJ9jVaVKfbWsQcZO11/U8ttObyng4g+FMlJT2AKk2ZHCd3ohbKQyzPf/u/ O5t8AxgnwQJOYp04tmVEYdtyNCaK8HsVd4NrL11ejI/g/ZpkUrntMXnx3Lfo3KLh664Sts ttOn7hCfJOXTXx8xxhTmeNm9mjUc7CM= X-MC-Unique: qmyjsjg5NY6uGvuk_Kvt6Q-1 X-Mimecast-MFC-AGG-ID: qmyjsjg5NY6uGvuk_Kvt6Q_1741348438 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , Matthew Rosato , David Hildenbrand Subject: [PULL 14/15] s390x/pci: add support for guests that request direct mapping Date: Fri, 7 Mar 2025 12:53:13 +0100 Message-ID: <20250307115314.1096373-15-thuth@redhat.com> In-Reply-To: <20250307115314.1096373-1-thuth@redhat.com> References: <20250307115314.1096373-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.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 @redhat.com) X-ZM-MESSAGEID: 1741348547372019000 Content-Type: text/plain; charset="utf-8" From: Matthew Rosato When receiving a guest mpcifc(4) or mpcifc(6) instruction without the T bit set, treat this as a request to perform direct mapping instead of address translation. In order to facilitate this, pin the entirety of guest memory into the host iommu. Pinning for the direct mapping case is handled via vfio and its memory listener. Additionally, ram discard settings are inherited from vfio: coordinated discards (e.g. virtio-mem) are allowed while uncoordinated discards (e.g. virtio-balloon) are disabled. Subsequent guest DMA operations are all expected to be of the format guest_phys+sdma, allowing them to be used as lookup into the host iommu table. Signed-off-by: Matthew Rosato Reviewed-by: David Hildenbrand Message-ID: <20250226210013.238349-2-mjrosato@linux.ibm.com> Signed-off-by: Thomas Huth --- include/hw/s390x/s390-pci-bus.h | 3 +++ hw/s390x/s390-pci-bus.c | 39 +++++++++++++++++++++++++++++++-- hw/s390x/s390-pci-inst.c | 13 +++++++++-- hw/s390x/s390-pci-vfio.c | 23 +++++++++++++++---- hw/s390x/s390-virtio-ccw.c | 5 +++++ 5 files changed, 75 insertions(+), 8 deletions(-) diff --git a/include/hw/s390x/s390-pci-bus.h b/include/hw/s390x/s390-pci-bu= s.h index 2c43ea123f0..04944d4fed7 100644 --- a/include/hw/s390x/s390-pci-bus.h +++ b/include/hw/s390x/s390-pci-bus.h @@ -277,6 +277,7 @@ struct S390PCIIOMMU { AddressSpace as; MemoryRegion mr; IOMMUMemoryRegion iommu_mr; + MemoryRegion *dm_mr; bool enabled; uint64_t g_iota; uint64_t pba; @@ -362,6 +363,7 @@ struct S390PCIBusDevice { bool interp; bool forwarding_assist; bool aif; + bool rtr_avail; QTAILQ_ENTRY(S390PCIBusDevice) link; }; =20 @@ -389,6 +391,7 @@ int pci_chsc_sei_nt2_have_event(void); void s390_pci_sclp_configure(SCCB *sccb); void s390_pci_sclp_deconfigure(SCCB *sccb); void s390_pci_iommu_enable(S390PCIIOMMU *iommu); +void s390_pci_iommu_direct_map_enable(S390PCIIOMMU *iommu); void s390_pci_iommu_disable(S390PCIIOMMU *iommu); void s390_pci_generate_error_event(uint16_t pec, uint32_t fh, uint32_t fid, uint64_t faddr, uint32_t e); diff --git a/hw/s390x/s390-pci-bus.c b/hw/s390x/s390-pci-bus.c index 913d72cc748..9d7b0f75407 100644 --- a/hw/s390x/s390-pci-bus.c +++ b/hw/s390x/s390-pci-bus.c @@ -18,6 +18,8 @@ #include "hw/s390x/s390-pci-inst.h" #include "hw/s390x/s390-pci-kvm.h" #include "hw/s390x/s390-pci-vfio.h" +#include "hw/s390x/s390-virtio-ccw.h" +#include "hw/boards.h" #include "hw/pci/pci_bus.h" #include "hw/qdev-properties.h" #include "hw/pci/pci_bridge.h" @@ -724,12 +726,42 @@ void s390_pci_iommu_enable(S390PCIIOMMU *iommu) g_free(name); } =20 +void s390_pci_iommu_direct_map_enable(S390PCIIOMMU *iommu) +{ + MachineState *ms =3D MACHINE(qdev_get_machine()); + S390CcwMachineState *s390ms =3D S390_CCW_MACHINE(ms); + + /* + * For direct-mapping we must map the entire guest address space. Rat= her + * than using an iommu, create a memory region alias that maps GPA X to + * IOVA X + SDMA. VFIO will handle pinning via its memory listener. + */ + g_autofree char *name =3D g_strdup_printf("iommu-dm-s390-%04x", + iommu->pbdev->uid); + + iommu->dm_mr =3D g_malloc0(sizeof(*iommu->dm_mr)); + memory_region_init_alias(iommu->dm_mr, OBJECT(&iommu->mr), name, + get_system_memory(), 0, + s390_get_memory_limit(s390ms)); + iommu->enabled =3D true; + memory_region_add_subregion(&iommu->mr, iommu->pbdev->zpci_fn.sdma, + iommu->dm_mr); +} + void s390_pci_iommu_disable(S390PCIIOMMU *iommu) { iommu->enabled =3D false; g_hash_table_remove_all(iommu->iotlb); - memory_region_del_subregion(&iommu->mr, MEMORY_REGION(&iommu->iommu_mr= )); - object_unparent(OBJECT(&iommu->iommu_mr)); + if (iommu->dm_mr) { + memory_region_del_subregion(&iommu->mr, iommu->dm_mr); + object_unparent(OBJECT(iommu->dm_mr)); + g_free(iommu->dm_mr); + iommu->dm_mr =3D NULL; + } else { + memory_region_del_subregion(&iommu->mr, + MEMORY_REGION(&iommu->iommu_mr)); + object_unparent(OBJECT(&iommu->iommu_mr)); + } } =20 static void s390_pci_iommu_free(S390pciState *s, PCIBus *bus, int32_t devf= n) @@ -1145,6 +1177,7 @@ static void s390_pcihost_plug(HotplugHandler *hotplug= _dev, DeviceState *dev, /* Always intercept emulated devices */ pbdev->interp =3D false; pbdev->forwarding_assist =3D false; + pbdev->rtr_avail =3D false; } =20 if (s390_pci_msix_init(pbdev) && !pbdev->interp) { @@ -1510,6 +1543,8 @@ static const Property s390_pci_device_properties[] = =3D { DEFINE_PROP_BOOL("interpret", S390PCIBusDevice, interp, true), DEFINE_PROP_BOOL("forwarding-assist", S390PCIBusDevice, forwarding_ass= ist, true), + DEFINE_PROP_BOOL("relaxed-translation", S390PCIBusDevice, rtr_avail, + true), }; =20 static const VMStateDescription s390_pci_device_vmstate =3D { diff --git a/hw/s390x/s390-pci-inst.c b/hw/s390x/s390-pci-inst.c index e386d75d58c..8cdeb6cb7f7 100644 --- a/hw/s390x/s390-pci-inst.c +++ b/hw/s390x/s390-pci-inst.c @@ -16,6 +16,7 @@ #include "exec/memory.h" #include "qemu/error-report.h" #include "system/hw_accel.h" +#include "hw/boards.h" #include "hw/pci/pci_device.h" #include "hw/s390x/s390-pci-inst.h" #include "hw/s390x/s390-pci-bus.h" @@ -1008,17 +1009,25 @@ static int reg_ioat(CPUS390XState *env, S390PCIBusD= evice *pbdev, ZpciFib fib, } =20 /* currently we only support designation type 1 with translation */ - if (!(dt =3D=3D ZPCI_IOTA_RTTO && t)) { + if (t && dt !=3D ZPCI_IOTA_RTTO) { error_report("unsupported ioat dt %d t %d", dt, t); s390_program_interrupt(env, PGM_OPERAND, ra); return -EINVAL; + } else if (!t && !pbdev->rtr_avail) { + error_report("relaxed translation not allowed"); + s390_program_interrupt(env, PGM_OPERAND, ra); + return -EINVAL; } =20 iommu->pba =3D pba; iommu->pal =3D pal; iommu->g_iota =3D g_iota; =20 - s390_pci_iommu_enable(iommu); + if (t) { + s390_pci_iommu_enable(iommu); + } else { + s390_pci_iommu_direct_map_enable(iommu); + } =20 return 0; } diff --git a/hw/s390x/s390-pci-vfio.c b/hw/s390x/s390-pci-vfio.c index 7dbbc76823a..443e2229127 100644 --- a/hw/s390x/s390-pci-vfio.c +++ b/hw/s390x/s390-pci-vfio.c @@ -131,13 +131,28 @@ static void s390_pci_read_base(S390PCIBusDevice *pbde= v, /* Store function type separately for type-specific behavior */ pbdev->pft =3D cap->pft; =20 + /* + * If the device is a passthrough ISM device, disallow relaxed + * translation. + */ + if (pbdev->pft =3D=3D ZPCI_PFT_ISM) { + pbdev->rtr_avail =3D false; + } + /* * If appropriate, reduce the size of the supported DMA aperture repor= ted - * to the guest based upon the vfio DMA limit. + * to the guest based upon the vfio DMA limit. This is applicable for + * devices that are guaranteed to not use relaxed translation. If the + * device is capable of relaxed translation then we must advertise the + * full aperture. In this case, if translation is used then we will + * rely on the vfio DMA limit counting and use RPCIT CC1 / status 16 + * to request that the guest free DMA mappings as necessary. */ - vfio_size =3D pbdev->iommu->max_dma_limit << TARGET_PAGE_BITS; - if (vfio_size > 0 && vfio_size < cap->end_dma - cap->start_dma + 1) { - pbdev->zpci_fn.edma =3D cap->start_dma + vfio_size - 1; + if (!pbdev->rtr_avail) { + vfio_size =3D pbdev->iommu->max_dma_limit << TARGET_PAGE_BITS; + if (vfio_size > 0 && vfio_size < cap->end_dma - cap->start_dma + 1= ) { + pbdev->zpci_fn.edma =3D cap->start_dma + vfio_size - 1; + } } } =20 diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c index 51ae0c133d8..a9b3db19f63 100644 --- a/hw/s390x/s390-virtio-ccw.c +++ b/hw/s390x/s390-virtio-ccw.c @@ -936,8 +936,13 @@ static void ccw_machine_9_2_instance_options(MachineSt= ate *machine) =20 static void ccw_machine_9_2_class_options(MachineClass *mc) { + static GlobalProperty compat[] =3D { + { TYPE_S390_PCI_DEVICE, "relaxed-translation", "off", }, + }; + ccw_machine_10_0_class_options(mc); compat_props_add(mc->compat_props, hw_compat_9_2, hw_compat_9_2_len); + compat_props_add(mc->compat_props, compat, G_N_ELEMENTS(compat)); } DEFINE_CCW_MACHINE(9, 2); =20 --=20 2.48.1 From nobody Sun Nov 16 09:18:41 2025 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; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1741348526; cv=none; d=zohomail.com; s=zohoarc; b=EB6AAudFUbdKsAEAAp1uZsRJTG8BKdeTH7QYL86kA86oPoC1PqFf1HVRPdd/BXs7VLjPlsnG4I+DYXOpaKUUBun8WiyHd118la7VIzDLahpGSPcA0/A/Qlr8yKr95ery6Z/4HgA9MBEGnLRcgF539G8wdrm3riKqfJFRrBHQGeY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741348526; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=vP08kGh1gBxCAKNj7Mea7eFddJb1NSFNTaj+GwlfRgc=; b=MnMagAi2VlLGVfFS5vnv4md8rq2FPLDL+TAna6oMOxvEzONTRf8cWyLMTAUZBA9wTfeYBo8NgAeojWaVAkW5ftm0/DPE+8gRuS8hQp7AeRhDjQlCUdYeo40Dh/md5YNxvLcpXQAsqCQC9dhz51uG5TEmjZChbVWQO0hcJHcWvHU= 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741348526832720.4623418992435; Fri, 7 Mar 2025 03:55:26 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tqWHH-0002RF-QB; Fri, 07 Mar 2025 06:54:07 -0500 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 1tqWHG-0002Qa-5N for qemu-devel@nongnu.org; Fri, 07 Mar 2025 06:54:06 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tqWHE-0000No-Mz for qemu-devel@nongnu.org; Fri, 07 Mar 2025 06:54:05 -0500 Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-692-BDwsAU0sNzqTptpSMzn6-A-1; Fri, 07 Mar 2025 06:54:02 -0500 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 6C01B19560BC; Fri, 7 Mar 2025 11:54:01 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.44.32.60]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 21BC91944F2E; Fri, 7 Mar 2025 11:53:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1741348444; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vP08kGh1gBxCAKNj7Mea7eFddJb1NSFNTaj+GwlfRgc=; b=cAbDG6R3DnI8lkF80ug7eTwfZbxbc88xmWerIwE7U4ta8DloVfJw3sBskWVNTSOqKZycYC kDE0UfIDhFG/kF9pY1t0hI+t2QBj6IlCJpsYKd0pLGrxqCk5c7UuKIajbfFUifUtu97CNL y93N45pCBIRRjeCeXJIQkeGE5xbm9ws= X-MC-Unique: BDwsAU0sNzqTptpSMzn6-A-1 X-Mimecast-MFC-AGG-ID: BDwsAU0sNzqTptpSMzn6-A_1741348441 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Stefan Hajnoczi , Matthew Rosato , Niklas Schnelle Subject: [PULL 15/15] s390x/pci: indicate QEMU supports relaxed translation for passthrough Date: Fri, 7 Mar 2025 12:53:14 +0100 Message-ID: <20250307115314.1096373-16-thuth@redhat.com> In-Reply-To: <20250307115314.1096373-1-thuth@redhat.com> References: <20250307115314.1096373-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.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 @redhat.com) X-ZM-MESSAGEID: 1741348527362019000 Content-Type: text/plain; charset="utf-8" From: Matthew Rosato Specifying this bit in the guest CLP response indicates that the guest can optionally choose to skip translation and instead use identity-mapped operations. Tested-by: Niklas Schnelle Reviewed-by: Niklas Schnelle Signed-off-by: Matthew Rosato Message-ID: <20250226210013.238349-3-mjrosato@linux.ibm.com> Signed-off-by: Thomas Huth --- include/hw/s390x/s390-pci-clp.h | 1 + hw/s390x/s390-pci-vfio.c | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/include/hw/s390x/s390-pci-clp.h b/include/hw/s390x/s390-pci-cl= p.h index 03b7f9ba5f7..6a635d693ba 100644 --- a/include/hw/s390x/s390-pci-clp.h +++ b/include/hw/s390x/s390-pci-clp.h @@ -158,6 +158,7 @@ typedef struct ClpRspQueryPciGrp { #define CLP_RSP_QPCIG_MASK_NOI 0xfff uint16_t i; uint8_t version; +#define CLP_RSP_QPCIG_MASK_RTR 0x20 #define CLP_RSP_QPCIG_MASK_FRAME 0x2 #define CLP_RSP_QPCIG_MASK_REFRESH 0x1 uint8_t fr; diff --git a/hw/s390x/s390-pci-vfio.c b/hw/s390x/s390-pci-vfio.c index 443e2229127..6236ac7f1e6 100644 --- a/hw/s390x/s390-pci-vfio.c +++ b/hw/s390x/s390-pci-vfio.c @@ -238,8 +238,11 @@ static void s390_pci_read_group(S390PCIBusDevice *pbde= v, pbdev->pci_group =3D s390_group_create(pbdev->zpci_fn.pfgid, start= _gid); =20 resgrp =3D &pbdev->pci_group->zpci_group; + if (pbdev->rtr_avail) { + resgrp->fr |=3D CLP_RSP_QPCIG_MASK_RTR; + } if (cap->flags & VFIO_DEVICE_INFO_ZPCI_FLAG_REFRESH) { - resgrp->fr =3D 1; + resgrp->fr |=3D CLP_RSP_QPCIG_MASK_REFRESH; } resgrp->dasm =3D cap->dasm; resgrp->msia =3D cap->msi_addr; --=20 2.48.1