From patchwork Wed Mar 30 10:12:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Sementsov-Ogievskiy X-Patchwork-Id: 12795651 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5FA3BC433EF for ; Wed, 30 Mar 2022 10:18:37 +0000 (UTC) Received: from localhost ([::1]:56936 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nZVPQ-00067r-Ea for qemu-devel@archiver.kernel.org; Wed, 30 Mar 2022 06:18:36 -0400 Received: from eggs.gnu.org ([209.51.188.92]:41202) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nZVJb-0002P1-EF; Wed, 30 Mar 2022 06:12:35 -0400 Received: from smtp46.i.mail.ru ([94.100.177.106]:50026) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nZVJX-0007yv-03; Wed, 30 Mar 2022 06:12:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mail.ru; s=mail4; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:From:Subject:Content-Type:Content-Transfer-Encoding:To:Cc; bh=qq5hGYlhQI8/PO9gX4HM/5ClgTPUuwnP/BGZRi8BUhU=; t=1648635151;x=1649240551; b=NIxb8m2e9wfg3x2rFbkUvrt1kFhMONjjKmhymjXZvaAeuOZa6sqK37R+P+fNNXUA8StxLSE3pmD1x4gbr5Z9HPif0OjoIKmnsC4jGYaBHix/oYkU1+FYv3Q0V6gLjqKnhFygvmgd6ccL6wR2SBXN5iLm6l1ouwD6UuCv8LFHSWXgPigU8lMmeAXb72vgh4ZUSX3OMtHcBRI2QOVRr1m31/4lWf5Mert4HBEE4tpqCVbN0j6XN6rrgzo2O68s31cRw55pTN9oI74gJHgdUKo+YqT9iTQ+PAskbGjDE2hbpT748W0BNA16WslD4bZ8V86yzAonAhGb3m0FsZeowOkP6Q==; Received: by smtp46.i.mail.ru with esmtpa (envelope-from ) id 1nZVJT-00048P-K1; Wed, 30 Mar 2022 13:12:27 +0300 From: Vladimir Sementsov-Ogievskiy To: qemu-block@nongnu.org Cc: qemu-devel@nongnu.org, kwolf@redhat.com, hreitz@redhat.com, v.sementsov-og@mail.ru Subject: [PATCH v4 42/45] iotests.py: add VM.qmp_check() helper Date: Wed, 30 Mar 2022 13:12:14 +0300 Message-Id: <20220330101217.4229-4-v.sementsov-og@mail.ru> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220329204107.411011-1-v.sementsov-og@mail.ru> References: <20220329204107.411011-1-v.sementsov-og@mail.ru> MIME-Version: 1.0 Authentication-Results: smtp46.i.mail.ru; auth=pass smtp.auth=v.sementsov-og@mail.ru smtp.mailfrom=v.sementsov-og@mail.ru X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD92B0439D57C14BB6192E24B2D0C9984234FD2B328F115259D00894C459B0CD1B938925D3E27DC8DF5E01D1FC311463D40338E05E3556DF6F75083F157FA65ABDB X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7B9FBA884A7C9B8BAEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F790063773AA33509B65BC498638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D83ACABCE5049A777208A923DA738647C96F9789CCF6C18C3F8528715B7D10C86878DA827A17800CE7D9442B0B5983000E8941B15DA834481FA18204E546F3947C062BEEFFB5F8EA3EF6B57BC7E64490618DEB871D839B7333395957E7521B51C2DFABB839C843B9C08941B15DA834481F8AA50765F7900637FD2911E685725BF8389733CBF5DBD5E9B5C8C57E37DE458BD9DD9810294C998ED8FC6C240DEA76428AA50765F7900637F4096A7EA95EDF63D81D268191BDAD3DBD4B6F7A4D31EC0BEA7A3FFF5B025636D81D268191BDAD3D78DA827A17800CE7086EDD8B8D7AD884EC76A7562686271EEC990983EF5C03292E808ACE2090B5E14AD6D5ED66289B5259CC434672EE63711DD303D21008E298D5E8D9A59859A8B6B372FE9A2E580EFC725E5C173C3A84C3F6F64B09A546065435872C767BF85DA2F004C90652538430E4A6367B16DE6309 X-8FC586DF: 6EFBBC1D9D64D975 X-C1DE0DAB: C20DE7B7AB408E4181F030C43753B8186998911F362727C414F749A5E30D975CF593E0A4FA3DD8F5FE7F73E811A2BD7069E986F5EB4485A49C2B6934AE262D3EE7EAB7254005DCED7532B743992DF240BDC6A1CF3F042BAD6DF99611D93F60EFD07623A0E6354027699F904B3F4130E343918A1A30D5E7FCCB5012B2E24CD356 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D349FF8F8245A2FAA7BE06697AF8F52D5559C198142608DC381EDCA4E1465A088AA54F2A43C3B3345391D7E09C32AA3244C987489CAF5164E88669B26F5685A5E2833C9DC155518937F83B48618A63566E0 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojlgoDDUY05+UtyKRavZiNuQ== X-Mailru-Sender: 6C3E74F07C41AE94618A7CFF02C4D1FEF59FC8FC90DF386964EF6E210062E6CCD0BDB79D865F2E0FE6462B2528CDCABCE234FDC7CE4030BEBA6D275AA6409EB3BDC3C9FB484E02823A35ECB215E68A28E3F6503ABEB32C155FEEDEB644C299C0ED14614B50AE0675 X-Mras: Ok Received-SPF: pass client-ip=94.100.177.106; envelope-from=v.sementsov-og@mail.ru; helo=smtp46.i.mail.ru X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-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+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" I'm tired of this pattern being everywhere. Let's add a helper. Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/iotests.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index 933e354822..88aea57f81 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-iotests/iotests.py @@ -937,6 +937,10 @@ def get_block_graph(self): def assert_edges_list(self, edges): assert sorted(edges) == sorted(self.get_block_graph()) + def qmp_check(self, *args, **kwargs): + result = self.qmp(*args, **kwargs) + assert result == {'return': {}} + def assert_block_path(self, root, path, expected_node, graph=None): """ Check whether the node under the given path in the block graph