From nobody Thu Apr 2 04:23:57 2026 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=1774866531; cv=none; d=zohomail.com; s=zohoarc; b=d+3T6E1WkfRpqpxXv8mxAiqwtPVHsIr/eygIP6KW+YvQRfqgrMhI6l6hLIlPxDyCFxhqZa/6Sor5tbq0FoJKaHtgJAhdWocGuRYLhTzFQYZDfhQdGSC6oqqWgRptfWOZvpezhJ0JnFJIVck4bitFgCikvSKjHHC5oCwasANkjSw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1774866531; 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=ZzLI3i6RBHWPskf4fOd5vHu0dONnrjAKnFaoAf5UPjI=; b=RTlGiDVJzTSH7WE1lLNePUemD8VV52kcrKvFnhDctdgL2WWjfpfBXxhtYlfLBb4twUKB26HzgQE7R4ZpbciYveAcF61r/a88qI3EyE5kTQqZ8HWmpikxOiiAV1O8ikAD7A+AuIXzpX5RL/7DAYxMTmtYSxiKEBUSjyP0cef9Whg= 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 1774866531198915.0943695124671; Mon, 30 Mar 2026 03:28:51 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w79rM-00016E-9v; Mon, 30 Mar 2026 06:28:41 -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 1w79rA-000143-J3 for qemu-devel@nongnu.org; Mon, 30 Mar 2026 06:28:29 -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 1w79r8-0005DH-FP for qemu-devel@nongnu.org; Mon, 30 Mar 2026 06:28:28 -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-590-6bZCYok2Mwib60jHzdHliQ-1; Mon, 30 Mar 2026 06:28:22 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (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 224991800283; Mon, 30 Mar 2026 10:28:21 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.44.35.14]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id D8B4830001A1; Mon, 30 Mar 2026 10:28:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1774866505; 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=ZzLI3i6RBHWPskf4fOd5vHu0dONnrjAKnFaoAf5UPjI=; b=c2HkHd9iJ2SOMQFW+hZlQONIb0cUTgfU6466G3v1vl4ytxhscfh4ig506CinVK5MHH3EGP 9jP8GlsHBPVYP6bIebP3kkmta6ht8NEVB8ZD8M8HSlkCIIotVDar4zL+kTcc1ldtavjZrT fx4D16HPUBUALGM0AKMqpSrG7g14Fd4= X-MC-Unique: 6bZCYok2Mwib60jHzdHliQ-1 X-Mimecast-MFC-AGG-ID: 6bZCYok2Mwib60jHzdHliQ_1774866501 From: Thomas Huth To: Peter Maydell Cc: qemu-devel@nongnu.org Subject: [PULL 1/7] tests/functional/qemu_test: Silence (most) warnings from pylint in asset.py Date: Mon, 30 Mar 2026 12:28:09 +0200 Message-ID: <20260330102815.6759-2-thuth@redhat.com> In-Reply-To: <20260330102815.6759-1-thuth@redhat.com> References: <20260330102815.6759-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 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: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54, 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.01, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=1, RCVD_IN_VALIDITY_RPBL_BLOCKED=1, 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: qemu development 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: 1774866532989154100 Content-Type: text/plain; charset="utf-8" From: Thomas Huth Pylint currently complains: asset.py:1:0: C0114: Missing module docstring (missing-module-docstring) asset.py:21:0: C0115: Missing class docstring (missing-class-docstring) asset.py:28:15: C0209: Formatting a regular string which could be an f-str= ing (consider-using-f-string) asset.py:34:0: C0115: Missing class docstring (missing-class-docstring) asset.py:49:15: C0209: Formatting a regular string which could be an f-str= ing (consider-using-f-string) asset.py:73:4: C0116: Missing function or method docstring (missing-functi= on-docstring) asset.py:80:4: C0116: Missing function or method docstring (missing-functi= on-docstring) asset.py:83:4: C0116: Missing function or method docstring (missing-functi= on-docstring) asset.py:125:4: C0116: Missing function or method docstring (missing-funct= ion-docstring) asset.py:181:43: C0209: Formatting a regular string which could be an f-st= ring (consider-using-f-string) asset.py:190:39: C0209: Formatting a regular string which could be an f-st= ring (consider-using-f-string) asset.py:201:39: C0209: Formatting a regular string which could be an f-st= ring (consider-using-f-string) asset.py:213:15: W0718: Catching too general exception Exception (broad-ex= ception-caught) asset.py:218:35: C0209: Formatting a regular string which could be an f-st= ring (consider-using-f-string) asset.py:125:4: R0912: Too many branches (16/12) (too-many-branches) asset.py:125:4: R0915: Too many statements (64/50) (too-many-statements) asset.py:228:4: C0116: Missing function or method docstring (missing-funct= ion-docstring) asset.py:249:4: C0116: Missing function or method docstring (missing-funct= ion-docstring) asset.py:257:4: C0116: Missing function or method docstring (missing-funct= ion-docstring) Fix all the warnings except for the R0912 and R0915 which will be tackled in a later commit. And while we're at it, also add a proper SPDX license identifier. Signed-off-by: Thomas Huth Message-ID: <20260324163543.55503-3-thuth@redhat.com> --- tests/functional/qemu_test/asset.py | 53 +++++++++++++++++++++-------- 1 file changed, 38 insertions(+), 15 deletions(-) diff --git a/tests/functional/qemu_test/asset.py b/tests/functional/qemu_te= st/asset.py index 45a2e01e2e6..1cd03c2a9a9 100644 --- a/tests/functional/qemu_test/asset.py +++ b/tests/functional/qemu_test/asset.py @@ -1,9 +1,12 @@ -# Test utilities for fetching & caching assets +# SPDX-License-Identifier: GPL-2.0-or-later # # Copyright 2024 Red Hat, Inc. # # This work is licensed under the terms of the GNU GPL, version 2 or # later. See the COPYING file in the top-level directory. +''' +Test utilities for fetching & caching assets +''' =20 import hashlib import logging @@ -18,21 +21,27 @@ from shutil import copyfileobj from urllib.error import HTTPError, URLError =20 + class AssetError(Exception): + '''This exception will be raised if an asset is not usable''' def __init__(self, asset, msg, transient=3DFalse): self.url =3D asset.url self.msg =3D msg self.transient =3D transient =20 def __str__(self): - return "%s: %s" % (self.url, self.msg) + return f"{self.url}: {self.msg}" =20 -# Instances of this class must be declared as class level variables -# starting with a name "ASSET_". This enables the pre-caching logic -# to easily find all referenced assets and download them prior to -# execution of the tests. -class Asset: =20 +class Asset: + ''' + This class is used to represent an asset that gets downloaded from + the internet and will be stored in the local asset cache. + Instances of this class must be declared as class level variables + starting with a name "ASSET_". This enables the pre-caching logic + to easily find all referenced assets and download them prior to + execution of the tests. + ''' def __init__(self, url, hashsum): self.url =3D url self.hash =3D hashsum @@ -46,8 +55,7 @@ def __init__(self, url, hashsum): self.log =3D logging.getLogger('qemu-test') =20 def __repr__(self): - return "Asset: url=3D%s hash=3D%s cache=3D%s" % ( - self.url, self.hash, self.cache_file) + return f"Asset: url=3D{self.url} hash=3D{self.hash} cache=3D{self.= cache_file}" =20 def __str__(self): return str(self.cache_file) @@ -71,6 +79,7 @@ def _check(self, cache_file): return self.hash =3D=3D hl.hexdigest() =20 def valid(self): + '''Check whether the file exists in the cache and has the right ha= sh''' if os.getenv("QEMU_TEST_REFRESH_CACHE", None) is not None: self.log.info("Force refresh of asset %s", self.url) return False @@ -78,9 +87,11 @@ def valid(self): return self.cache_file.exists() and self._check(self.cache_file) =20 def fetchable(self): + '''Check whether we are allowed to download assets from the intern= et''' return not os.environ.get("QEMU_TEST_NO_DOWNLOAD", False) =20 def available(self): + '''Check whether the asset is either in the cache or fetchable''' return self.valid() or self.fetchable() =20 def _wait_for_other_download(self, tmp_cache_file): @@ -123,6 +134,7 @@ def _save_time_stamp(self): self.cache_file.with_suffix(".stamp").write_text(f"{int(time.time(= ))}") =20 def fetch(self): + '''Download the asset from the internet''' if not self.cache_dir.exists(): self.cache_dir.mkdir(parents=3DTrue, exist_ok=3DTrue) =20 @@ -179,7 +191,7 @@ def fetch(self): # server or networking problem if e.code =3D=3D 404: raise AssetError(self, "Unable to download: " - "HTTP error %d" % e.code) from e + f"HTTP error {e.code}") from e continue except URLError as e: # This is typically a network/service level error @@ -187,8 +199,9 @@ def fetch(self): tmp_cache_file.unlink() self.log.error("Unable to download %s: URL error %s", self.url, e.reason) - raise AssetError(self, "Unable to download: URL error %s" % - e.reason, transient=3DTrue) from e + raise AssetError(self, + f"Unable to download: URL error{e.reason}= ", + transient=3DTrue) from e except ConnectionError as e: # A socket connection failure, such as dropped conn # or refused conn @@ -198,7 +211,7 @@ def fetch(self): continue except Exception as e: tmp_cache_file.unlink() - raise AssetError(self, "Unable to download: %s" % e, + raise AssetError(self, f"Unable to download: {e}", transient=3DTrue) from e =20 if not os.path.exists(tmp_cache_file): @@ -210,12 +223,12 @@ def fetch(self): self.url.encode('utf8')) os.setxattr(str(tmp_cache_file), "user.qemu-asset-hash", self.hash.encode('utf8')) - except Exception as e: + except OSError as e: self.log.debug("Unable to set xattr on %s: %s", tmp_cache_file= , e) =20 if not self._check(tmp_cache_file): tmp_cache_file.unlink() - raise AssetError(self, "Hash does not match %s" % self.hash) + raise AssetError(self, f"Hash does not match {self.hash}") tmp_cache_file.replace(self.cache_file) self._save_time_stamp() # Remove write perms to stop tests accidentally modifying them @@ -226,6 +239,10 @@ def fetch(self): =20 @staticmethod def precache_test(test): + ''' + Look for variables starting with "ASSET_" and try to fetch the ass= et + that is specified there. + ''' log =3D logging.getLogger('qemu-test') log.setLevel(logging.DEBUG) handler =3D logging.StreamHandler(sys.stdout) @@ -247,6 +264,9 @@ def precache_test(test): =20 @staticmethod def precache_suite(suite): + ''' + Iterate through all tests/suites in a suite and precache their ass= ets + ''' for test in suite: if isinstance(test, unittest.TestSuite): Asset.precache_suite(test) @@ -255,6 +275,9 @@ def precache_suite(suite): =20 @staticmethod def precache_suites(path, cache_tstamp): + ''' + Get the available test suite and precache their assets + ''' loader =3D unittest.loader.defaultTestLoader tests =3D loader.loadTestsFromNames([path], None) =20 --=20 2.53.0 From nobody Thu Apr 2 04:23:57 2026 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=1774866572; cv=none; d=zohomail.com; s=zohoarc; b=T/ofVcfM49KViHCpuK+TJ5WVhJhBdpbtxawpiwE93Bjwejv9t8hWa5pUtmsiEqOgnlqZTFmoodeX3DYzoPaVwxS/c4vDnbeRyPiXqR8jqIfRqBfT1EaQfgg8L+WOFQEsNuK2i3fhQQXIWxdPNtrxRyB5rBF+XLlNS8t4HJ028gQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1774866572; 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=lXctzuMBnKmSSaLbuFK9SoZip/mQN4+AOqcorvMya80=; b=hf/JO3RSl5hHUuNOmGh21vGzDt3kTWOm/IxjqGlcm+UFPB+XMaQ+9qdgwvacNuszJxZdWR5s3r1w3CRFx5zHkmOlr1l7WKFrzHb0URkPMaKi4dNwpINl57oHLH2b9EJGO2xkG26qhbfTFGGvGuhSXFB/gkY9nBtfughTsaRa1AQ= 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 1774866572874704.7634155072241; Mon, 30 Mar 2026 03:29:32 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w79rO-00016r-55; Mon, 30 Mar 2026 06:28:42 -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 1w79rD-000153-El for qemu-devel@nongnu.org; Mon, 30 Mar 2026 06:28: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 1w79r8-0005DN-UD for qemu-devel@nongnu.org; Mon, 30 Mar 2026 06:28:29 -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-651-AUZTsYhBP_uta5heMbDVaw-1; Mon, 30 Mar 2026 06:28:24 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (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 75728180034F; Mon, 30 Mar 2026 10:28:23 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.44.35.14]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 9510D30001A1; Mon, 30 Mar 2026 10:28:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1774866506; 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=lXctzuMBnKmSSaLbuFK9SoZip/mQN4+AOqcorvMya80=; b=NcG0ZSdDx1me1tnIhPnvmCdXzkiIvdbcQldJUFx0vVhD03e+XjX/kg5Rm6qE+9mcgbyyc6 BITFo2hzipkG5YuJkolMSCdcXq5/EkVPahGJyvzo05a0lpo3DE4WLSr9Ajc0UyliN7N9iY M7CfZFeAiQ8TEB5NGRZwyG7Nv1PKRC0= X-MC-Unique: AUZTsYhBP_uta5heMbDVaw-1 X-Mimecast-MFC-AGG-ID: AUZTsYhBP_uta5heMbDVaw_1774866503 From: Thomas Huth To: Peter Maydell Cc: qemu-devel@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 2/7] tests/functional/qemu_test: Split huge fetch() function in asset.py Date: Mon, 30 Mar 2026 12:28:10 +0200 Message-ID: <20260330102815.6759-3-thuth@redhat.com> In-Reply-To: <20260330102815.6759-1-thuth@redhat.com> References: <20260330102815.6759-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.4.1 on 10.30.177.4 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: -5 X-Spam_score: -0.6 X-Spam_bar: / X-Spam_report: (-0.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54, 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_VALIDITY_CERTIFIED_BLOCKED=1, RCVD_IN_VALIDITY_RPBL_BLOCKED=1, 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: qemu development 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: 1774866573638154100 From: Thomas Huth The fetch() function has become really huge and pylint complains about that. Extract the internal retry-three-times-download loop into a separate function to make it a little bit more readable and to make pylint happy about this file again. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Thomas Huth Message-ID: <20260324163543.55503-4-thuth@redhat.com> --- tests/functional/qemu_test/asset.py | 43 ++++++++++++++++------------- 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/tests/functional/qemu_test/asset.py b/tests/functional/qemu_te= st/asset.py index 1cd03c2a9a9..51a434b2b70 100644 --- a/tests/functional/qemu_test/asset.py +++ b/tests/functional/qemu_test/asset.py @@ -133,24 +133,7 @@ def _save_time_stamp(self): ''' self.cache_file.with_suffix(".stamp").write_text(f"{int(time.time(= ))}") =20 - def fetch(self): - '''Download the asset from the internet''' - if not self.cache_dir.exists(): - self.cache_dir.mkdir(parents=3DTrue, exist_ok=3DTrue) - - 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) - - if not self.fetchable(): - raise AssetError(self, - "Asset cache is invalid and downloads disable= d") - - self.log.info("Downloading %s to %s...", self.url, self.cache_file) - tmp_cache_file =3D self.cache_file.with_suffix(".download") - + def _try_to_fetch(self, tmp_cache_file): for _retries in range(3): try: with tmp_cache_file.open("xb") as dst: @@ -176,7 +159,7 @@ def fetch(self): "waiting for other thread to finish...", tmp_cache_file) if self._wait_for_other_download(tmp_cache_file): - return str(self.cache_file) + return True self.log.debug("%s seems to be stale, " "deleting and retrying download...", tmp_cache_file) @@ -213,6 +196,28 @@ def fetch(self): tmp_cache_file.unlink() raise AssetError(self, f"Unable to download: {e}", transient=3DTrue) from e + return False + + def fetch(self): + '''Download the asset from the internet''' + if not self.cache_dir.exists(): + self.cache_dir.mkdir(parents=3DTrue, exist_ok=3DTrue) + + 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) + + if not self.fetchable(): + raise AssetError(self, + "Asset cache is invalid and downloads disable= d") + + self.log.info("Downloading %s to %s...", self.url, self.cache_file) + tmp_cache_file =3D self.cache_file.with_suffix(".download") + + if self._try_to_fetch(tmp_cache_file): + return str(self.cache_file) =20 if not os.path.exists(tmp_cache_file): raise AssetError(self, "Download retries exceeded", transient= =3DTrue) --=20 2.53.0 From nobody Thu Apr 2 04:23:57 2026 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=1774866554; cv=none; d=zohomail.com; s=zohoarc; b=KGJH8TWgkJOpQc6PMiSf/IVUGGTi9gk0m1fR2YyBYZjZMU1Z7AHWqabhRUzTw5FgXR7uo4rNUWE88fxOXC2rs+gEaz6EuiRbfxqY68L6KlaV2ZwGTc+PleNnP/w/2j+L6kUCwccfytX2+0M0TS6/e+0xleoRCfzEkrk7+PdqHQY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1774866554; 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=W+zizsw5NO/Uy/oRaR3PlM9wC4bLCHOCqFM6SNZRYho=; b=aJsMySkXmxl86HfSZnNU6neELZrGmgtfwB673+48zMaBUTOzwZhNDtu+GDwoCFFlNNXpTyIrE6jvzQNaPLHPPe77k9Dgb2EQ/TTqfeqbszRVMl89cXxTol7ZfEDczDNp7z2jYelk10vS21z5hOaPzNwsM7MrBKeBsmu6sLKzI2g= 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 1774866554294649.7393785479446; Mon, 30 Mar 2026 03:29:14 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w79rQ-00018W-LY; Mon, 30 Mar 2026 06:28: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 1w79rE-00015D-To for qemu-devel@nongnu.org; Mon, 30 Mar 2026 06:28: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 1w79rD-0005Dk-70 for qemu-devel@nongnu.org; Mon, 30 Mar 2026 06:28:32 -0400 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-627-RLrW-9oNOyui_sYxe2wTTg-1; Mon, 30 Mar 2026 06:28:27 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (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 835381944EB3; Mon, 30 Mar 2026 10:28:26 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.44.35.14]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 1D5E930001A2; Mon, 30 Mar 2026 10:28:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1774866509; 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=W+zizsw5NO/Uy/oRaR3PlM9wC4bLCHOCqFM6SNZRYho=; b=ZZpwDC8Z2keUoaO56rRWCpFWWHmxRL6f2YwIlFimw33Rbzwb3ld12DQzttfRaPUdAKlNmV iBANR4/VFJmQfiVymh8koB9zJsG5Ajn/YUSC7nBiO8b9tE+iyO4iAZHkCfkew9D8rWIE82 7eIxkkMrqWhonRwrRYXVmnrLNp/mo7I= X-MC-Unique: RLrW-9oNOyui_sYxe2wTTg-1 X-Mimecast-MFC-AGG-ID: RLrW-9oNOyui_sYxe2wTTg_1774866507 From: Thomas Huth To: Peter Maydell Cc: qemu-devel@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 3/7] tests/functional/qemu_test: Silence warnings from pylint in config.py Date: Mon, 30 Mar 2026 12:28:11 +0200 Message-ID: <20260330102815.6759-4-thuth@redhat.com> In-Reply-To: <20260330102815.6759-1-thuth@redhat.com> References: <20260330102815.6759-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.4.1 on 10.30.177.4 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: 27 X-Spam_score: 2.7 X-Spam_bar: ++ X-Spam_report: (2.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54, 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_SBL_CSS=3.335, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=1, RCVD_IN_VALIDITY_RPBL_BLOCKED=1, 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: qemu development 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: 1774866555261154100 From: Thomas Huth Pylint complains here: config.py:1:0: C0114: Missing module docstring (missing-module-docstring) config.py:28:4: W0719: Raising too general exception: Exception (broad-exc= eption-raised) Add a module description and replace the general Exception to fix this. And while we're at it, and since we've got a proper module description string now, also replace the copy-n-pasted comment at the top of the file with a proper SPDX identifier. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Thomas Huth Message-ID: <20260324163543.55503-5-thuth@redhat.com> --- tests/functional/qemu_test/config.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tests/functional/qemu_test/config.py b/tests/functional/qemu_t= est/config.py index e0893f630ee..5d44b6fa4c0 100644 --- a/tests/functional/qemu_test/config.py +++ b/tests/functional/qemu_test/config.py @@ -1,4 +1,4 @@ -# Test class and utilities for functional tests +# SPDX-License-Identifier: GPL-2.0-or-later # # Copyright 2018, 2024 Red Hat, Inc. # @@ -10,6 +10,9 @@ # # This work is licensed under the terms of the GNU GPL, version 2 or # later. See the COPYING file in the top-level directory. +''' +Functions related to the configuration of the tests and of the host system +''' =20 import os from pathlib import Path @@ -25,9 +28,9 @@ def _build_dir(): if root is not None: return Path(root) =20 - raise Exception("Missing MESON_BUILD_ROOT environment variable. " + - "Please use the '/run' script if invoking "= + - "directly instead of via make/meson") + raise RuntimeError("Missing MESON_BUILD_ROOT environment variable. " + + "Please use the '/run' script if invokin= g " + + "directly instead of via make/meson") =20 BUILD_DIR =3D _build_dir() =20 --=20 2.53.0 From nobody Thu Apr 2 04:23:57 2026 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=1774866565; cv=none; d=zohomail.com; s=zohoarc; b=VzDXHtrr5iXQGXknEaySGHggdndjwec8w7JAYRpHGcZroTnKP6aAtG03s/g36NIxe8pQaKqazV1z/t5UqaMGiBaRjoRzy2PfrSmCsU00BvLlNuS/LhC+J1fjgHWlOjqBI1ar3rchcU7v4CAWWzx4z7zZjhL+3kCIItnZ6Ib3e5I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1774866565; 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=jM+h+o7CiJ2jVIona9N3hztx18aBnLRkjHdndA8t8eo=; b=kf192WdBw/aDnmj4p/mkupzKcHNRzibqDsDgh2ZpB5MvvNL10VkVAe3Z++7x12LH5ztIC8cI1JAwEiw27EpfoAxk0AhAKCwlMyOAkJeeomc6K5VvfHAIaoPYEP8a5IBZ6xYEjdctsowld/5yL92KaYoSK5oNIQrUyJVYWzPXAc8= 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 1774866565431183.8358944735511; Mon, 30 Mar 2026 03:29:25 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w79rQ-00018b-LL; Mon, 30 Mar 2026 06:28: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 1w79rG-00015H-6n for qemu-devel@nongnu.org; Mon, 30 Mar 2026 06:28: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 1w79rE-0005E6-No for qemu-devel@nongnu.org; Mon, 30 Mar 2026 06:28:33 -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-609-f5BtmsjiMEGSDaz5-SKKMw-1; Mon, 30 Mar 2026 06:28:30 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (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 5318D18002D0; Mon, 30 Mar 2026 10:28:29 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.44.35.14]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 3FCF430001A1; Mon, 30 Mar 2026 10:28:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1774866512; 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=jM+h+o7CiJ2jVIona9N3hztx18aBnLRkjHdndA8t8eo=; b=KSTnJlS1VNgNzkILgdGNW55QsWN0quTQGP2HUQ2++s+smbxbUv7M0YcFVYa8UZgUQtOYNI pMVTKEZ+ChdqWHguVkAa5+4+3nTJVqIomHJOAa5lwqafFbIt9CAtNRxgCyv6syo64Vy/fA Dv1iN4cgnRZqCO1192QlwrmUpPbx0IQ= X-MC-Unique: f5BtmsjiMEGSDaz5-SKKMw-1 X-Mimecast-MFC-AGG-ID: f5BtmsjiMEGSDaz5-SKKMw_1774866509 From: Thomas Huth To: Peter Maydell Cc: qemu-devel@nongnu.org, Fabiano Rosas Subject: [PULL 4/7] hw/display/vga-isa: Fix migration of the isa-vga device Date: Mon, 30 Mar 2026 12:28:12 +0200 Message-ID: <20260330102815.6759-5-thuth@redhat.com> In-Reply-To: <20260330102815.6759-1-thuth@redhat.com> References: <20260330102815.6759-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 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: -5 X-Spam_score: -0.6 X-Spam_bar: / X-Spam_report: (-0.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54, 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_VALIDITY_CERTIFIED_BLOCKED=1, RCVD_IN_VALIDITY_RPBL_BLOCKED=1, 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: qemu development 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: 1774866567240154100 Content-Type: text/plain; charset="utf-8" From: Thomas Huth QEMU currently crashes when migrating a guest that uses the isa-vga device as display. This happens because vga_isa_class_initfn() registers a vmsd for vmstate_vga_common that operates on VGACommonState. But the isa-vga device is derived from ISADevice, not from VGACommonState, so the migration code tries to fill in the data for VGACommonState to the memory that is a ISADevice instead, which is of cause causing trouble. We need an indirection here as it's also e.g. done in vga-pci.c, so that the migration data gets filled into the right location. While we're at it, also drop the "global_vmstate =3D true" here. Since migration was broken for this device during the last 15 years (!) anyway, we don't have to worry about maintaining backward compatibility with this switch for older versions of QEMU anymore. Fixes: 7435b791ca9 ("vga-isa: convert to qdev") Reviewed-by: Fabiano Rosas Signed-off-by: Thomas Huth Message-ID: <20260326113457.159065-1-thuth@redhat.com> --- hw/display/vga-isa.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/hw/display/vga-isa.c b/hw/display/vga-isa.c index 95d85ff69a5..5f55c884a1b 100644 --- a/hw/display/vga-isa.c +++ b/hw/display/vga-isa.c @@ -32,6 +32,7 @@ #include "qemu/timer.h" #include "hw/core/loader.h" #include "hw/core/qdev-properties.h" +#include "migration/vmstate.h" #include "ui/console.h" #include "qom/object.h" =20 @@ -62,7 +63,6 @@ static void vga_isa_realizefn(DeviceState *dev, Error **e= rrp) MemoryRegion *vga_io_memory; const MemoryRegionPortio *vga_ports, *vbe_ports; =20 - s->global_vmstate =3D true; if (!vga_common_init(s, OBJECT(dev), errp)) { return; } @@ -88,6 +88,15 @@ static void vga_isa_realizefn(DeviceState *dev, Error **= errp) rom_add_vga(VGABIOS_FILENAME); } =20 +static const VMStateDescription vmstate_vga_isa =3D { + .name =3D "vga-isa", + .version_id =3D 1, + .fields =3D (const VMStateField[]) { + VMSTATE_STRUCT(state, ISAVGAState, 0, vmstate_vga_common, VGACommo= nState), + VMSTATE_END_OF_LIST() + } +}; + static const Property vga_isa_properties[] =3D { DEFINE_PROP_UINT32("vgamem_mb", ISAVGAState, state.vram_size_mb, 8), }; @@ -98,7 +107,7 @@ static void vga_isa_class_initfn(ObjectClass *klass, con= st void *data) =20 dc->realize =3D vga_isa_realizefn; device_class_set_legacy_reset(dc, vga_isa_reset); - dc->vmsd =3D &vmstate_vga_common; + dc->vmsd =3D &vmstate_vga_isa; device_class_set_props(dc, vga_isa_properties); set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories); } --=20 2.53.0 From nobody Thu Apr 2 04:23:57 2026 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=1774866573; cv=none; d=zohomail.com; s=zohoarc; b=eaXBUNEtd52gHt5mR+7DZOpNqW6G3v0OaH4T+3613UNKVNAYnbbzWHsijlFYG1I5Bq/jJG3/b+o2XA1wRrFq7Ge4WU9X1wlHfbvVa8ez82Ch6wBIZ4AHD2tvoEUiFZl7D0x6AxqbydcQPVj6j+zEszz63deUvu3ltHec9t/Ibqo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1774866573; 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=Ww94gMkt11Wk7lcnwhAkRmngRIfU7Z3lB/Oh9OuXyhI=; b=RUBSRmr8I9avZMxE85SIHHQ6bg8ywjpelWJoPlW8ih6SJEw5mhyCw+ALiLHI4KY5R4mzz86P5/4bvsBLrMFPFJgmMxUYVDiIfR1No/Ps8nw9rsPY+sHWztU7yw5Di9uY2Zfyx/kld6htWiSXsDYmREC/vHRG3vky9yVJTZuvgLo= 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 1774866573591807.9368403116133; Mon, 30 Mar 2026 03:29:33 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w79rS-0001C6-MP; Mon, 30 Mar 2026 06:28: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 1w79rL-00016D-VH for qemu-devel@nongnu.org; Mon, 30 Mar 2026 06:28:40 -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 1w79rK-0005Ef-Hj for qemu-devel@nongnu.org; Mon, 30 Mar 2026 06:28:39 -0400 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-331-LoQfeR6_OqG1p21QcL0q8g-1; Mon, 30 Mar 2026 06:28:34 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (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 A911619560A2; Mon, 30 Mar 2026 10:28:32 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.44.35.14]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 596A530001A2; Mon, 30 Mar 2026 10:28:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1774866517; 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=Ww94gMkt11Wk7lcnwhAkRmngRIfU7Z3lB/Oh9OuXyhI=; b=dCVfsgl7t/Atxa4WgiqWl3QtRQqcIV2ZhvXPlsf9SOxwNGAeXrVQBJglj/NUGZZP7CgcOM Fkf8ZG1w7XvziTLTDKCgufN3E3E4ZllHTyoD+G9W58i7ZlAJHBg6sk0qPhSG8lfFpP7xr8 PhCyBLuSjxEXcA6FM69l4+3bD7oEuL4= X-MC-Unique: LoQfeR6_OqG1p21QcL0q8g-1 X-Mimecast-MFC-AGG-ID: LoQfeR6_OqG1p21QcL0q8g_1774866513 From: Thomas Huth To: Peter Maydell Cc: qemu-devel@nongnu.org, Fabiano Rosas , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 5/7] hw/display/cirrus_vga_isa: Disable global_vmstate by default for new machines Date: Mon, 30 Mar 2026 12:28:13 +0200 Message-ID: <20260330102815.6759-6-thuth@redhat.com> In-Reply-To: <20260330102815.6759-1-thuth@redhat.com> References: <20260330102815.6759-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.4.1 on 10.30.177.4 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: 27 X-Spam_score: 2.7 X-Spam_bar: ++ X-Spam_report: (2.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54, 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_SBL_CSS=3.335, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=1, RCVD_IN_VALIDITY_RPBL_BLOCKED=1, 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: qemu development 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: 1774866575347154100 From: Thomas Huth In the long run, we would like to get rid of the code that allows to register migration state globally, so set global_vmstate to false when using the isa-cirrus-vga device with new machines, and only enable it for older machines to avoid breaking the migration there. Reviewed-by: Fabiano Rosas Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Thomas Huth Message-ID: <20260326154850.301609-1-thuth@redhat.com> --- hw/core/machine.c | 1 + hw/display/cirrus_vga_isa.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/core/machine.c b/hw/core/machine.c index 6cf0e2f404e..0aa77a57e95 100644 --- a/hw/core/machine.c +++ b/hw/core/machine.c @@ -40,6 +40,7 @@ =20 GlobalProperty hw_compat_10_2[] =3D { { "scsi-block", "migrate-pr", "off" }, + { "isa-cirrus-vga", "global-vmstate", "true" }, }; const size_t hw_compat_10_2_len =3D G_N_ELEMENTS(hw_compat_10_2); =20 diff --git a/hw/display/cirrus_vga_isa.c b/hw/display/cirrus_vga_isa.c index bad9ec7599c..76034a88605 100644 --- a/hw/display/cirrus_vga_isa.c +++ b/hw/display/cirrus_vga_isa.c @@ -56,7 +56,6 @@ static void isa_cirrus_vga_realizefn(DeviceState *dev, Er= ror **errp) s->vram_size_mb); return; } - s->global_vmstate =3D true; if (!vga_common_init(s, OBJECT(dev), errp)) { return; } @@ -74,6 +73,8 @@ static const Property isa_cirrus_vga_properties[] =3D { cirrus_vga.vga.vram_size_mb, 4), DEFINE_PROP_BOOL("blitter", struct ISACirrusVGAState, cirrus_vga.enable_blitter, true), + DEFINE_PROP_BOOL("global-vmstate", struct ISACirrusVGAState, + cirrus_vga.vga.global_vmstate, false), }; =20 static void isa_cirrus_vga_class_init(ObjectClass *klass, const void *data) --=20 2.53.0 From nobody Thu Apr 2 04:23:57 2026 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=1774866570; cv=none; d=zohomail.com; s=zohoarc; b=dofr+8JCWvGLaGDetadggdqW2UfW7N0CPZVCXSLf7vjrEJ0YXrBklpJ/YPjiR6u4FskD/hu6vt+m6ndVEt7fbnBkDtEsKa2KpV2wmmkxHcJjRAWSS/zADn2PMdwPCmfBjUUlvpt7ehSeGeE9RMbyxAhjVLA0fbqIL78uIM9wxSs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1774866570; 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=qbkIduy/ZpTXWj2jXX/lOZPdlw+KJJyZGdx1MfT0VEU=; b=WLiBzI2c3AJD0hox8NYlA3zi6kNZ1VY8ZefXmLm4UOeX/51ng3lWFALErauNkDixJ4O/AercKF58lYQPlXgXJyZkLvnNi0npK3GLiNpTmpX06e9QhP1svkLcgl6t2dHR1JGllr062CR5M+UKkUDi8ROCwJo34T6K9coans4AZJg= 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 1774866570458640.7889847798646; Mon, 30 Mar 2026 03:29:30 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w79rR-00019q-AG; Mon, 30 Mar 2026 06:28:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w79rN-00016t-Sj for qemu-devel@nongnu.org; Mon, 30 Mar 2026 06:28:42 -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 1w79rM-0005F1-FF for qemu-devel@nongnu.org; Mon, 30 Mar 2026 06:28:41 -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-690-yjHa9nS1NDi9iOl70tsQbg-1; Mon, 30 Mar 2026 06:28:36 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (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 385AC180044D; Mon, 30 Mar 2026 10:28:35 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.44.35.14]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 6818D30001A1; Mon, 30 Mar 2026 10:28:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1774866519; 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=qbkIduy/ZpTXWj2jXX/lOZPdlw+KJJyZGdx1MfT0VEU=; b=JQeMSGAclnSjo2CYKmcYtV9F/D4gQuz5bW3IE7DVKK/9C1t4kicWBuPQHPavdB+pIZRrZP 9fAPmGVEhHs2jIKKGxyjcI8nJFXr6OKUTic1ltG4tWwY3A49Z3mNZNdKBNg8s303swjwQ1 ZVGRzMr/cehrLG9BMXEd3rgune8tSLk= X-MC-Unique: yjHa9nS1NDi9iOl70tsQbg-1 X-Mimecast-MFC-AGG-ID: yjHa9nS1NDi9iOl70tsQbg_1774866515 From: Thomas Huth To: Peter Maydell Cc: qemu-devel@nongnu.org, =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 6/7] pc-bios: remove obsolete linuxboot.bin prebuilt blob Date: Mon, 30 Mar 2026 12:28:14 +0200 Message-ID: <20260330102815.6759-7-thuth@redhat.com> In-Reply-To: <20260330102815.6759-1-thuth@redhat.com> References: <20260330102815.6759-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.4.1 on 10.30.177.4 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: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54, 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.01, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=1, RCVD_IN_VALIDITY_RPBL_BLOCKED=1, 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: qemu development 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: 1774866571307154100 From: Daniel P. Berrang=C3=A9 The corresponding source was removed in commit 88641f4df388faa78c49c54ed885e530fd0a75dc Author: Philippe Mathieu-Daud=C3=A9 Date: Thu Jan 8 11:30:39 2026 +0800 hw/i386: Remove linuxboot.bin We must also remove the pre-built blob to avoid a GPL violation from lack of complete & corresponding source. Signed-off-by: Daniel P. Berrang=C3=A9 Message-ID: <20260324122025.892666-1-berrange@redhat.com> Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Thomas Huth --- pc-bios/linuxboot.bin | Bin 1024 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 pc-bios/linuxboot.bin diff --git a/pc-bios/linuxboot.bin b/pc-bios/linuxboot.bin deleted file mode 100644 index 923d1796fbc58f1a836c160be533d1cf697b7511..000000000000000000000000000= 0000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1024 zcmdUt&r2IY6vy9gHZe)X-PE5@4-#x3kjv16P>MG_wU8X_xkCL)K~ks<^cr#+2m|)m zKcW9XhMabq!zPFb>7}h60wPg1(qJ!DlqpeCN|5o~cbIwbo%ea~4d1oT_AcES^R$>R z<}G_DE=3DIDEVgBqUsW!#8%d68Jk~38IqCe}YXb-9r|Mzg4;0>tI5eK3njzlQFRvHWZ zyPPzan335ADxn8{SYUo0%m+IFYk{@FG}zg$xmuk#!UxlG);NQbbA-AVB^qpYwfSo+ zQ(lhQ5qmqCK@iK?TI(g5G%^DDz@%HhGk6lq*?3HSt>3?r)(LB|_TF@&Rf;FtC5J2i zBhfBRlodH}YZp-6WH?^_LKfWGB~;flH^>GkcL(eY`0|_$evC@b3s(EHglZFR&4=3DnZ zh>k~yz*o=3DVS}*(HJxGg)+_Vqr5s~oCZMc#TNB&BVnHJ}Pj2m?&Q=3D>q$V*)vK4{&+} z2sv=3DEoA#?s;h#Re9-5o9CZbRKxA(_=3DDy+O%qvvmmr4I{RZ`WUMy!-p|zmG?M04>~Q A5C8xG --=20 2.53.0 From nobody Thu Apr 2 04:23:57 2026 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=1774866554; cv=none; d=zohomail.com; s=zohoarc; b=oGpxDsz3m0P6+zXAi7x0ytLXWGREBfmbYpYXh0D65mPns4acctkI6kuYAvW5tfDVuPRgaRDH4l6gNzYuvoO0hFDxd5hhMUCnzTZYKpbT9n+f1am9lij/y7swfNtagOQRC6D4F3rZEqNMd1ZzC3Ggx+PejmN4Ra0NbS2Eo9tOk3Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1774866554; 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=Z1d9tiJ2T0B368nmiqeZ/3YpPq5mj4POOCDgcmZzlJg=; b=DE861UPBbuH82UmKv8BbPfrG8GP4HPGVgbLplr1lMYrLOf33QQcLtGwK6fhFJY31dx3pHFLSY4+FJEp0yr0VhxPQnyv2Amq6iUrAdV4QmySQY6V+Am2XejNQt58fTQVrVfZ4LRLgkxbMcNqYX/MIpsOly2qJaQr0odc0uEumX/Q= 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 1774866554677915.2395343160088; Mon, 30 Mar 2026 03:29:14 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w79rV-0001Df-0z; Mon, 30 Mar 2026 06:28:49 -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 1w79rS-0001BY-5r for qemu-devel@nongnu.org; Mon, 30 Mar 2026 06:28:46 -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 1w79rP-0005FG-Cz for qemu-devel@nongnu.org; Mon, 30 Mar 2026 06:28:45 -0400 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-319-40vnokgLPHerRlVnGPl8LA-1; Mon, 30 Mar 2026 06:28:39 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (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 8DFD219560A6; Mon, 30 Mar 2026 10:28:38 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.44.35.14]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 370173000223; Mon, 30 Mar 2026 10:28:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1774866522; 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=Z1d9tiJ2T0B368nmiqeZ/3YpPq5mj4POOCDgcmZzlJg=; b=AizZe/s4vIBRVSOPUsy48I2+zwKvJoO5YpXvG/mG3xqfelWCDx3kVaabWlz+p/XE8hXmEU J8toZ0geY0Q+ushmbHRs7Umh7SsJwKanZIYT4/9dmGl/QZQTUkEoQJVaaPkIx9II1rZ1pE 2f1WoJ7G/xskHcSQB73dhTjL7PblltU= X-MC-Unique: 40vnokgLPHerRlVnGPl8LA-1 X-Mimecast-MFC-AGG-ID: 40vnokgLPHerRlVnGPl8LA_1774866518 From: Thomas Huth To: Peter Maydell Cc: qemu-devel@nongnu.org, Zhao Liu Subject: [PULL 7/7] tests/functional/migration.py: Skip migration_with_exec() if socat is not available Date: Mon, 30 Mar 2026 12:28:15 +0200 Message-ID: <20260330102815.6759-8-thuth@redhat.com> In-Reply-To: <20260330102815.6759-1-thuth@redhat.com> References: <20260330102815.6759-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 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: 27 X-Spam_score: 2.7 X-Spam_bar: ++ X-Spam_report: (2.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54, 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_SBL_CSS=3.335, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=1, RCVD_IN_VALIDITY_RPBL_BLOCKED=1, 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: qemu development 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: 1774866555152154100 Content-Type: text/plain; charset="utf-8" From: Zhao Liu Commit 643a171f5668 ("tests: Replace ncat with socat in migration test and drop ncat from containers") replaced ncat with socat, but missed to skip related test cases if socat is not available, which will cause test errors on the system without socat. Fix this by checking socat instead of the original ncat. Fixes: 643a171f5668 ("tests: Replace ncat with socat in migration test and = drop ncat from containers") Signed-off-by: Zhao Liu Message-ID: <20260330053300.2721608-1-zhao1.liu@intel.com> Reviewed-by: Thomas Huth Signed-off-by: Thomas Huth --- tests/functional/migration.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/functional/migration.py b/tests/functional/migration.py index 2395119d6c6..144f091ba8a 100644 --- a/tests/functional/migration.py +++ b/tests/functional/migration.py @@ -80,8 +80,8 @@ def migration_with_unix(self): self.migrate(dst_uri) =20 def migration_with_exec(self): - if not which('ncat'): - self.skipTest('ncat is not available') + if not which('socat'): + self.skipTest('socat is not available') with Ports() as ports: free_port =3D self._get_free_port(ports) dst_uri =3D 'exec:socat TCP-LISTEN:%u -' % free_port --=20 2.53.0