From nobody Fri Nov 14 16:53:57 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1760632101; cv=none; d=zohomail.com; s=zohoarc; b=oHM9BrWEF3bq4ZkLpu85iQsdxPS2cz0INgsX1JMDntEdSIa//B2VRhhpGL0zf/4tMS+J8Y5APBWP9QkIQhs9PkqJhx8Ymr4J1j8rv4HdpB1/E8WnKlCa/BljuOvAr1JHBkWsXBcM2jl+ATKrWsMhZAN0ZKREpMjqfQ18y2b2+yc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1760632101; 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=CsXNk0bNR7geyKHVldXcDOSqODASb0NEf1xECyBSNGA=; b=FkR37Oz98/Apcu3Mt8AS39/MbpUtNYwnbbGxVpSJnuLZMzGfSaSMI74kIMbcle3wS7TEuaaRIEp9AMuQYzrSc4HqVX8xybDlzkln8RaymvbNMIMg4YcyrmrobnKl5yhySU3Gq0Si45iwEv2TPVSsYKEAj4CSPz05qSwhxVCyzfU= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 176063210148360.24495062284814; Thu, 16 Oct 2025 09:28:21 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1v9QoQ-00037a-Sk; Thu, 16 Oct 2025 12:26:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1v9QoD-0002xg-K6 for qemu-devel@nongnu.org; Thu, 16 Oct 2025 12:26:33 -0400 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 1v9Qo1-0004xM-Dj for qemu-devel@nongnu.org; Thu, 16 Oct 2025 12:26:32 -0400 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-606-kPisOi7tNVGxDQvOHcK0kg-1; Thu, 16 Oct 2025 12:26:11 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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 AB9E718002F7; Thu, 16 Oct 2025 16:26:08 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.45.224.163]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id DA4781956056; Thu, 16 Oct 2025 16:26:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1760631976; 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=CsXNk0bNR7geyKHVldXcDOSqODASb0NEf1xECyBSNGA=; b=bBviUyg4u1nTGXz4JStRVXe2GFCzhmg5tTrItfsyynW35kD6Sxkf/FM7ds/toPqewXo3A4 33J25IKMhHS7iR4yibogPWeL1XCTnQOuyhuiDQE9Rw/UthU3dBN60+dY0d0LPilFZBsdvk FUp8Wh0S/YnKYkNvha3c3FzMANEWfU0= X-MC-Unique: kPisOi7tNVGxDQvOHcK0kg-1 X-Mimecast-MFC-AGG-ID: kPisOi7tNVGxDQvOHcK0kg_1760631969 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Richard Henderson , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Michael Tokarev , =?UTF-8?q?Alex=20Benn=C3=A9e?= Subject: [PULL 01/10] python/qemu: Replace some remaining "avocados" with "functional tests" Date: Thu, 16 Oct 2025 18:25:52 +0200 Message-ID: <20251016162601.442557-2-thuth@redhat.com> In-Reply-To: <20251016162601.442557-1-thuth@redhat.com> References: <20251016162601.442557-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.17 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, T_SPF_TEMPERROR=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1760632106012158500 From: Thomas Huth The avocado tests have been replaced by the new functional tests, so also update this in the README.rst files in the python directory accordingly. Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Michael Tokarev Reviewed-by: Alex Benn=C3=A9e Signed-off-by: Thomas Huth Message-ID: <20251008131936.71160-1-thuth@redhat.com> --- python/qemu/machine/README.rst | 2 +- python/qemu/utils/README.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/python/qemu/machine/README.rst b/python/qemu/machine/README.rst index 8de2c3d7722..6554c693201 100644 --- a/python/qemu/machine/README.rst +++ b/python/qemu/machine/README.rst @@ -2,7 +2,7 @@ qemu.machine package =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 This package provides core utilities used for testing and debugging -QEMU. It is used by the iotests, vm tests, avocado tests, and several +QEMU. It is used by the iotests, vm tests, functional tests, and several other utilities in the ./scripts directory. It is not a fully-fledged SDK and it is subject to change at any time. =20 diff --git a/python/qemu/utils/README.rst b/python/qemu/utils/README.rst index d5f2da14540..5027f0b5f11 100644 --- a/python/qemu/utils/README.rst +++ b/python/qemu/utils/README.rst @@ -2,6 +2,6 @@ qemu.utils package =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 This package provides miscellaneous utilities used for testing and -debugging QEMU. It is used primarily by the vm and avocado tests. +debugging QEMU. It is used primarily by the vm and functional tests. =20 See the documentation in ``__init__.py`` for more information. --=20 2.51.0 From nobody Fri Nov 14 16:53:57 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1760632098; cv=none; d=zohomail.com; s=zohoarc; b=ilnH/7L/xGnJ13JqhM3QYkXK//ACbREVWt4gSrhNivNQ7zVG1HTg9OZNkEskbfUp0UUctoOfCiZo3UgZF5uJyxD8+GuamrfXwYZLJgUI0fo2DmEgs2317r77ChmMovv1a5rzaQYz9+xbqsRt3Szr2XfLFYzwWoqUF8IZLGA5ZLQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1760632098; 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=O/css4uNLShECazgAKMC4h2UPl+GLrtsLpe+TFns7Ps=; b=D/aB8yInksredc9pFPVldZciK+C+LfoRr2iHqvapZYy3sPV6apoM/xy2zmMM/KCcwgLMktP54DeB2F3bGP+y6u2EmHSqDTPQHNZNygjtS1sksC9+JwPHPS7ESkuBjlagz9+2Mw/370UVCisV0f32qi73acKtpWguiHPo8mRbb98= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 176063209858045.30936684373569; Thu, 16 Oct 2025 09:28:18 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1v9QoG-0002yj-MV; Thu, 16 Oct 2025 12:26:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1v9QoA-0002vG-7X for qemu-devel@nongnu.org; Thu, 16 Oct 2025 12:26:30 -0400 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 1v9Qo0-0004xJ-Aq for qemu-devel@nongnu.org; Thu, 16 Oct 2025 12:26:29 -0400 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-407-vWMilOqNPXCDbEwVlo59Og-1; Thu, 16 Oct 2025 12:26:12 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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 110B21956094; Thu, 16 Oct 2025 16:26:11 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.45.224.163]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 56C05195419F; Thu, 16 Oct 2025 16:26:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1760631975; 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=O/css4uNLShECazgAKMC4h2UPl+GLrtsLpe+TFns7Ps=; b=LsDBQExxrlh1qg0Cq+CPUrSlCCM8LA7RRZLtuyEZS2Qs4LvpoGsQZXM9LQvl85lockmzz4 CDGoEJLvy7kwSej/Z5D6nB45T3NmUoydRHuINJiju3CIN0F3S3AKys2IRiQpb/gSDaZFp9 Yg7VnAOvjBgGcJAhSjUAdpmAZX1gD4k= X-MC-Unique: vWMilOqNPXCDbEwVlo59Og-1 X-Mimecast-MFC-AGG-ID: vWMilOqNPXCDbEwVlo59Og_1760631971 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Richard Henderson , =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 02/10] tests/functional/aarch64: Drop some sbsaref_alpine tests Date: Thu, 16 Oct 2025 18:25:53 +0200 Message-ID: <20251016162601.442557-3-thuth@redhat.com> In-Reply-To: <20251016162601.442557-1-thuth@redhat.com> References: <20251016162601.442557-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.17 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, T_SPF_TEMPERROR=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1760632101363154100 From: Thomas Huth test_sbsaref_alpine is one of the longest running test in our testsuite, because it does a full Linux boot a couple of times, for various different CPU configurations. That's quite a lot of testing each time, for a rather small additional test coverage. Thus let's drop some of the tests that don't provide much in addition to the other ones. Suggested-by: Alex Benn=C3=A9e Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Thomas Huth Message-ID: <20251006161850.181998-1-thuth@redhat.com> --- tests/functional/aarch64/test_sbsaref_alpine.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/tests/functional/aarch64/test_sbsaref_alpine.py b/tests/functi= onal/aarch64/test_sbsaref_alpine.py index abb8f5114bd..be84b7adb0c 100755 --- a/tests/functional/aarch64/test_sbsaref_alpine.py +++ b/tests/functional/aarch64/test_sbsaref_alpine.py @@ -41,15 +41,9 @@ def boot_alpine_linux(self, cpu=3DNone): self.vm.launch() wait_for_console_pattern(self, "Welcome to Alpine Linux 3.17") =20 - def test_sbsaref_alpine_linux_cortex_a57(self): - self.boot_alpine_linux("cortex-a57") - def test_sbsaref_alpine_linux_default_cpu(self): self.boot_alpine_linux() =20 - def test_sbsaref_alpine_linux_max_pauth_off(self): - self.boot_alpine_linux("max,pauth=3Doff") - def test_sbsaref_alpine_linux_max_pauth_impdef(self): self.boot_alpine_linux("max,pauth-impdef=3Don") =20 --=20 2.51.0 From nobody Fri Nov 14 16:53:57 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1760632082; cv=none; d=zohomail.com; s=zohoarc; b=NyOngahAQSg7ill829BWeoAF+HBnlQxcCPxGs/olU/Nd+7h6Au+moNL1vwBPXRsbmRHVpZ+4u745gnCX5lzvA7qGx8qw8IZA68oeQuKrbWvsa46SU84iM/X7IPXnJ8yUgGYVVSn/NxdAU3YU11vVIkWyEjrOfvpg6bWwLhmhfls= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1760632082; 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=2XD3fRy146lvHkdMfcroWD93I7TLX17VPZMyGWYUsu4=; b=SXkcLPTvHA8eyuPVJ35xGpt53IpdomUIjpS2w/z+ynK6Zgzjm3kkKrhY33f9wsOVsBz7RfNXAWXAe7GCQaiS+kZZB1ouk4lZI4eEHV5LxBv0TSuH4opcQ9uPTTipIThDB9G4HlJ+20abhZOUg1u0S5bpwhCrG/J4mTAdvWdf3wo= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1760632082367375.4016263707455; Thu, 16 Oct 2025 09:28:02 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1v9QoJ-00030P-4M; Thu, 16 Oct 2025 12:26:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1v9QoE-0002xo-H5 for qemu-devel@nongnu.org; Thu, 16 Oct 2025 12:26:35 -0400 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 1v9Qo0-0004y1-J7 for qemu-devel@nongnu.org; Thu, 16 Oct 2025 12:26:33 -0400 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-682-d7VuBpV8OxGnMAyt0yoV1A-1; Thu, 16 Oct 2025 12:26:14 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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 8030F195422B; Thu, 16 Oct 2025 16:26:13 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.45.224.163]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 954D1195419F; Thu, 16 Oct 2025 16:26:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1760631977; 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=2XD3fRy146lvHkdMfcroWD93I7TLX17VPZMyGWYUsu4=; b=U2mwobrUZlqInERupovoHSjG5pyhghtzOrgSRfZB5zrOXV7UviteB307Br294o0NLgzax2 EYTuZyfv8bpRYejRf/XkTW8UJDz9xUlawj7aqj6dah2qzWMDJEaWKBLGv52pjoQ3VOSLPF fEH1goXEFm0cF1KLNjY8o53IH8qlAKc= X-MC-Unique: d7VuBpV8OxGnMAyt0yoV1A-1 X-Mimecast-MFC-AGG-ID: d7VuBpV8OxGnMAyt0yoV1A_1760631973 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Richard Henderson , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Yonggang Luo , Peter Maydell Subject: [PULL 03/10] gitlab: purge msys pacman cache Date: Thu, 16 Oct 2025 18:25:54 +0200 Message-ID: <20251016162601.442557-4-thuth@redhat.com> In-Reply-To: <20251016162601.442557-1-thuth@redhat.com> References: <20251016162601.442557-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.17 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-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: 1760632085137154100 From: Daniel P. Berrang=C3=A9 For the Windows msys2 CI job we install many packages using pacman and use the GitLab cache to preserve the pacman cache across CI runs. While metadata still needs downloading, this avoids pacman re-downloading packages from msys2 if they have not changed. The problem is that pacman never automatically purges anything from its package cache. Thus the GitLab cache is growing without bound and packing/unpacking the cache is consuming an increasing amount of time in the CI job. If we run 'pacman -Sc' /after/ installing our desired package set, it will purge any cached downloaded packages that are not matching any installed package. This will (currently) cap the pacman download cache at approx 256 MB. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Yonggang Luo Reviewed-by: Thomas Huth Tested-by: Thomas Huth Reviewed-by: Peter Maydell Message-ID: <20251010160545.144760-1-berrange@redhat.com> Signed-off-by: Thomas Huth --- .gitlab-ci.d/windows.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.d/windows.yml b/.gitlab-ci.d/windows.yml index 1e6a01bd9ac..6e1135d8b86 100644 --- a/.gitlab-ci.d/windows.yml +++ b/.gitlab-ci.d/windows.yml @@ -87,6 +87,7 @@ msys2-64bit: mingw-w64-x86_64-pkgconf mingw-w64-x86_64-python mingw-w64-x86_64-zstd" + - .\msys64\usr\bin\bash -lc "pacman -Sc --noconfirm" - Write-Output "Running build at $(Get-Date -Format u)" - $env:JOBS =3D $(.\msys64\usr\bin\bash -lc nproc) - $env:CHERE_INVOKING =3D 'yes' # Preserve the current working directory --=20 2.51.0 From nobody Fri Nov 14 16:53:57 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1760632025; cv=none; d=zohomail.com; s=zohoarc; b=U/pwkLOGaswIdl/qIoxPzc5fdWLan1schl6pYMLqofoNb1xU/itTEkiwCSYA2QYEKhXR4sAFEk/P9eHvv8CDJu/Qd44mD7rTruPMxIHBlN3d0ijdVa81yain1BTn3UkDqvXQpjL9d53oelr5lkZqaagG0+0MdckbahzhdP+sj9w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1760632025; 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=oQLPUJvJKXdCYeYa0L1i2FteJ8pG+D9rq889ipQYEXA=; b=Hloxpcko3y5J2lZhtAX/TROdAs3H1biRmILr5jfaiib1YgRo80wctZ6UopuxT0vWJ5JGiY2UffISi5AMLGxkKn9J63z8G1XUJC9wWOln44Cz2X2q+/Zogyz/JgEri3Tv/7oYno4cYguJDJDuX1XkNINjNXLFEiwLW4jrtSqmPmc= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1760632025582774.1829206992041; Thu, 16 Oct 2025 09:27:05 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1v9QoD-0002vv-HM; Thu, 16 Oct 2025 12:26:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1v9Qo7-0002oR-Nv for qemu-devel@nongnu.org; Thu, 16 Oct 2025 12:26:28 -0400 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 1v9Qnz-0004y0-Ic for qemu-devel@nongnu.org; Thu, 16 Oct 2025 12:26:26 -0400 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-655-Co3hod0vNkiTZ96l_tQjFA-1; Thu, 16 Oct 2025 12:26:16 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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 88424180057A; Thu, 16 Oct 2025 16:26:15 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.45.224.163]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 1C67E1956056; Thu, 16 Oct 2025 16:26:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1760631977; 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=oQLPUJvJKXdCYeYa0L1i2FteJ8pG+D9rq889ipQYEXA=; b=e619+v/kDjanyNp6urbJntkF1G7tBxo6Y5on1mbgf7jrDPOIF57jr4SayHww8YyfmMlD65 /63OFO2AZU4sOwLZ6hs0YgHE/KlYyr6HeemtfvRWAhfkfx2dHNHg3nlxehn4akZk4nIqBM yZ7qdoNhV9ty1ZptNcR7DVNUw/KOC/I= X-MC-Unique: Co3hod0vNkiTZ96l_tQjFA-1 X-Mimecast-MFC-AGG-ID: Co3hod0vNkiTZ96l_tQjFA_1760631975 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Richard Henderson , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PULL 04/10] tests/functional: Set current time stamp of assets when using them Date: Thu, 16 Oct 2025 18:25:55 +0200 Message-ID: <20251016162601.442557-5-thuth@redhat.com> In-Reply-To: <20251016162601.442557-1-thuth@redhat.com> References: <20251016162601.442557-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.17 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: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no 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: 1760632041362158500 From: Thomas Huth We are going to remove obsolete assets from the cache, so keep the time stamps of the assets that we use up-to-date to have a way to detect stale assets later. Reviewed-by: Daniel P. Berrang=C3=A9 Signed-off-by: Thomas Huth Message-ID: <20251014083424.103202-2-thuth@redhat.com> --- tests/functional/qemu_test/asset.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/functional/qemu_test/asset.py b/tests/functional/qemu_te= st/asset.py index f666125bfaf..ab3a7bb591d 100644 --- a/tests/functional/qemu_test/asset.py +++ b/tests/functional/qemu_test/asset.py @@ -10,6 +10,7 @@ import os import stat import sys +import time import unittest import urllib.request from time import sleep @@ -113,6 +114,16 @@ def _wait_for_other_download(self, tmp_cache_file): self.log.debug("Time out while waiting for %s!", tmp_cache_file) raise =20 + def _save_time_stamp(self): + ''' + Update the time stamp of the asset in the cache. Unfortunately, we + cannot use the modification or access time of the asset file itsel= f, + since e.g. the functional jobs in the gitlab CI reload the files + from the gitlab cache and thus always have recent file time stamps, + so we have to save our asset time stamp to a separate file instead. + ''' + self.cache_file.with_suffix(".stamp").write_text(f"{int(time.time(= ))}") + def fetch(self): if not self.cache_dir.exists(): self.cache_dir.mkdir(parents=3DTrue, exist_ok=3DTrue) @@ -120,6 +131,7 @@ def fetch(self): if self.valid(): self.log.debug("Using cached asset %s for %s", self.cache_file, self.url) + self._save_time_stamp() return str(self.cache_file) =20 if not self.fetchable(): @@ -208,6 +220,7 @@ def fetch(self): tmp_cache_file.unlink() raise AssetError(self, "Hash does not match %s" % self.hash) tmp_cache_file.replace(self.cache_file) + self._save_time_stamp() # Remove write perms to stop tests accidentally modifying them os.chmod(self.cache_file, stat.S_IRUSR | stat.S_IRGRP) =20 --=20 2.51.0 From nobody Fri Nov 14 16:53:57 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1760632043; cv=none; d=zohomail.com; s=zohoarc; b=ihHWtIqcz5bJxlXpnfiuDVO2DUNrSGcXSUi57PkLbkIcjNHcin5xScwE5XhF7OiYTmejeJvO2i28VYFF9RFpLR2TphrXjB3l+xgXMnmk9sbBUIor06rSLEgHCRKOapvxcjlMgYsh8f4TQJADex09jLvBf4X8hswe1JHK45UfYTE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1760632043; 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=hhdDF9HFWQI4vYvSedK4wtW4ADB+GDFEdP59fuLVz9U=; b=RO5JLxJTTv980lu4EDObS/exDqbyjdQbLgdRt7l8QxyvaZ9PuKT2VwoFHSsmFFKWvpSG2eotUTJj4VoctaTLQbF5nDanDunTe4SZr5Jt50d8Vfovfht09RC30Icns15W8IkjT1o+6gaZ41BRS7vk/U5qjC5HRGJ2NC099xkFZpI= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1760632043421163.70413493633544; Thu, 16 Oct 2025 09:27:23 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1v9QoJ-00030c-65; Thu, 16 Oct 2025 12:26:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1v9QoF-0002ym-Uu for qemu-devel@nongnu.org; Thu, 16 Oct 2025 12:26:36 -0400 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 1v9Qo5-0004yo-0I for qemu-devel@nongnu.org; Thu, 16 Oct 2025 12:26:35 -0400 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-209-02PV2Vv6M56EIXFAswCwBg-1; Thu, 16 Oct 2025 12:26:18 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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 6590D18009C2; Thu, 16 Oct 2025 16:26:17 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.45.224.163]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 1AC93195419F; Thu, 16 Oct 2025 16:26:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1760631979; 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=hhdDF9HFWQI4vYvSedK4wtW4ADB+GDFEdP59fuLVz9U=; b=RIrVURtgf6M40d4+yHcXQ/RsLlfxn63sPQjf0zIx8KEGkZfT4FLgyo1ZWOAd6r3nQuTFea F9ZINe707F7KdfjdvHqjbhLIVsy9Gb58u/WG2AU+XcnVSYt20D18UCPcOJmw65zoBJkjNd H6XRiIwDkIqbZBcgL0iAy2zTqJPw+Tk= X-MC-Unique: 02PV2Vv6M56EIXFAswCwBg-1 X-Mimecast-MFC-AGG-ID: 02PV2Vv6M56EIXFAswCwBg_1760631977 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Richard Henderson , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PULL 05/10] tests: Evict stale files in the functional download cache after a while Date: Thu, 16 Oct 2025 18:25:56 +0200 Message-ID: <20251016162601.442557-6-thuth@redhat.com> In-Reply-To: <20251016162601.442557-1-thuth@redhat.com> References: <20251016162601.442557-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.17 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_PASS=-0.001, T_SPF_HELO_TEMPERROR=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1760632045519158500 From: Thomas Huth The download cache of the functional tests is currently only growing. But sometimes tests get removed or changed to use different assets, thus we should clean up the stale old assets after a while when they are not in use anymore. So add a script that looks at the time stamps of the assets and removes them if they haven't been touched for more than half of a year. Since there might also be some assets around that have been added to the cache before we added the time stamp files, assume a default time stamp that is close to the creation date of this patch, so that we don't delete these files too early (so we still have all assets around in case we have to bisect an issue in the recent past of QEMU). Reviewed-by: Daniel P. Berrang=C3=A9 Signed-off-by: Thomas Huth Message-ID: <20251014083424.103202-3-thuth@redhat.com> --- MAINTAINERS | 1 + scripts/clean_functional_cache.py | 45 +++++++++++++++++++++++++++++++ tests/Makefile.include | 1 + 3 files changed, 47 insertions(+) create mode 100755 scripts/clean_functional_cache.py diff --git a/MAINTAINERS b/MAINTAINERS index 0c766961f39..667acd933c7 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -4397,6 +4397,7 @@ M: Thomas Huth R: Philippe Mathieu-Daud=C3=A9 R: Daniel P. Berrange F: docs/devel/testing/functional.rst +F: scripts/clean_functional_cache.py F: tests/functional/qemu_test/ =20 Windows Hosted Continuous Integration diff --git a/scripts/clean_functional_cache.py b/scripts/clean_functional_c= ache.py new file mode 100755 index 00000000000..c3370ffbb87 --- /dev/null +++ b/scripts/clean_functional_cache.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +# +# SPDX-License-Identifier: GPL-2.0-or-later +# +"""Delete stale assets from the download cache of the functional tests""" + +import os +import stat +import sys +import time +from pathlib import Path + + +cache_dir_env =3D os.getenv('QEMU_TEST_CACHE_DIR') +if cache_dir_env: + cache_dir =3D Path(cache_dir_env, "download") +else: + cache_dir =3D Path(Path("~").expanduser(), ".cache", "qemu", "download= ") + +if not cache_dir.exists(): + print(f"Cache dir {cache_dir} does not exist!", file=3Dsys.stderr) + sys.exit(1) + +os.chdir(cache_dir) + +for file in cache_dir.iterdir(): + # Only consider the files that use a sha256 as filename: + if len(file.name) !=3D 64: + continue + + try: + timestamp =3D int(file.with_suffix(".stamp").read_text()) + except FileNotFoundError: + # Assume it's an old file that was already in the cache before we + # added the code for evicting stale assets. Use the release date + # of QEMU v10.1 as a default timestamp. + timestamp =3D time.mktime((2025, 8, 26, 0, 0, 0, 0, 0, 0)) + + age =3D time.time() - timestamp + + # Delete files older than half of a year (183 days * 24h * 60m * 60s) + if age > 15811200: + print(f"Removing {cache_dir}/{file.name}.") + file.chmod(stat.S_IWRITE) + file.unlink() diff --git a/tests/Makefile.include b/tests/Makefile.include index e47ef4d45c9..d4dfbf3716d 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -111,6 +111,7 @@ $(FUNCTIONAL_TARGETS): check-venv .PHONY: check-functional check-functional: check-venv @$(NINJA) precache-functional + @$(PYTHON) $(SRC_PATH)/scripts/clean_functional_cache.py @QEMU_TEST_NO_DOWNLOAD=3D1 $(MAKE) SPEED=3Dthorough check-func check-func= -quick =20 .PHONY: check-func check-func-quick --=20 2.51.0 From nobody Fri Nov 14 16:53:57 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1760632063; cv=none; d=zohomail.com; s=zohoarc; b=egYWo6mCqNkz4qQKkwtNgqfyRoZ+/5F6jr3ei9xSFC/nHcJnYwuj/yHcgl/3DvzuZQGiTp1m1e1joTYEDogi5ltPw5L9ZiodJ+ihnJNESEnk79ekr+xE2egtO7gUR0xSUbMVxAlA40g0Mi2LjR2V/tHS+3cPEZmb+NVbCxLe8Jg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1760632063; 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=FwjXqgta/3JQadpwlzqV+zZC8+l+IZd3T/vq2cpl2TU=; b=K7xfbPdJ0ceRusIF0tCMeN0OZeyaRaS09U1chg1NNao60tLtIXmXfr3wTpQnqcrhRpaV03PrXG2rnzTZNx05d7zcgzSDjjJbPFI48fEelW55KhGUCIqfIyCLsDvmNvYKrRgse45JcFjHRiuwmWk5cyvGdlp2PsaWHwTLr2hA2+M= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1760632063279539.7965211673072; Thu, 16 Oct 2025 09:27:43 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1v9QoJ-00030T-7G; Thu, 16 Oct 2025 12:26:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1v9QoB-0002xW-Mi for qemu-devel@nongnu.org; Thu, 16 Oct 2025 12:26:33 -0400 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 1v9Qo6-0004zk-I1 for qemu-devel@nongnu.org; Thu, 16 Oct 2025 12:26:31 -0400 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-198-nBhF1_qiO4yKxUeIcTLIIw-1; Thu, 16 Oct 2025 12:26:20 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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 208ED18002E4; Thu, 16 Oct 2025 16:26:19 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.45.224.163]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 025C81956056; Thu, 16 Oct 2025 16:26:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1760631983; 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=FwjXqgta/3JQadpwlzqV+zZC8+l+IZd3T/vq2cpl2TU=; b=E83OyN+Csf4eGkGGPLCPoMSUvQUHln+Z29QC0XbhO5Csf53isgHbxmp6DzbVBlX1njiKzB yxMUxxULpQZpPSizNk/CauWTOM74dQtR6hxcNFPDnhIwsvt2DPCXQN2yGnbGfkMmno4ej5 fcc0P/Bl8EA2gMSg/sG+0osN/BTYazM= X-MC-Unique: nBhF1_qiO4yKxUeIcTLIIw-1 X-Mimecast-MFC-AGG-ID: nBhF1_qiO4yKxUeIcTLIIw_1760631979 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Richard Henderson Subject: [PULL 06/10] tests/functional/alpha: Remove superfluous fetch() line from the clipper test Date: Thu, 16 Oct 2025 18:25:57 +0200 Message-ID: <20251016162601.442557-7-thuth@redhat.com> In-Reply-To: <20251016162601.442557-1-thuth@redhat.com> References: <20251016162601.442557-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-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: 1760632071601158500 Content-Type: text/plain; charset="utf-8" From: Thomas Huth The kernel asset is retrieved automatically via the uncompress() line below the fetch(), so the fetch() is simply not necessary here. Reviewed-by: Richard Henderson Signed-off-by: Thomas Huth Message-ID: <20251010144525.842462-1-thuth@redhat.com> --- tests/functional/alpha/test_clipper.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/functional/alpha/test_clipper.py b/tests/functional/alph= a/test_clipper.py index c5d71819531..d2a4c2a4ed9 100755 --- a/tests/functional/alpha/test_clipper.py +++ b/tests/functional/alpha/test_clipper.py @@ -17,7 +17,6 @@ class AlphaClipperTest(LinuxKernelTest): =20 def test_alpha_clipper(self): self.set_machine('clipper') - kernel_path =3D self.ASSET_KERNEL.fetch() =20 uncompressed_kernel =3D self.uncompress(self.ASSET_KERNEL, format= =3D"gz") =20 --=20 2.51.0 From nobody Fri Nov 14 16:53:57 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1760632113; cv=none; d=zohomail.com; s=zohoarc; b=BeqPvog5ktbaSjquz3Fp7wp2G5UkVrttOg05AuD8JDcoIe2ZnMgooJmtzN99RFt+IMsrzxTmjfe9A+UZt7WePsbPIHIHxDJjDCPkX4oCg5pJbF8iJ+ih67G7QKHga6fEcUXvmFEl7oZFu7sJzvbYwbK8DiaKNt6InA0rFMO50/k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1760632113; 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=QtN1gEVENajxWp6NZhSyM1+vgWcBVX2W5yJs8hO3NZU=; b=ZgsGhDs7yZJJBWMp1H8m0Rsu1EZZz6O8r+0jUKTsMK01FlQGtzKlp/FQjpCVT+brQ5cMvDagSvsiI/1uQhiZJb/mIdBIHJap3zGYTQuIAVkgOEkIibbrm2pIfDlF7P+IRGsaSWDrZX2NCWxrPpl2rra2DQL3fbhDUbjHsUUSPtA= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1760632113175372.4712863898145; Thu, 16 Oct 2025 09:28:33 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1v9QoR-0003Aw-Q0; Thu, 16 Oct 2025 12:26:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1v9QoF-0002yl-U5 for qemu-devel@nongnu.org; Thu, 16 Oct 2025 12:26:36 -0400 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 1v9Qo9-000502-AL for qemu-devel@nongnu.org; Thu, 16 Oct 2025 12:26:35 -0400 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-92-G9CHJ8P9MyK5GrqNJfsICw-1; Thu, 16 Oct 2025 12:26:22 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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 6773B180057A; Thu, 16 Oct 2025 16:26:21 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.45.224.163]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id C4E931956056; Thu, 16 Oct 2025 16:26:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1760631983; 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=QtN1gEVENajxWp6NZhSyM1+vgWcBVX2W5yJs8hO3NZU=; b=F2A6bk9tQ0XNq0Q4JPadHpw7CydpV2zCaZp/ptf+1wIY2NYlrEIYq9XSv8u2YK8q3IOPwP 0ZlHvsBfyizfXQu3VMNWwkYljkOEm6eI5DNBSjMYNRS2bXvia9dzlo8qRgq5OUyn5PpADI SxRqelWPRjfGfJiJa0vaOcjLhOYZPBo= X-MC-Unique: G9CHJ8P9MyK5GrqNJfsICw-1 X-Mimecast-MFC-AGG-ID: G9CHJ8P9MyK5GrqNJfsICw_1760631981 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Richard Henderson , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PULL 07/10] tests/functional: remove use of getLogger in reverse debuging Date: Thu, 16 Oct 2025 18:25:58 +0200 Message-ID: <20251016162601.442557-8-thuth@redhat.com> In-Reply-To: <20251016162601.442557-1-thuth@redhat.com> References: <20251016162601.442557-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.17 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-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: 1760632115526154100 From: Daniel P. Berrang=C3=A9 This fixes the gap left by commit 8a44d8c2ac0921c8064fbfd00ef28e3a2588918e Author: Daniel P. Berrang=C3=A9 Date: Fri Sep 12 19:22:00 2025 +0100 tests/functional: use self.log for all logging ensuring that log message from the reverse debugging test actually make it into the logfile on disk. Signed-off-by: Daniel P. Berrang=C3=A9 Message-ID: <20251014140047.385347-2-berrange@redhat.com> Reviewed-by: Thomas Huth Tested-by: Thomas Huth Signed-off-by: Thomas Huth --- tests/functional/reverse_debugging.py | 49 ++++++++++++--------------- 1 file changed, 22 insertions(+), 27 deletions(-) diff --git a/tests/functional/reverse_debugging.py b/tests/functional/rever= se_debugging.py index 68cfcb39856..2c37a62cd06 100644 --- a/tests/functional/reverse_debugging.py +++ b/tests/functional/reverse_debugging.py @@ -36,14 +36,13 @@ class ReverseDebugging(LinuxKernelTest): STEPS =3D 10 =20 def run_vm(self, record, shift, args, replay_path, image_path, port): - logger =3D logging.getLogger('replay') vm =3D self.get_vm(name=3D'record' if record else 'replay') vm.set_console() if record: - logger.info('recording the execution...') + self.log.info('recording the execution...') mode =3D 'record' else: - logger.info('replaying the execution...') + self.log.info('replaying the execution...') mode =3D 'replay' vm.add_args('-gdb', 'tcp::%d' % port, '-S') vm.add_args('-icount', 'shift=3D%s,rr=3D%s,rrfile=3D%s,rrsnapshot= =3Dinit' % @@ -68,10 +67,8 @@ def vm_get_icount(vm): def reverse_debugging(self, gdb_arch, shift=3D7, args=3DNone): from qemu_test import GDB =20 - logger =3D logging.getLogger('replay') - # create qcow2 for snapshots - logger.info('creating qcow2 image for VM snapshots') + self.log.info('creating qcow2 image for VM snapshots') image_path =3D os.path.join(self.workdir, 'disk.qcow2') qemu_img =3D get_qemu_img(self) if qemu_img is None: @@ -79,7 +76,7 @@ def reverse_debugging(self, gdb_arch, shift=3D7, args=3DN= one): 'create the temporary qcow2 image') out =3D check_output([qemu_img, 'create', '-f', 'qcow2', image_pat= h, '128M'], encoding=3D'utf8') - logger.info("qemu-img: %s" % out) + self.log.info("qemu-img: %s" % out) =20 replay_path =3D os.path.join(self.workdir, 'replay.bin') =20 @@ -90,7 +87,7 @@ def reverse_debugging(self, gdb_arch, shift=3D7, args=3DN= one): last_icount =3D self.vm_get_icount(vm) vm.shutdown() =20 - logger.info("recorded log with %s+ steps" % last_icount) + self.log.info("recorded log with %s+ steps" % last_icount) =20 # replay and run debug commands with Ports() as ports: @@ -98,9 +95,9 @@ def reverse_debugging(self, gdb_arch, shift=3D7, args=3DN= one): vm =3D self.run_vm(False, shift, args, replay_path, image_path= , port) =20 try: - logger.info('Connecting to gdbstub...') + self.log.info('Connecting to gdbstub...') self.reverse_debugging_run(vm, port, gdb_arch, last_icount) - logger.info('Test passed.') + self.log.info('Test passed.') except GDB.TimeoutError: # Convert a GDB timeout exception into a unittest failure exce= ption. raise self.failureException("Timeout while connecting to or " @@ -111,8 +108,6 @@ def reverse_debugging(self, gdb_arch, shift=3D7, args= =3DNone): raise =20 def reverse_debugging_run(self, vm, port, gdb_arch, last_icount): - logger =3D logging.getLogger('replay') - gdb_cmd =3D os.getenv('QEMU_TEST_GDB') gdb =3D GDB(gdb_cmd) =20 @@ -135,43 +130,43 @@ def reverse_debugging_run(self, vm, port, gdb_arch, l= ast_icount): =20 gdb.cli("set debug remote 0") =20 - logger.info('stepping forward') + self.log.info('stepping forward') steps =3D [] # record first instruction addresses for _ in range(self.STEPS): pc =3D self.get_pc(gdb) - logger.info('saving position %x' % pc) + self.log.info('saving position %x' % pc) steps.append(pc) gdb.cli("stepi") =20 # visit the recorded instruction in reverse order - logger.info('stepping backward') + self.log.info('stepping backward') for addr in steps[::-1]: - logger.info('found position %x' % addr) + self.log.info('found position %x' % addr) gdb.cli("reverse-stepi") pc =3D self.get_pc(gdb) if pc !=3D addr: - logger.info('Invalid PC (read %x instead of %x)' % (pc, ad= dr)) + self.log.info('Invalid PC (read %x instead of %x)' % (pc, = addr)) self.fail('Reverse stepping failed!') =20 # visit the recorded instruction in forward order - logger.info('stepping forward') + self.log.info('stepping forward') for addr in steps: - logger.info('found position %x' % addr) + self.log.info('found position %x' % addr) pc =3D self.get_pc(gdb) if pc !=3D addr: - logger.info('Invalid PC (read %x instead of %x)' % (pc, ad= dr)) + self.log.info('Invalid PC (read %x instead of %x)' % (pc, = addr)) self.fail('Forward stepping failed!') gdb.cli("stepi") =20 # set breakpoints for the instructions just stepped over - logger.info('setting breakpoints') + self.log.info('setting breakpoints') for addr in steps: gdb.cli(f"break *{hex(addr)}") =20 # this may hit a breakpoint if first instructions are executed # again - logger.info('continuing execution') + self.log.info('continuing execution') vm.qmp('replay-break', icount=3Dlast_icount - 1) # continue - will return after pausing # This can stop at the end of the replay-break and gdb gets a SIGI= NT, @@ -180,12 +175,12 @@ def reverse_debugging_run(self, vm, port, gdb_arch, l= ast_icount): gdb.cli("continue") =20 if self.vm_get_icount(vm) =3D=3D last_icount - 1: - logger.info('reached the end (icount %s)' % (last_icount - 1)) + self.log.info('reached the end (icount %s)' % (last_icount - 1= )) else: - logger.info('hit a breakpoint again at %x (icount %s)' % + self.log.info('hit a breakpoint again at %x (icount %s)' % (self.get_pc(gdb), self.vm_get_icount(vm))) =20 - logger.info('running reverse continue to reach %x' % steps[-1]) + self.log.info('running reverse continue to reach %x' % steps[-1]) # reverse continue - will return after stopping at the breakpoint gdb.cli("reverse-continue") =20 @@ -195,8 +190,8 @@ def reverse_debugging_run(self, vm, port, gdb_arch, las= t_icount): if pc !=3D steps[-1]: self.fail("'reverse-continue' did not hit the first PC in reve= rse order!") =20 - logger.info('successfully reached %x' % steps[-1]) + self.log.info('successfully reached %x' % steps[-1]) =20 - logger.info('exiting gdb and qemu') + self.log.info('exiting gdb and qemu') gdb.exit() vm.shutdown() --=20 2.51.0 From nobody Fri Nov 14 16:53:57 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1760632114; cv=none; d=zohomail.com; s=zohoarc; b=HPCjVO+eQihcUdUQY4uqklnBP7KaZk4/34oXj0a+52fidjbZLINobK+PHuojQZcXmZ5JqIEIi44kofZaiXOCOme+DrmmpYqWrlyYBuoKTlGfWD5cOJQKunvAfz1Fw3OqP+ein7WwBLSjEGhbh2tAzKjJeb7ftyaXmSkEl5bYjYY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1760632114; 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=/tlXzgBzM8e2qGuGsn/nSQgKG9h2gm308BZ+u3+MbPQ=; b=jfbajH7KwXQzJ2of2wbzNpbL0RN7tAH8KL5WxYJpGDmsjspyj+7OcHub0K/COTXb03w8/IEo6tXxiec4i9cY3+zS0VPo/iNMYTDLwR3DDd+Yj+y9TkeN9icfFxR5Lz7pXASSDOHquoL7OtgD4iVAEBbcIrdOAr5z/Zki4U/lac8= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1760632114035267.0930615419378; Thu, 16 Oct 2025 09:28:34 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1v9QoR-00038v-1r; Thu, 16 Oct 2025 12:26:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1v9QoJ-00030f-8F for qemu-devel@nongnu.org; Thu, 16 Oct 2025 12:26:40 -0400 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 1v9QoC-000521-EY for qemu-devel@nongnu.org; Thu, 16 Oct 2025 12:26:38 -0400 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-670-jX_VSIKOOnmCBmvalqthMQ-1; Thu, 16 Oct 2025 12:26:24 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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 673681800675; Thu, 16 Oct 2025 16:26:23 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.45.224.163]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id DEFC41956056; Thu, 16 Oct 2025 16:26:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1760631988; 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=/tlXzgBzM8e2qGuGsn/nSQgKG9h2gm308BZ+u3+MbPQ=; b=To2/gmRIjnfS5VGyXlaEsivY2xfh8BDdRqiv3BVHNkdwmadETFlZfUMbNQjIpPQ4SIYGFH 2K/MJXxOf0VlpibdEBrJsuTxwcpuRq42vfIHOfMo8AUdztMuJ5cCSFxaPZOEGM3U53eZkT lt/FDbupK6cGGrcrt+3waEJOHGE20ns= X-MC-Unique: jX_VSIKOOnmCBmvalqthMQ-1 X-Mimecast-MFC-AGG-ID: jX_VSIKOOnmCBmvalqthMQ_1760631983 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Richard Henderson , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PULL 08/10] tests/functional: ensure GDB client is stopped on error Date: Thu, 16 Oct 2025 18:25:59 +0200 Message-ID: <20251016162601.442557-9-thuth@redhat.com> In-Reply-To: <20251016162601.442557-1-thuth@redhat.com> References: <20251016162601.442557-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.17 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-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: 1760632116098158500 From: Daniel P. Berrang=C3=A9 If the reverse_debugging_run method fails, the GDB client will not be closed resulting in python complaining about resource leaks. Hoisting the GDB client creation into the caller allows this to be cleaned up easily. While doing this, also move the VM shutdown call to match. Signed-off-by: Daniel P. Berrang=C3=A9 Message-ID: <20251014140047.385347-3-berrange@redhat.com> Reviewed-by: Thomas Huth Signed-off-by: Thomas Huth --- tests/functional/reverse_debugging.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/functional/reverse_debugging.py b/tests/functional/rever= se_debugging.py index 2c37a62cd06..86fca8d81f1 100644 --- a/tests/functional/reverse_debugging.py +++ b/tests/functional/reverse_debugging.py @@ -96,7 +96,14 @@ def reverse_debugging(self, gdb_arch, shift=3D7, args=3D= None): =20 try: self.log.info('Connecting to gdbstub...') - self.reverse_debugging_run(vm, port, gdb_arch, last_icount) + gdb_cmd =3D os.getenv('QEMU_TEST_GDB') + gdb =3D GDB(gdb_cmd) + try: + self.reverse_debugging_run(gdb, vm, port, gdb_arch, last_i= count) + finally: + self.log.info('exiting gdb and qemu') + gdb.exit() + vm.shutdown() self.log.info('Test passed.') except GDB.TimeoutError: # Convert a GDB timeout exception into a unittest failure exce= ption. @@ -107,10 +114,7 @@ def reverse_debugging(self, gdb_arch, shift=3D7, args= =3DNone): # skipTest(), etc. raise =20 - def reverse_debugging_run(self, vm, port, gdb_arch, last_icount): - gdb_cmd =3D os.getenv('QEMU_TEST_GDB') - gdb =3D GDB(gdb_cmd) - + def reverse_debugging_run(self, gdb, vm, port, gdb_arch, last_icount): r =3D gdb.cli("set architecture").get_log() if gdb_arch not in r: self.skipTest(f"GDB does not support arch '{gdb_arch}'") @@ -191,7 +195,3 @@ def reverse_debugging_run(self, vm, port, gdb_arch, las= t_icount): self.fail("'reverse-continue' did not hit the first PC in reve= rse order!") =20 self.log.info('successfully reached %x' % steps[-1]) - - self.log.info('exiting gdb and qemu') - gdb.exit() - vm.shutdown() --=20 2.51.0 From nobody Fri Nov 14 16:53:57 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1760632109; cv=none; d=zohomail.com; s=zohoarc; b=hox+KoGdJfD6LNjz+XuXCu/ZulGkl5Noml25cGSU0rl3HwsO2HLlGoF+vALTW3XWetkM8/rpZspIHxsph32q0KowKiopUdgMNN2I+0TjVG8OTND5j6MOOQyVASpsEwpppEhw+fHb4IL2Y++wrriQEuL76kBXkL/9zX0f+soaMao= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1760632109; 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=RU7Man4KnRGIbs9jMvnj9ufvxV6EUPeaR+Ae0LV/CMk=; b=n1nZUE7l+2hwpy60fPzjB4kNpWbm0BxTh4z+ua+5EP4/LjQapvi3kKA3Gs9eC9xn/TsEnimbVoDX+GYo7XVnc5DlFbZVK63rxt/XE3YesCOr3p0pMfNJ+46bg2+ktEsYBQdfh82/XHcvsmzBhwPFqGGjBBAjt+hU2yqGuGDVQSE= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1760632109258568.9568330370934; Thu, 16 Oct 2025 09:28:29 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1v9QoV-0003GS-KB; Thu, 16 Oct 2025 12:26:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1v9QoJ-00031E-Tk for qemu-devel@nongnu.org; Thu, 16 Oct 2025 12:26:40 -0400 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 1v9QoC-00052O-Qp for qemu-devel@nongnu.org; Thu, 16 Oct 2025 12:26:39 -0400 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-688-GPgSTenWN-SFRTepFfT9oQ-1; Thu, 16 Oct 2025 12:26:26 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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 299FF18002C1; Thu, 16 Oct 2025 16:26:25 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.45.224.163]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id DBDDD1956056; Thu, 16 Oct 2025 16:26:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1760631989; 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=RU7Man4KnRGIbs9jMvnj9ufvxV6EUPeaR+Ae0LV/CMk=; b=Hu946loDZ9z6tnUuUJO+4hgLFEfyzHxkPx/Azn39BqcbhsPGPUhbNtmqVbUPo2ULje4A18 qf2bIhjCd/OyatcnJ+8v/PCYpassWjJsmExuhE2xM8hpOUPBSPKQ0gEfVtxyUhWpInqdTa hTN/nHB0aiKbhdXtEFIcMaH1XaF5qrs= X-MC-Unique: GPgSTenWN-SFRTepFfT9oQ-1 X-Mimecast-MFC-AGG-ID: GPgSTenWN-SFRTepFfT9oQ_1760631985 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 09/10] target/s390x/mmu_helper: Simplify s390_cpu_virt_mem_rw() logic Date: Thu, 16 Oct 2025 18:26:00 +0200 Message-ID: <20251016162601.442557-10-thuth@redhat.com> In-Reply-To: <20251016162601.442557-1-thuth@redhat.com> References: <20251016162601.442557-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.17 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, T_SPF_TEMPERROR=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1760632111415154100 From: Philippe Mathieu-Daud=C3=A9 In order to simplify the next commit, move the trigger_access_exception() call after the address_space_rw() calls. No logical change intended. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Thomas Huth Message-ID: <20251008141410.99865-2-philmd@linaro.org> Signed-off-by: Thomas Huth --- target/s390x/mmu_helper.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/target/s390x/mmu_helper.c b/target/s390x/mmu_helper.c index 487c41bf933..22d3d4a97df 100644 --- a/target/s390x/mmu_helper.c +++ b/target/s390x/mmu_helper.c @@ -541,9 +541,7 @@ int s390_cpu_virt_mem_rw(S390CPU *cpu, vaddr laddr, uin= t8_t ar, void *hostbuf, pages =3D g_malloc(nr_pages * sizeof(*pages)); =20 ret =3D translate_pages(cpu, laddr, nr_pages, pages, is_write, &tec); - if (ret) { - trigger_access_exception(&cpu->env, ret, tec); - } else if (hostbuf !=3D NULL) { + if (ret =3D=3D 0 && hostbuf !=3D NULL) { AddressSpace *as =3D CPU(cpu)->as; =20 /* Copy data by stepping through the area page by page */ @@ -556,6 +554,9 @@ int s390_cpu_virt_mem_rw(S390CPU *cpu, vaddr laddr, uin= t8_t ar, void *hostbuf, len -=3D currlen; } } + if (ret) { + trigger_access_exception(&cpu->env, ret, tec); + } =20 g_free(pages); return ret; --=20 2.51.0 From nobody Fri Nov 14 16:53:57 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1760632098; cv=none; d=zohomail.com; s=zohoarc; b=Fx52eqOJ1XELLFs9wIhxWQb469IsFVvG5xIXGfqrjFdaGBDTtHkA3QEOcEQ1RLAXOmY1+qW+ynfBOWzhIT1Zuap3a7wcXNb8pvSGaFEtnRf7WrEINY7Ly17G4cpqDXlJmvEwbuzZwkG5/EOGQnA5Gk0aKXZaL/mNuopPT5ZYQVc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1760632098; 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=qg+aEQLCOkOWKOXPdI6dTmOzNV3C+Fpc5ZoQynQAQDg=; b=nC5r0G98q368UdsCQXJ2ks7+Chor6x7wrKXnC7AV5CjQQxSyMDUfjDbaq92bk+4RAoJk5bWvUpHKEhIkw/RvA7P6Q21RjbxU0oOTsTFrOJTxY+kLlPTQX8YE2svc5CS0w6FafnvX3eDNjLlVw4CiZyB6cqQeSAwaUeDeLc2i6Z4= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1760632098339595.5077549339201; Thu, 16 Oct 2025 09:28:18 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1v9QoO-00032D-Sp; Thu, 16 Oct 2025 12:26:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1v9QoI-00030d-DC for qemu-devel@nongnu.org; Thu, 16 Oct 2025 12:26:39 -0400 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 1v9QoC-00052s-RU for qemu-devel@nongnu.org; Thu, 16 Oct 2025 12:26:38 -0400 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-373-k9DDIoBuNRCZk-Gi01eiMQ-1; Thu, 16 Oct 2025 12:26:28 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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 0A297180035A; Thu, 16 Oct 2025 16:26:27 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.45.224.163]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 9EA551956056; Thu, 16 Oct 2025 16:26:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1760631991; 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=qg+aEQLCOkOWKOXPdI6dTmOzNV3C+Fpc5ZoQynQAQDg=; b=dn+vC/AiwIagDoclMuhso4O43euFNsJN8ZSm6uExlQZLNxy8DblZuN4/qk7fN0LZfaPX2C 1EzXTsWR8IYuosv0u0kEjHukcZ3QhjdwBiwuBXM5it+oZfhgVSjIL50WlkzxvQAgr8lq4X 9hEyRKl78iF7owzbGzp9GWbvvu+fPnI= X-MC-Unique: k9DDIoBuNRCZk-Gi01eiMQ-1 X-Mimecast-MFC-AGG-ID: k9DDIoBuNRCZk-Gi01eiMQ_1760631987 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 10/10] target/s390x/mmu_helper: Do not ignore address_space_rw() errors Date: Thu, 16 Oct 2025 18:26:01 +0200 Message-ID: <20251016162601.442557-11-thuth@redhat.com> In-Reply-To: <20251016162601.442557-1-thuth@redhat.com> References: <20251016162601.442557-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.17 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-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: 1760632101550154100 From: Philippe Mathieu-Daud=C3=A9 If a address_space_rw() call ever fails, break the loop and return the PGM_ADDRESSING error (after triggering an access exception). Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20251008141410.99865-3-philmd@linaro.org> Reviewed-by: Thomas Huth Signed-off-by: Thomas Huth --- target/s390x/mmu_helper.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/target/s390x/mmu_helper.c b/target/s390x/mmu_helper.c index 22d3d4a97df..3b1e75f7833 100644 --- a/target/s390x/mmu_helper.c +++ b/target/s390x/mmu_helper.c @@ -546,9 +546,15 @@ int s390_cpu_virt_mem_rw(S390CPU *cpu, vaddr laddr, ui= nt8_t ar, void *hostbuf, =20 /* Copy data by stepping through the area page by page */ for (i =3D 0; i < nr_pages; i++) { + MemTxResult res; + currlen =3D MIN(len, TARGET_PAGE_SIZE - (laddr % TARGET_PAGE_S= IZE)); - address_space_rw(as, pages[i] | (laddr & ~TARGET_PAGE_MASK), - attrs, hostbuf, currlen, is_write); + res =3D address_space_rw(as, pages[i] | (laddr & ~TARGET_PAGE_= MASK), + attrs, hostbuf, currlen, is_write); + if (res !=3D MEMTX_OK) { + ret =3D PGM_ADDRESSING; + break; + } laddr +=3D currlen; hostbuf +=3D currlen; len -=3D currlen; --=20 2.51.0