From nobody Wed Feb 11 00:59:39 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=none dis=none) header.from=yandex-team.ru ARC-Seal: i=1; a=rsa-sha256; t=1682077314; cv=none; d=zohomail.com; s=zohoarc; b=I0y3KrGBU8m4PnJqcdeK/Ujmd1lmfOxK/gclS84XNvvWc4EQBU7f7DgutPQevLuGmnpcZJjgj6wRsNxkCzx+Cju2ITeVLVOWhqHVfEqB9YLa3CWA8nRtwhZVablWssnaMvC7nSYnoWcYndTxVXCsTjYOJcYJ6NFsDl1k5qk8gSk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1682077314; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=fDyWzxUnkejgaTPlhVdraFKY1+bzlYe8s7QSj4Rp7wo=; b=Yz6yotvxc8Bh002LgkmsEXAlKwW+Vx1OGyjIRmBSz7gOGwQVeGHPDCP5h7sX5mkNnhGfmpkA+EshebGmf3Td+wpMVmmQAlpfY3F8GP3AeCLMpsLTaZu2ZVJL0BCGz0zvpG3BaT8iUBfM726ocSbLxwlEHqTSHdJZGd9E9bm+TAM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1682077314250758.2323695040199; Fri, 21 Apr 2023 04:41:54 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ppp95-0006xn-07; Fri, 21 Apr 2023 07:41:43 -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 1ppp8u-0006mf-Cd; Fri, 21 Apr 2023 07:41:33 -0400 Received: from forwardcorp1b.mail.yandex.net ([178.154.239.136]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ppp8s-0001HL-OX; Fri, 21 Apr 2023 07:41:32 -0400 Received: from mail-nwsmtp-smtp-corp-main-44.iva.yp-c.yandex.net (mail-nwsmtp-smtp-corp-main-44.iva.yp-c.yandex.net [IPv6:2a02:6b8:c0c:7f29:0:640:9a2b:0]) by forwardcorp1b.mail.yandex.net (Yandex) with ESMTP id 4516E61965; Fri, 21 Apr 2023 14:41:22 +0300 (MSK) Received: from vsementsov-nix.yandex.net (unknown [2a02:6b8:b081:8816::1:4]) by mail-nwsmtp-smtp-corp-main-44.iva.yp-c.yandex.net (smtpcorp/Yandex) with ESMTPSA id 3fdrVT1OnCg0-Puvb34Bs; Fri, 21 Apr 2023 14:41:21 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex-team.ru; s=default; t=1682077281; bh=fDyWzxUnkejgaTPlhVdraFKY1+bzlYe8s7QSj4Rp7wo=; h=Message-Id:Date:In-Reply-To:Cc:Subject:References:To:From; b=d76fKiSVYfFd9MjKycjjChY2kFkoe9iQLjnuA9y7e2nWVITKkRDk9l9GJ7ISCZWZ7 Bk669Zl0BtzVTgoN3F49EDJ4v8L+NL4rWNWmRgICfTmkPxt8IL02+Ihi1rbQPo1OP6 jag1Mr0ixRCPkSB2ie4aTZv2rhxszExGhKWLdapQ= Authentication-Results: mail-nwsmtp-smtp-corp-main-44.iva.yp-c.yandex.net; dkim=pass header.i=@yandex-team.ru From: Vladimir Sementsov-Ogievskiy To: qemu-block@nongnu.org Cc: qemu-devel@nongnu.org, pbonzini@redhat.com, armbru@redhat.com, eblake@redhat.com, hreitz@redhat.com, kwolf@redhat.com, den@openvz.org, alexander.ivanov@virtuozzo.com, Vladimir Sementsov-Ogievskiy Subject: [PATCH v7 6/7] iotests.py: introduce VM.assert_edges_list() method Date: Fri, 21 Apr 2023 14:41:01 +0300 Message-Id: <20230421114102.884457-7-vsementsov@yandex-team.ru> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230421114102.884457-1-vsementsov@yandex-team.ru> References: <20230421114102.884457-1-vsementsov@yandex-team.ru> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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=178.154.239.136; envelope-from=vsementsov@yandex-team.ru; helo=forwardcorp1b.mail.yandex.net 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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @yandex-team.ru) X-ZM-MESSAGEID: 1682077314657100001 Content-Type: text/plain; charset="utf-8" Add an alternative method to check block graph, to be used in further commit. Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/iotests.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index 3e82c634cf..3ff172e409 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-iotests/iotests.py @@ -1092,6 +1092,23 @@ def check_bitmap_status(self, node_name, bitmap_name= , fields): =20 return fields.items() <=3D ret.items() =20 + def get_block_graph(self): + """ + Returns block graph in form of edges list, where each edge is a tu= ple: + (parent_node_name, child_name, child_node_name) + """ + graph =3D self.qmp('x-debug-query-block-graph')['return'] + + nodes =3D {n['id']: n['name'] for n in graph['nodes']} + # Check that all names are unique: + assert len(set(nodes.values())) =3D=3D len(nodes) + + return [(nodes[e['parent']], e['name'], nodes[e['child']]) + for e in graph['edges']] + + def assert_edges_list(self, edges): + assert sorted(edges) =3D=3D sorted(self.get_block_graph()) + def assert_block_path(self, root, path, expected_node, graph=3DNone): """ Check whether the node under the given path in the block graph --=20 2.34.1