From nobody Sat Nov 15 09:31:55 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=1752686826; cv=none; d=zohomail.com; s=zohoarc; b=aNl8mUPucBLSYNahgVFZ/DngQCMICWgYLU4ZWGp//jzXCKIGZJO+csnm4Ff2hrFjuCzNVREyOXs+dLJkETlUM0p1B0sfxezYNTE9lLY+nYj8r4vKbCoDbE7sUXnXTJ3GCpU9tCtLiMHfhYjrMmJWIxCq0lCyFN1d/jKvrMJtMCM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1752686826; 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=1csKeEEmwpJJSsvcgmZ3Iy9zbkY5hIp2yGI5AM2LJ6c=; b=JmiZ2FK4RM+xocagVfMsgjBgkSk6nqEOjLpZ5Oj4rYzSZ2eSq5wWgG3rNZURDZ9GQP5KGyb1TVXUbRW0tlYA5t8V6qxMYPjUk8ZgJH5Ys70vT9gNaah7D6LQ0nfUxAhb8lHqVuHMMq+vX4lvX8VGbhAKZYUUVNl1WVVmTFf29gc= 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 1752686826823369.9541241315761; Wed, 16 Jul 2025 10:27:06 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uc5t8-000362-TL; Wed, 16 Jul 2025 13:25:51 -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 1uc5t4-0002wN-PS for qemu-devel@nongnu.org; Wed, 16 Jul 2025 13:25:47 -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 1uc5t0-00086o-Jl for qemu-devel@nongnu.org; Wed, 16 Jul 2025 13:25:46 -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-111-xmS5FjBSNguF1CVgXM8hng-1; Wed, 16 Jul 2025 13:25:39 -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 D2128180034E; Wed, 16 Jul 2025 17:25:38 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.45.242.6]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 363171955F16; Wed, 16 Jul 2025 17:25:38 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 6027C21E6924; Wed, 16 Jul 2025 19:25:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1752686741; 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=1csKeEEmwpJJSsvcgmZ3Iy9zbkY5hIp2yGI5AM2LJ6c=; b=Fq/eFTla2LXE440Tg68G/itj2jgCEIrpTj29EEHYVe6Rnvrfl6UYdIQUr7U46O4rV52/5d 53touTaH7K3O+6jWRWBmimC/gwI6zc9b4r5V0yI0+iHdv+/X00Cmm9I7ymRGkyJy/xuYhR Vt8qurozK5ny+EMK61xsIdnURYu7V7I= X-MC-Unique: xmS5FjBSNguF1CVgXM8hng-1 X-Mimecast-MFC-AGG-ID: xmS5FjBSNguF1CVgXM8hng_1752686738 From: Markus Armbruster To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, Steve Sistare , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 1/6] qom: qom-list-get Date: Wed, 16 Jul 2025 19:25:30 +0200 Message-ID: <20250716172535.3520175-2-armbru@redhat.com> In-Reply-To: <20250716172535.3520175-1-armbru@redhat.com> References: <20250716172535.3520175-1-armbru@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=armbru@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_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: 1752686827913116600 From: Steve Sistare Using qom-list and qom-get to get all the nodes and property values in a QOM tree can take multiple seconds because it requires 1000's of individual QOM requests. Some managers fetch the entire tree or a large subset of it when starting a new VM, and this cost is a substantial fraction of start up time. Define the qom-list-get command, which fetches all the properties and values for a list of paths. This can be much faster than qom-list plus qom-get. When getting an entire QOM tree, I measured a 10x speedup in elapsed time. Signed-off-by: Steve Sistare Tested-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Markus Armbruster Message-ID: <1752248703-217318-2-git-send-email-steven.sistare@oracle.com> Signed-off-by: Markus Armbruster --- qapi/qom.json | 50 +++++++++++++++++++++++++++++++++++++++++++ qom/qom-qmp-cmds.c | 53 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 103 insertions(+) diff --git a/qapi/qom.json b/qapi/qom.json index 96d56df6cd..830cb2ffe7 100644 --- a/qapi/qom.json +++ b/qapi/qom.json @@ -47,6 +47,34 @@ '*description': 'str', '*default-value': 'any' } } =20 +## +# @ObjectPropertyValue: +# +# @name: the name of the property. +# +# @type: the type of the property, as described in `ObjectPropertyInfo`. +# +# @value: the value of the property. Absent when the property cannot +# be read. +# +# Since 10.1 +## +{ 'struct': 'ObjectPropertyValue', + 'data': { 'name': 'str', + 'type': 'str', + '*value': 'any' } } + +## +# @ObjectPropertiesValues: +# +# @properties: a list of properties. +# +# Since 10.1 +## +{ 'struct': 'ObjectPropertiesValues', + 'data': { 'properties': [ 'ObjectPropertyValue' ] }} + + ## # @qom-list: # @@ -124,6 +152,28 @@ 'returns': 'any', 'allow-preconfig': true } =20 +## +# @qom-list-get: +# +# List properties and their values for each object path in the input +# list. +# +# @paths: The absolute or partial path for each object, as described +# in `qom-get`. +# +# Errors: +# - If any path is not valid or is ambiguous +# +# Returns: A list where each element is the result for the +# corresponding element of @paths. +# +# Since 10.1 +## +{ 'command': 'qom-list-get', + 'data': { 'paths': [ 'str' ] }, + 'returns': [ 'ObjectPropertiesValues' ], + 'allow-preconfig': true } + ## # @qom-set: # diff --git a/qom/qom-qmp-cmds.c b/qom/qom-qmp-cmds.c index 293755f409..57f1898cf6 100644 --- a/qom/qom-qmp-cmds.c +++ b/qom/qom-qmp-cmds.c @@ -69,6 +69,59 @@ ObjectPropertyInfoList *qmp_qom_list(const char *path, E= rror **errp) return props; } =20 +static void qom_list_add_property_value(Object *obj, ObjectProperty *prop, + ObjectPropertyValueList **props) +{ + ObjectPropertyValue *item =3D g_new0(ObjectPropertyValue, 1); + + QAPI_LIST_PREPEND(*props, item); + + item->name =3D g_strdup(prop->name); + item->type =3D g_strdup(prop->type); + item->value =3D object_property_get_qobject(obj, prop->name, NULL); +} + +static ObjectPropertyValueList *qom_get_property_value_list(const char *pa= th, + Error **errp) +{ + Object *obj; + ObjectProperty *prop; + ObjectPropertyIterator iter; + ObjectPropertyValueList *props =3D NULL; + + obj =3D qom_resolve_path(path, errp); + if (obj =3D=3D NULL) { + return NULL; + } + + object_property_iter_init(&iter, obj); + while ((prop =3D object_property_iter_next(&iter))) { + qom_list_add_property_value(obj, prop, &props); + } + + return props; +} + +ObjectPropertiesValuesList *qmp_qom_list_get(strList *paths, Error **errp) +{ + ObjectPropertiesValuesList *head =3D NULL, **tail =3D &head; + strList *path; + + for (path =3D paths; path; path =3D path->next) { + ObjectPropertiesValues *item =3D g_new0(ObjectPropertiesValues, 1); + + QAPI_LIST_APPEND(tail, item); + + item->properties =3D qom_get_property_value_list(path->value, errp= ); + if (!item->properties) { + qapi_free_ObjectPropertiesValuesList(head); + return NULL; + } + } + + return head; +} + void qmp_qom_set(const char *path, const char *property, QObject *value, Error **errp) { --=20 2.49.0 From nobody Sat Nov 15 09:31:55 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=1752686824; cv=none; d=zohomail.com; s=zohoarc; b=KMBq0x7TWRv2oxAFeVxtxGKclUyKUhSaXiVcCkM15aXo+XDURJbfOrVA9Z9BaR572IQRHiK/k2c0qAPi28WvtKfe7Ns326rCyF50XghJJyXZqRyr0JqlBnlEz9YVlw1ZBzjbbEIbXJDJ11nKSwEz0hD56BJ1OLu1wF0AlFWhnXI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1752686824; 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=7gFio82H82XpXmL0jnSv5xvDWFvNWQ2OVJeSAKSdYbs=; b=jVNnw0WgmQTJp10f1/OYxNZ4r0HtGu6HNwMm3V1nZ6zOXN+P2MJA9ypHJAzYibSv4OrvVQcn5yfB4qV02JgFIGvq+LfXklbwsDY9/AHEZ2GTxwkBgfrvnpbV8PBZB65T1mGdu2uvFpawKtEeCZ8PEDE1IgNvZ70KQ6yvGe0PcoE= 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 1752686824175762.1644397609441; Wed, 16 Jul 2025 10:27:04 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uc5t6-0002yN-4a; Wed, 16 Jul 2025 13:25:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uc5t3-0002s8-4b for qemu-devel@nongnu.org; Wed, 16 Jul 2025 13:25:45 -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 1uc5t0-00086t-DP for qemu-devel@nongnu.org; Wed, 16 Jul 2025 13:25:44 -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-176-g4M26thaN-CNtA7uhys6Sw-1; Wed, 16 Jul 2025 13:25:39 -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-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id E07B81956094; Wed, 16 Jul 2025 17:25:38 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.45.242.6]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 4B1411977029; Wed, 16 Jul 2025 17:25:38 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 6484F21E6925; Wed, 16 Jul 2025 19:25:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1752686741; 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=7gFio82H82XpXmL0jnSv5xvDWFvNWQ2OVJeSAKSdYbs=; b=YTCTOMKQzGVYE2DCnyeLxFGenJ3bxp0EMuQQpSZ6CBIxSPe4Zx5TVZibTGEr4ULPCqKwuV PTiRC8oQe+QVN2UaqwR/NoYfVqgji8bihX+l8+2YM+cWcVQ/zyCDxatvImEBd96AoEvi7c yaC4zTlJtwLZeThxMjYwJT9VJ4U7LTU= X-MC-Unique: g4M26thaN-CNtA7uhys6Sw-1 X-Mimecast-MFC-AGG-ID: g4M26thaN-CNtA7uhys6Sw_1752686739 From: Markus Armbruster To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, Steve Sistare Subject: [PULL 2/6] python: use qom-list-get Date: Wed, 16 Jul 2025 19:25:31 +0200 Message-ID: <20250716172535.3520175-3-armbru@redhat.com> In-Reply-To: <20250716172535.3520175-1-armbru@redhat.com> References: <20250716172535.3520175-1-armbru@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=armbru@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_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: 1752686826018116600 Content-Type: text/plain; charset="utf-8" From: Steve Sistare Use qom-list-get to speed up the qom-tree command. Signed-off-by: Steve Sistare Acked-by: Markus Armbruster Message-ID: <1752248703-217318-3-git-send-email-steven.sistare@oracle.com> Tested-by: Markus Armbruster [Lint picked off to mollify make check-minreqs] Signed-off-by: Markus Armbruster --- python/qemu/utils/qom.py | 45 +++++++++++++++------------ python/qemu/utils/qom_common.py | 55 +++++++++++++++++++++++++++++++++ 2 files changed, 80 insertions(+), 20 deletions(-) diff --git a/python/qemu/utils/qom.py b/python/qemu/utils/qom.py index 426a0f245f..05e5f14179 100644 --- a/python/qemu/utils/qom.py +++ b/python/qemu/utils/qom.py @@ -31,8 +31,7 @@ ## =20 import argparse - -from qemu.qmp import ExecuteError +from typing import List =20 from .qom_common import QOMCommand =20 @@ -224,28 +223,34 @@ def __init__(self, args: argparse.Namespace): super().__init__(args) self.path =3D args.path =20 - def _list_node(self, path: str) -> None: - print(path) - items =3D self.qom_list(path) - for item in items: - if item.child: - continue - try: - rsp =3D self.qmp.cmd('qom-get', path=3Dpath, - property=3Ditem.name) - print(f" {item.name}: {rsp} ({item.type})") - except ExecuteError as err: - print(f" {item.name}: ({item.type})") - print('') - for item in items: - if not item.child: - continue + def _list_nodes(self, paths: List[str]) -> None: + all_paths_props =3D self.qom_list_get(paths) + i =3D 0 + + for props in all_paths_props: + path =3D paths[i] + i =3D i + 1 + print(path) if path =3D=3D '/': path =3D '' - self._list_node(f"{path}/{item.name}") + newpaths =3D [] + + for item in props.properties: + if item.child: + newpaths +=3D [f"{path}/{item.name}"] + else: + value =3D item.value + if value is None: + value =3D "" + print(f" {item.name}: {value} ({item.type})") + + print('') + + if newpaths: + self._list_nodes(newpaths) =20 def run(self) -> int: - self._list_node(self.path) + self._list_nodes([self.path]) return 0 =20 =20 diff --git a/python/qemu/utils/qom_common.py b/python/qemu/utils/qom_common= .py index dd2c8b1908..ab21a4d364 100644 --- a/python/qemu/utils/qom_common.py +++ b/python/qemu/utils/qom_common.py @@ -65,6 +65,52 @@ def link(self) -> bool: return self.type.startswith('link<') =20 =20 +class ObjectPropertyValue: + """ + Represents a property return from e.g. qom-tree-get + """ + def __init__(self, name: str, type_: str, value: object): + self.name =3D name + self.type =3D type_ + self.value =3D value + + @classmethod + def make(cls, value: Dict[str, Any]) -> 'ObjectPropertyValue': + """ + Build an ObjectPropertyValue from a Dict with an unknown shape. + """ + assert value.keys() >=3D {'name', 'type'} + assert value.keys() <=3D {'name', 'type', 'value'} + return cls(value['name'], value['type'], value.get('value')) + + @property + def child(self) -> bool: + """Is this property a child property?""" + return self.type.startswith('child<') + + +class ObjectPropertiesValues: + """ + Represents the return type from e.g. qom-list-get + """ + # pylint: disable=3Dtoo-few-public-methods + + def __init__(self, properties: List[ObjectPropertyValue]) -> None: + self.properties =3D properties + + @classmethod + def make(cls, value: Dict[str, Any]) -> 'ObjectPropertiesValues': + """ + Build an ObjectPropertiesValues from a Dict with an unknown shape. + """ + assert value.keys() =3D=3D {'properties'} + props =3D [ObjectPropertyValue(item['name'], + item['type'], + item.get('value')) + for item in value['properties']] + return cls(props) + + CommandT =3D TypeVar('CommandT', bound=3D'QOMCommand') =20 =20 @@ -145,6 +191,15 @@ def qom_list(self, path: str) -> List[ObjectPropertyIn= fo]: assert isinstance(rsp, list) return [ObjectPropertyInfo.make(x) for x in rsp] =20 + def qom_list_get(self, paths: List[str]) -> List[ObjectPropertiesValue= s]: + """ + :return: a strongly typed list from the 'qom-list-get' command. + """ + rsp =3D self.qmp.cmd('qom-list-get', paths=3Dpaths) + # qom-list-get returns List[ObjectPropertiesValues] + assert isinstance(rsp, list) + return [ObjectPropertiesValues.make(x) for x in rsp] + @classmethod def command_runner( cls: Type[CommandT], --=20 2.49.0 From nobody Sat Nov 15 09:31:55 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=1752686807; cv=none; d=zohomail.com; s=zohoarc; b=EuHkJX9p9yt9O9QuQgLA08Pex9SFmIru4biwPRJHMlrWYe+Z3y+BPINlzjDmb582alKzSD9daXbfmPEgayUMgJ9kzQFiozSIVdYwZ5y/omSvFmP1jrFxPuxc4ipTrSF5AgGfkuTRF2q4H20JJDusQWdykbLwyUGA5o+7ua2+YaE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1752686807; 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=I7HHDjdxFdMzPaAdUoWmAmkFEVUaW8PBBDWsg7Z3n6M=; b=msOzd/7JsJqG+gSYtColG4oKdYBgLoJckPFm7DJsRzl4HfRJv3ZPUTqibyIPLRrBeeGaeAAvnKqyg46/3bWx9JILWYiVrhs4r/7C5a/yxPbYQ6jokaJh2B8+92FmCuyRWocTdjwNER68WaLq1p6m8TJGbJCQLR0TjJeRSXlVGCg= 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 17526868069781009.6319821534336; Wed, 16 Jul 2025 10:26:46 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uc5tB-00039a-7J; Wed, 16 Jul 2025 13:25:53 -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 1uc5t6-0002zV-7e for qemu-devel@nongnu.org; Wed, 16 Jul 2025 13:25:48 -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 1uc5t2-000879-OK for qemu-devel@nongnu.org; Wed, 16 Jul 2025 13:25:47 -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-376-tj7cYCc5ODWa1mGdNRQ46g-1; Wed, 16 Jul 2025 13:25:39 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (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 E32B019560B2; Wed, 16 Jul 2025 17:25:38 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.45.242.6]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 2C56518003FC; Wed, 16 Jul 2025 17:25:38 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 68A5B21E6935; Wed, 16 Jul 2025 19:25:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1752686743; 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=I7HHDjdxFdMzPaAdUoWmAmkFEVUaW8PBBDWsg7Z3n6M=; b=VF1pBcOU+EZfTurHRloC1drpGJi+T4gLmgar9uI3e4Q9TbQfMFqnlHYlXBY/eOPoOqdHbM j0TLtAVWiNs/RVRR8lFkp8vmSZjDoowhTwQzyPh1O6WossieQiBBK66q1Fa0nKZPSTp1CP KciiCN+5VcILRcHPcHYFdyMlMg1iEfI= X-MC-Unique: tj7cYCc5ODWa1mGdNRQ46g-1 X-Mimecast-MFC-AGG-ID: tj7cYCc5ODWa1mGdNRQ46g_1752686739 From: Markus Armbruster To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, Steve Sistare , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 3/6] tests/qtest/qom-test: unit test for qom-list-get Date: Wed, 16 Jul 2025 19:25:32 +0200 Message-ID: <20250716172535.3520175-4-armbru@redhat.com> In-Reply-To: <20250716172535.3520175-1-armbru@redhat.com> References: <20250716172535.3520175-1-armbru@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.93 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=armbru@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_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: 1752686807743116600 From: Steve Sistare Add a unit test for qom-list-get. Signed-off-by: Steve Sistare Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Markus Armbruster Message-ID: <1752248703-217318-4-git-send-email-steven.sistare@oracle.com> Signed-off-by: Markus Armbruster --- tests/qtest/qom-test.c | 116 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 115 insertions(+), 1 deletion(-) diff --git a/tests/qtest/qom-test.c b/tests/qtest/qom-test.c index 27d70bc11c..4ade1c728c 100644 --- a/tests/qtest/qom-test.c +++ b/tests/qtest/qom-test.c @@ -11,11 +11,119 @@ =20 #include "qobject/qdict.h" #include "qobject/qlist.h" +#include "qobject/qstring.h" #include "qemu/cutils.h" #include "libqtest.h" =20 +#define RAM_NAME "node0" +#define RAM_SIZE 65536 + static int verbosity_level; =20 +/* + * Verify that the /object/RAM_NAME 'size' property is RAM_SIZE. + */ +static void test_list_get_value(QTestState *qts) +{ + QDict *args =3D qdict_new(); + g_autoptr(QDict) response =3D NULL; + g_autoptr(QList) paths =3D qlist_new(); + QListEntry *entry, *prop_entry; + const char *prop_name; + QList *properties, *return_list; + QDict *obj; + + qlist_append_str(paths, "/objects/" RAM_NAME); + qdict_put_obj(args, "paths", QOBJECT(qlist_copy(paths))); + response =3D qtest_qmp(qts, "{ 'execute': 'qom-list-get'," + " 'arguments': %p }", args); + g_assert(response); + g_assert(qdict_haskey(response, "return")); + return_list =3D qobject_to(QList, qdict_get(response, "return")); + + entry =3D QTAILQ_FIRST(&return_list->head); + obj =3D qobject_to(QDict, qlist_entry_obj(entry)); + g_assert(qdict_haskey(obj, "properties")); + properties =3D qobject_to(QList, qdict_get(obj, "properties")); + + QLIST_FOREACH_ENTRY(properties, prop_entry) { + QDict *prop =3D qobject_to(QDict, qlist_entry_obj(prop_entry)); + + g_assert(qdict_haskey(prop, "name")); + g_assert(qdict_haskey(prop, "value")); + + prop_name =3D qdict_get_str(prop, "name"); + if (!strcmp(prop_name, "type")) { + g_assert_cmpstr(qdict_get_str(prop, "value"), =3D=3D, + "memory-backend-ram"); + + } else if (!strcmp(prop_name, "size")) { + g_assert_cmpint(qdict_get_int(prop, "value"), =3D=3D, RAM_SIZE= ); + } + } +} + +static void test_list_get(QTestState *qts, QList *paths) +{ + QListEntry *entry, *prop_entry, *path_entry; + g_autoptr(QDict) response =3D NULL; + QDict *args =3D qdict_new(); + QDict *prop; + QList *return_list; + + if (verbosity_level >=3D 2) { + g_test_message("Obtaining properties for paths:"); + QLIST_FOREACH_ENTRY(paths, path_entry) { + QString *qstr =3D qobject_to(QString, qlist_entry_obj(path_ent= ry)); + g_test_message(" %s", qstring_get_str(qstr)); + } + } + + qdict_put_obj(args, "paths", QOBJECT(qlist_copy(paths))); + response =3D qtest_qmp(qts, "{ 'execute': 'qom-list-get'," + " 'arguments': %p }", args); + g_assert(response); + g_assert(qdict_haskey(response, "return")); + return_list =3D qobject_to(QList, qdict_get(response, "return")); + g_assert(!qlist_empty(return_list)); + + path_entry =3D QTAILQ_FIRST(&paths->head); + QLIST_FOREACH_ENTRY(return_list, entry) { + QDict *obj =3D qobject_to(QDict, qlist_entry_obj(entry)); + g_assert(qdict_haskey(obj, "properties")); + QList *properties =3D qobject_to(QList, qdict_get(obj, "properties= ")); + bool has_child =3D false; + + QLIST_FOREACH_ENTRY(properties, prop_entry) { + prop =3D qobject_to(QDict, qlist_entry_obj(prop_entry)); + g_assert(qdict_haskey(prop, "name")); + g_assert(qdict_haskey(prop, "type")); + has_child |=3D strstart(qdict_get_str(prop, "type"), "child<",= NULL); + } + + if (has_child) { + /* build a list of child paths */ + QString *qstr =3D qobject_to(QString, qlist_entry_obj(path_ent= ry)); + const char *path =3D qstring_get_str(qstr); + g_autoptr(QList) child_paths =3D qlist_new(); + + QLIST_FOREACH_ENTRY(properties, prop_entry) { + prop =3D qobject_to(QDict, qlist_entry_obj(prop_entry)); + if (strstart(qdict_get_str(prop, "type"), "child<", NULL))= { + g_autofree char *child_path =3D g_strdup_printf( + "%s/%s", path, qdict_get_str(prop, "name")); + qlist_append_str(child_paths, child_path); + } + } + + /* fetch props for all children with one qom-list-get call */ + test_list_get(qts, child_paths); + } + + path_entry =3D QTAILQ_NEXT(path_entry, next); + } +} + static void test_properties(QTestState *qts, const char *path, bool recurs= e) { char *child_path; @@ -85,8 +193,10 @@ static void test_machine(gconstpointer data) const char *machine =3D data; QDict *response; QTestState *qts; + g_autoptr(QList) paths =3D qlist_new(); =20 - qts =3D qtest_initf("-machine %s", machine); + qts =3D qtest_initf("-machine %s -object memory-backend-ram,id=3D%s,si= ze=3D%d", + machine, RAM_NAME, RAM_SIZE); =20 if (g_test_slow()) { /* Make sure we can get the machine class properties: */ @@ -101,6 +211,10 @@ static void test_machine(gconstpointer data) =20 test_properties(qts, "/machine", true); =20 + qlist_append_str(paths, "/machine"); + test_list_get(qts, paths); + test_list_get_value(qts); + response =3D qtest_qmp(qts, "{ 'execute': 'quit' }"); g_assert(qdict_haskey(response, "return")); qobject_unref(response); --=20 2.49.0 From nobody Sat Nov 15 09:31:55 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=1752686773; cv=none; d=zohomail.com; s=zohoarc; b=N7A7VAUW3pVZ4o8XqCgxaTLctkJSTbfFi5Uh4ooka+V39AoY0ty4n3mEbr/tjH+BF55lyAkh1yCYjPmZfJ7Cq5CppGmvnV404mLVdLgjEYVRuf+RBEPI+O2yCzqcFHXh5fG1690kPPUa83aU3pONd1/LPGuz5GLo26bVmfNOV3o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1752686773; 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=FPUlDJRm3C4ZC75Wzw+UoTp2VLEQ+sxvcVRKb5M1UQ8=; b=VEe5mQRKFFE6KemWIaLWcziXjviWLP2NA3i6OVXJHTs1dlOT0Qf3cgVtDI1+UCDRZFnND489eSgO/aDp2nqUYPQjPohlfhYiNPaE4bugKhaABUND1VNTuME5OjbVJd6GvAs/zZ0fDXbSwyvxUXLNbgJbmsdFY81T/kZa9Z4Y7Zs= 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 1752686773542893.0423583920876; Wed, 16 Jul 2025 10:26:13 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uc5t9-00036v-V1; Wed, 16 Jul 2025 13:25:51 -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 1uc5t5-0002yR-J8 for qemu-devel@nongnu.org; Wed, 16 Jul 2025 13:25:48 -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 1uc5t0-00086c-8c for qemu-devel@nongnu.org; Wed, 16 Jul 2025 13:25:47 -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-111-sGVv4119NWe1ELS8H5o4qg-1; Wed, 16 Jul 2025 13:25:39 -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 B1FFE1800292; Wed, 16 Jul 2025 17:25:38 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.45.242.6]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 1A07819373D8; Wed, 16 Jul 2025 17:25:38 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 6C97321E675E; Wed, 16 Jul 2025 19:25:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1752686740; 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=FPUlDJRm3C4ZC75Wzw+UoTp2VLEQ+sxvcVRKb5M1UQ8=; b=gdGyWXNkpXjwoVadtAh4vrllP03RAIO0N5LHBhNvKvkMdHSEVr39voBxsPfR9HccXVkL7R jRBF9Gmhi+5JElStfBf0wSOUPIbk9ZQ29XXIgXMD19NhItdyhATKwbdTbrQV8dYSszqarz xRbPQrfa6/kuFUpz5uCQ6BNfE0FhGuM= X-MC-Unique: sGVv4119NWe1ELS8H5o4qg-1 X-Mimecast-MFC-AGG-ID: sGVv4119NWe1ELS8H5o4qg_1752686738 From: Markus Armbruster To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, Akihiko Odaki , John Snow , Thomas Huth Subject: [PULL 4/6] docs: Bump sphinx to 6.2.1 Date: Wed, 16 Jul 2025 19:25:33 +0200 Message-ID: <20250716172535.3520175-5-armbru@redhat.com> In-Reply-To: <20250716172535.3520175-1-armbru@redhat.com> References: <20250716172535.3520175-1-armbru@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.129.124; envelope-from=armbru@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_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: 1752686775512116600 Content-Type: text/plain; charset="utf-8" From: Akihiko Odaki sphinx 5.3.0 fails with Python 3.13.1: ../docs/meson.build:37: WARNING: /home/me/qemu/build/pyvenv/bin/sphinx-buil= d: Extension error: Could not import extension sphinx.builders.epub3 (exception: No module name= d 'imghdr') ../docs/meson.build:39:6: ERROR: Problem encountered: Install a Python 3 ve= rsion of python-sphinx and the readthedoc theme Bump sphinx to 6.2.1 and also sphinx_rtd_theme as required for the new sphinx version. (jsnow note: this patch bumps the recommended version for Sphinx to install when it is missing, but allows old versions to be used if they are present and functional. The version used for building docs on readthedocs is pinned to the recommended version, 6.2.1.) Signed-off-by: Akihiko Odaki Tested-by: Markus Armbruster Reviewed-by: John Snow Signed-off-by: John Snow Message-ID: <20250715212848.171879-2-jsnow@redhat.com> Reviewed-by: Thomas Huth Signed-off-by: Markus Armbruster --- docs/requirements.txt | 4 ++-- pythondeps.toml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index 02583f209a..87f7afcb2e 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,5 +1,5 @@ # Used by readthedocs.io # Should be in sync with the "installed" key of pythondeps.toml =20 -sphinx=3D=3D5.3.0 -sphinx_rtd_theme=3D=3D1.1.1 +sphinx=3D=3D6.2.1 +sphinx_rtd_theme=3D=3D1.2.2 diff --git a/pythondeps.toml b/pythondeps.toml index 7884ab521d..b2eec940ce 100644 --- a/pythondeps.toml +++ b/pythondeps.toml @@ -24,8 +24,8 @@ pycotap =3D { accepted =3D ">=3D1.1.0", installed =3D "1.= 3.1" } =20 [docs] # Please keep the installed versions in sync with docs/requirements.txt -sphinx =3D { accepted =3D ">=3D3.4.3", installed =3D "5.3.0", canary =3D "= sphinx-build" } -sphinx_rtd_theme =3D { accepted =3D ">=3D0.5", installed =3D "1.1.1" } +sphinx =3D { accepted =3D ">=3D3.4.3", installed =3D "6.2.1", canary =3D "= sphinx-build" } +sphinx_rtd_theme =3D { accepted =3D ">=3D0.5", installed =3D "1.2.2" } =20 [testdeps] qemu.qmp =3D { accepted =3D ">=3D0.0.3", installed =3D "0.0.3" } --=20 2.49.0 From nobody Sat Nov 15 09:31:56 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=1752686819; cv=none; d=zohomail.com; s=zohoarc; b=QkS6Wyxt7P7t0008C4RCE9N5zQp6fWBOWQbY8i7jUvunN0pRmXtPWVe4jNUoIJbiEH8U4wKrdDZyI5rnbOlgpqbVpxYyYI6fDZz43bYX2MXMivrLwF3G1yvuMPS+kv/Q9K0ROkeGfj/FecLmo7I0Q5vA70Ly0FqtoV794hDoWgk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1752686818; 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=2e/pVvhtHMbcOnZ8ItHw9M708WrBDptEouqHTHbBKVM=; b=QTsjA54ZPpMGAT2hnE2fmXpDBKWPAdjTGyTpFFRtVNP+bwyLsLZfmLRR/VsIX5Z7zQxc+ejB9zsSX2oW5deOF4udyjez5nhmUKkLFmCnw2vGqFCRYRRe1v2Xyu0g96qTg9XHzOAFD15m94Jn1xCHn8Kbe/zGVjMG9On6ldPiD+U= 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 1752686818992810.8454178378896; Wed, 16 Jul 2025 10:26:58 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uc5tB-0003Aq-TQ; Wed, 16 Jul 2025 13:25:54 -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 1uc5t7-00033D-Hd for qemu-devel@nongnu.org; Wed, 16 Jul 2025 13:25:49 -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 1uc5t5-00088D-S3 for qemu-devel@nongnu.org; Wed, 16 Jul 2025 13:25:49 -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-472-crBSTxisPkKh0Gri1Hx-UQ-1; Wed, 16 Jul 2025 13:25:42 -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-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id CF0CF19560B2; Wed, 16 Jul 2025 17:25:41 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.45.242.6]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 5207C1955F16; Wed, 16 Jul 2025 17:25:41 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 7056121E676A; Wed, 16 Jul 2025 19:25:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1752686747; 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=2e/pVvhtHMbcOnZ8ItHw9M708WrBDptEouqHTHbBKVM=; b=EovfSB0b552j/YCek4CxmARvWc27vuPRaUk+EspMfykOyikt/7nisGPXsV8yL+BcQ9RF48 Hgd9GfY+/rQfbHBX6weUqOPCOcDqhhlLtGHhOxYI/PhM7+HbM/m4R+oSbbQoSv05PKn4fu SRGM0C7MFu4ZgR9/bzPfefblcilJqt0= X-MC-Unique: crBSTxisPkKh0Gri1Hx-UQ-1 X-Mimecast-MFC-AGG-ID: crBSTxisPkKh0Gri1Hx-UQ_1752686741 From: Markus Armbruster To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, Akihiko Odaki , John Snow , Thomas Huth Subject: [PULL 5/6] MAINTAINERS: Add docs/requirements.txt Date: Wed, 16 Jul 2025 19:25:34 +0200 Message-ID: <20250716172535.3520175-6-armbru@redhat.com> In-Reply-To: <20250716172535.3520175-1-armbru@redhat.com> References: <20250716172535.3520175-1-armbru@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=armbru@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_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: 1752686819870116600 Content-Type: text/plain; charset="utf-8" From: Akihiko Odaki Add docs/requirements.txt to "Sphinx documentation configuration and build machinery". Signed-off-by: Akihiko Odaki Signed-off-by: John Snow Message-ID: <20250715212848.171879-3-jsnow@redhat.com> Reviewed-by: Thomas Huth Signed-off-by: Markus Armbruster --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index bc0af3e8dd..a462345618 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -4428,6 +4428,7 @@ M: Peter Maydell S: Maintained F: docs/conf.py F: docs/*/conf.py +F: docs/requirements.txt F: docs/sphinx/ F: docs/_templates/ F: docs/devel/docs.rst --=20 2.49.0 From nobody Sat Nov 15 09:31:56 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=1752686759; cv=none; d=zohomail.com; s=zohoarc; b=iHs9jnF8zs/RYiV8FpdA72bbnG0h6LBUULvHlnM9f2l6ZhYBn43VXPKc21/XUgTjPw16CcHPSPdsdeGfniNC/LqotMjBnxvhsktg8iZsrlPQkbmgh9Xg18w0dI+GFrdAtuOG2p5e9eOs0nACh1BvFyKE0lFyjPxOpLyXqYP2+eo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1752686759; 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=2VmYcaAWrzHYKzdLBAzRIHRGWAPQr/dchlEpupFY0ww=; b=XpAV26GwOjxVsw/aniAVjMwyplY6JwrBaCvNqaTHBTXadz4iPoZPxQdHI1Y/INXxh0r9CfW/H/VrrjgsihDdi7wplDHl8+Xy/Sbbnt2x1/kVqap+Ui8wHhONbDa4gkcpZUXVozvApveK/Z8PpsUwkcUq/p8YPkTnkDNEXRfhdgc= 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 1752686759471975.6601300309684; Wed, 16 Jul 2025 10:25:59 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uc5t7-00031F-BX; Wed, 16 Jul 2025 13:25: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 1uc5t4-0002wI-Lb for qemu-devel@nongnu.org; Wed, 16 Jul 2025 13:25:46 -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 1uc5t2-00087A-ET for qemu-devel@nongnu.org; Wed, 16 Jul 2025 13:25:46 -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-346-6OG9UCZ7ND-o2TJ-d3vfQQ-1; Wed, 16 Jul 2025 13:25:42 -0400 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (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 8AE901800165 for ; Wed, 16 Jul 2025 17:25:41 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.45.242.6]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 4366B180045B for ; Wed, 16 Jul 2025 17:25:41 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 74ADE21E6741; Wed, 16 Jul 2025 19:25:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1752686743; 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=2VmYcaAWrzHYKzdLBAzRIHRGWAPQr/dchlEpupFY0ww=; b=BwCM4xoYlLRPxmESGQNRYjqk9gfnSMcKLjVLAYlOMf8XuW7MTSa2+llL9OGJ1gYzQzflOx 3Q9I2bsOED8ZDB+2R4Cv3pPt4qt48utCIYP0aHPXfjwehplo8oY9dvNE90BZmJUsLDZCg4 EYFH6/278FoysHQqZwsQNQd04hJzrxs= X-MC-Unique: 6OG9UCZ7ND-o2TJ-d3vfQQ-1 X-Mimecast-MFC-AGG-ID: 6OG9UCZ7ND-o2TJ-d3vfQQ_1752686741 From: Markus Armbruster To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, John Snow Subject: [PULL 6/6] python: fix editable installs for modern pip/setuptools Date: Wed, 16 Jul 2025 19:25:35 +0200 Message-ID: <20250716172535.3520175-7-armbru@redhat.com> In-Reply-To: <20250716172535.3520175-1-armbru@redhat.com> References: <20250716172535.3520175-1-armbru@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 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=armbru@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_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: 1752686761642116600 Content-Type: text/plain; charset="utf-8" From: John Snow The way editable installs work has changed at some point since Fedora 40 was released. Generally, we should be opting to use pyproject.toml installs (PEP517/518) - but those are not fully supported until v61 of setuptools, and CentOS Stream 9 ships v53. Until that time, we can make use of a transitional feature in pip/setuptools to use "legacy" editable installs, which is enough to fix "make check-dev" on modern local workstations for now. By using the environment variable approach to configure pip, we avoid any problems for older versions of pip that don't recognize this option, so it's harmless. The config-settings option first appeared in v23 of pip. editable_mode was first supported by setuptools in v64. (I'm not currently precisely aware of when the default behavior of '-e' switched away from 'compat', but it appears to be a joint effect between setuptools and pip versions.) Version information for supported build platforms: distro python3 pip setuptools sphinx Tested-by: Markus Armbruster -------------------------------------------------------- centos_stream_9 3.9.23 21.3.1 53.0.0 3.4.3 ubuntu_22_04 3.10.12 22.0.2 59.6.0 4.3.2 ** pyproject.toml installs supported as of here ** freebsd 3.11.13 23.3.2 63.1.0 5.3.0 debian_12 3.11.2 23.0.1 66.1.1 5.3.0 ubuntu_24_04 3.12.3 24.0 68.1.2 7.2.6 centos_stream_10 3.12.11 23.3.2 69.0.3 7.2.6 fedora_41 3.13.5 24.2 69.2.0 7.3.7 alpine_3_19 3.11.13 23.3.1 70.3.0 6.2.1 alpine_3_20 3.12.11 24.0 70.3.0 7.2.6 alpine_3_21 3.12.11 24.3.1 70.3.0 8.1.3 ubuntu_24_10 3.12.7 24.2 74.1.2 7.4.7 fedora_42 3.13.5 24.3.1 74.1.3 8.1.3 ubuntu_25_04 3.13.3 25.0 75.8.0 8.1.3 macports 3.13.5 25.1.1 78.1.1 8.2.3 openbsd 3.12.11 25.1.1 79.0.1 8.2.3 alpine_3_22 3.12.11 25.1.1 80.9.0 8.2.3 homebrew 3.13.5 --- 80.9.0 8.2.3 pkgsrc_current 3.12.11 25.1.1 80.9.0 8.2.3 Signed-off-by: John Snow Message-ID: <20250715222548.198888-1-jsnow@redhat.com> Tested-by: Markus Armbruster Signed-off-by: Markus Armbruster --- python/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/Makefile b/python/Makefile index 764b79ccb2..32aedce413 100644 --- a/python/Makefile +++ b/python/Makefile @@ -68,7 +68,7 @@ $(QEMU_MINVENV_DIR) $(QEMU_MINVENV_DIR)/bin/activate: set= up.cfg tests/minreqs.tx echo "INSTALL -r tests/minreqs.txt $(QEMU_MINVENV_DIR)";\ $(PIP_INSTALL) -r tests/minreqs.txt 1>/dev/null; \ echo "INSTALL -e qemu $(QEMU_MINVENV_DIR)"; \ - $(PIP_INSTALL) -e . 1>/dev/null; \ + PIP_CONFIG_SETTINGS=3D"editable_mode=3Dcompat" $(PIP_INSTALL) -e . 1>/de= v/null; \ ) @touch $(QEMU_MINVENV_DIR) =20 @@ -103,7 +103,7 @@ check-dev: dev-venv =20 .PHONY: develop develop: - $(PIP_INSTALL) -e .[devel] + PIP_CONFIG_SETTINGS=3D"editable_mode=3Dcompat" $(PIP_INSTALL) -e .[devel] =20 .PHONY: check check: --=20 2.49.0