From nobody Wed Nov 27 19:43:15 2024 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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1697224329; cv=none; d=zohomail.com; s=zohoarc; b=lqUapndDOqgOoCYrbX1oN+vl8hnp3I0IXfAWE9jm4BttznAIH7HxsVBP3qVrer3jTKSqODoB8yJBJL5xc8Mx7IGOQv6Pdp4SIjl+tNMqqskd5cNI7b+/6QQVVX6l4sc5/SoaYQChFjm2DmWeDFZ57ndVleGSzXxk9qA39F9U1Lg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1697224329; 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=oa109OK3W3Uo1tZYdj4EWbflCM+wicoxKWR+Wm3G+Zk=; b=GBzNk0AaZUn8A0DUulk8px6jyHw83r5V1M91QcJPrdwaVFDHo5oUtvV7adrRZN426vOEGykWydeUSw6kxjosAenkswoPKt4IPhn0LQFWV9AANMcNrviJ5B138yF8kA3VdnZLdFSzp82oCVzRL4Bq4zylnbXTwLNepxns3rKc9Xk= 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 169722432954831.04315542262816; Fri, 13 Oct 2023 12:12:09 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qrNYo-00087R-FU; Fri, 13 Oct 2023 15:10:58 -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 1qrNYV-0007JM-Is for qemu-devel@nongnu.org; Fri, 13 Oct 2023 15:10:40 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qrNYI-0001zj-Co for qemu-devel@nongnu.org; Fri, 13 Oct 2023 15:10:39 -0400 Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-526-tNIi7r6GNDK3D_TeOkP1rQ-1; Fri, 13 Oct 2023 15:10:11 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 9B32B3813BDB; Fri, 13 Oct 2023 19:10:10 +0000 (UTC) Received: from scv.redhat.com (unknown [10.22.32.124]) by smtp.corp.redhat.com (Postfix) with ESMTP id 65D2740C6CA0; Fri, 13 Oct 2023 19:10:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1697224225; 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=oa109OK3W3Uo1tZYdj4EWbflCM+wicoxKWR+Wm3G+Zk=; b=OkAwSEbei0lYyW7532rOElCkkuuk7tPGpngDXg5AnzI73NsWnWIms367JpcytpTQWb/7Y0 26uylJ1157o3M6UJ0H7ZJ027hNPxlRkZ1sZt//CW59tLbl87hXcuCJiWyYygLb9Ldn4ZR+ b68mtyym3nIajJa/v8rZS3uImlyDdns= X-MC-Unique: tNIi7r6GNDK3D_TeOkP1rQ-1 From: John Snow To: qemu-devel@nongnu.org Cc: Kevin Wolf , Christian Borntraeger , Wainer dos Santos Moschetta , qemu-arm@nongnu.org, Vladimir Sementsov-Ogievskiy , Ani Sinha , Thomas Huth , Beraldo Leal , qemu-s390x@nongnu.org, Peter Xu , Peter Maydell , Markus Armbruster , Hanna Reitz , Vladimir Sementsov-Ogievskiy , John Snow , Eric Blake , Aurelien Jarno , =?UTF-8?q?Alex=20Benn=C3=A9e?= , "Michael S. Tsirkin" , Fabiano Rosas , qemu-block@nongnu.org, Eduardo Habkost , Juan Quintela , Leonardo Bras , Joel Stanley , Paolo Bonzini , Andrew Jeffery , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Eric Farman , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Halil Pasic , Cleber Rosa Subject: [PULL 21/25] iotests: drop some extra ** in qmp() call Date: Fri, 13 Oct 2023 15:09:36 -0400 Message-ID: <20231013190941.3699288-22-jsnow@redhat.com> In-Reply-To: <20231013190941.3699288-1-jsnow@redhat.com> References: <20231013190941.3699288-1-jsnow@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.2 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=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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: 1697224329876100002 Content-Type: text/plain; charset="utf-8" From: Vladimir Sementsov-Ogievskiy qmp() method supports passing dict (if it doesn't need substituting '_' to '-' in keys). So, drop some extra '**' operators. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake Message-id: 20231006154125.1068348-12-vsementsov@yandex-team.ru Signed-off-by: John Snow --- tests/qemu-iotests/040 | 4 +- tests/qemu-iotests/041 | 14 +++--- tests/qemu-iotests/129 | 2 +- tests/qemu-iotests/147 | 2 +- tests/qemu-iotests/155 | 2 +- tests/qemu-iotests/264 | 12 ++--- tests/qemu-iotests/295 | 5 +- tests/qemu-iotests/296 | 15 +++--- tests/qemu-iotests/tests/migrate-bitmaps-test | 4 +- .../tests/mirror-ready-cancel-error | 50 +++++++++---------- 10 files changed, 54 insertions(+), 56 deletions(-) diff --git a/tests/qemu-iotests/040 b/tests/qemu-iotests/040 index e61e7f2433..4b8bf09a5d 100755 --- a/tests/qemu-iotests/040 +++ b/tests/qemu-iotests/040 @@ -774,7 +774,7 @@ class TestCommitWithFilters(iotests.QMPTestCase): result =3D self.vm.qmp('object-add', qom_type=3D'throttle-group', = id=3D'tg') self.assert_qmp(result, 'return', {}) =20 - result =3D self.vm.qmp('blockdev-add', **{ + result =3D self.vm.qmp('blockdev-add', { 'node-name': 'top-filter', 'driver': 'throttle', 'throttle-group': 'tg', @@ -935,7 +935,7 @@ class TestCommitWithOverriddenBacking(iotests.QMPTestCa= se): self.vm.launch() =20 # Use base_b instead of base_a as the backing of top - result =3D self.vm.qmp('blockdev-add', **{ + result =3D self.vm.qmp('blockdev-add', { 'node-name': 'top', 'driver': iotests.imgfmt, 'file': { diff --git a/tests/qemu-iotests/041 b/tests/qemu-iotests/041 index 550e4dc391..3aef42aec8 100755 --- a/tests/qemu-iotests/041 +++ b/tests/qemu-iotests/041 @@ -236,7 +236,7 @@ class TestSingleBlockdev(TestSingleDrive): args =3D {'driver': iotests.imgfmt, 'node-name': self.qmp_target, 'file': { 'filename': target_img, 'driver': 'file' } } - result =3D self.vm.qmp("blockdev-add", **args) + result =3D self.vm.qmp("blockdev-add", args) self.assert_qmp(result, 'return', {}) =20 def test_mirror_to_self(self): @@ -963,7 +963,7 @@ class TestRepairQuorum(iotests.QMPTestCase): #assemble the quorum block device from the individual files args =3D { "driver": "quorum", "node-name": "quorum0", "vote-threshold": 2, "children": [ "img0", "img1", "img2"= ] } - result =3D self.vm.qmp("blockdev-add", **args) + result =3D self.vm.qmp("blockdev-add", args) self.assert_qmp(result, 'return', {}) =20 =20 @@ -1278,7 +1278,7 @@ class TestReplaces(iotests.QMPTestCase): """ Check that we can replace filter nodes. """ - result =3D self.vm.qmp('blockdev-add', **{ + result =3D self.vm.qmp('blockdev-add', { 'driver': 'copy-on-read', 'node-name': 'filter0', 'file': { @@ -1319,7 +1319,7 @@ class TestFilters(iotests.QMPTestCase): self.vm =3D iotests.VM().add_device('virtio-scsi,id=3Dvio-scsi') self.vm.launch() =20 - result =3D self.vm.qmp('blockdev-add', **{ + result =3D self.vm.qmp('blockdev-add', { 'node-name': 'target', 'driver': iotests.imgfmt, 'file': { @@ -1355,7 +1355,7 @@ class TestFilters(iotests.QMPTestCase): os.remove(backing_img) =20 def test_cor(self): - result =3D self.vm.qmp('blockdev-add', **{ + result =3D self.vm.qmp('blockdev-add', { 'node-name': 'filter', 'driver': 'copy-on-read', 'file': self.filterless_chain @@ -1384,7 +1384,7 @@ class TestFilters(iotests.QMPTestCase): assert target_map[1]['depth'] =3D=3D 0 =20 def test_implicit_mirror_filter(self): - result =3D self.vm.qmp('blockdev-add', **self.filterless_chain) + result =3D self.vm.qmp('blockdev-add', self.filterless_chain) self.assert_qmp(result, 'return', {}) =20 # We need this so we can query from above the mirror node @@ -1418,7 +1418,7 @@ class TestFilters(iotests.QMPTestCase): def test_explicit_mirror_filter(self): # Same test as above, but this time we give the mirror filter # a node-name so it will not be invisible - result =3D self.vm.qmp('blockdev-add', **self.filterless_chain) + result =3D self.vm.qmp('blockdev-add', self.filterless_chain) self.assert_qmp(result, 'return', {}) =20 # We need this so we can query from above the mirror node diff --git a/tests/qemu-iotests/129 b/tests/qemu-iotests/129 index c75ec62ecf..e1536ee3c3 100755 --- a/tests/qemu-iotests/129 +++ b/tests/qemu-iotests/129 @@ -87,7 +87,7 @@ class TestStopWithBlockJob(iotests.QMPTestCase): iotests.qemu_img('create', '-f', iotests.imgfmt, self.overlay_img, '1G') =20 - result =3D self.vm.qmp('blockdev-add', **{ + result =3D self.vm.qmp('blockdev-add', { 'node-name': 'overlay', 'driver': iotests.imgfmt, 'file': { diff --git a/tests/qemu-iotests/147 b/tests/qemu-iotests/147 index 770b73e2f4..08111c5108 100755 --- a/tests/qemu-iotests/147 +++ b/tests/qemu-iotests/147 @@ -58,7 +58,7 @@ class NBDBlockdevAddBase(iotests.QMPTestCase): def client_test(self, filename, address, export=3DNone, node_name=3D'nbd-blockdev', delete=3DTrue): bao =3D self.blockdev_add_options(address, export, node_name) - result =3D self.vm.qmp('blockdev-add', **bao) + result =3D self.vm.qmp('blockdev-add', bao) self.assert_qmp(result, 'return', {}) =20 found =3D False diff --git a/tests/qemu-iotests/155 b/tests/qemu-iotests/155 index d3e1b7401e..0c073fd61b 100755 --- a/tests/qemu-iotests/155 +++ b/tests/qemu-iotests/155 @@ -110,7 +110,7 @@ class BaseClass(iotests.QMPTestCase): elif self.target_blockdev_backing: options['backing'] =3D self.target_blockdev_backing =20 - result =3D self.vm.qmp('blockdev-add', **options) + result =3D self.vm.qmp('blockdev-add', options) self.assert_qmp(result, 'return', {}) =20 def tearDown(self): diff --git a/tests/qemu-iotests/264 b/tests/qemu-iotests/264 index 289381e315..d44deb673a 100755 --- a/tests/qemu-iotests/264 +++ b/tests/qemu-iotests/264 @@ -49,12 +49,12 @@ class TestNbdReconnect(iotests.QMPTestCase): assert job in ('blockdev-backup', 'blockdev-mirror') with qemu_nbd_popen('-k', nbd_sock, '-f', iotests.imgfmt, disk_b): result =3D self.vm.qmp('blockdev-add', - **{'node_name': 'backup0', - 'driver': 'raw', - 'file': {'driver': 'nbd', - 'server': {'type': 'unix', - 'path': nbd_sock}, - 'reconnect-delay': 10}}) + {'node-name': 'backup0', + 'driver': 'raw', + 'file': {'driver': 'nbd', + 'server': {'type': 'unix', + 'path': nbd_sock}, + 'reconnect-delay': 10}}) self.assert_qmp(result, 'return', {}) result =3D self.vm.qmp(job, device=3D'drive0', sync=3D'full', target=3D'backup0', diff --git a/tests/qemu-iotests/295 b/tests/qemu-iotests/295 index 270ad3999f..8ebe31054c 100755 --- a/tests/qemu-iotests/295 +++ b/tests/qemu-iotests/295 @@ -102,8 +102,7 @@ class EncryptionSetupTestCase(iotests.QMPTestCase): } } =20 - result =3D self.vm.qmp('blockdev-add', ** - { + result =3D self.vm.qmp('blockdev-add', { 'driver': iotests.imgfmt, 'node-name': id, 'read-only': read_only, @@ -120,7 +119,7 @@ class EncryptionSetupTestCase(iotests.QMPTestCase): =20 # close the encrypted block device def closeImageQmp(self, id): - result =3D self.vm.qmp('blockdev-del', **{ 'node-name': id }) + result =3D self.vm.qmp('blockdev-del', {'node-name': id}) self.assert_qmp(result, 'return', {}) =20 ######################################################################= ##### diff --git a/tests/qemu-iotests/296 b/tests/qemu-iotests/296 index 19a674c5ae..47d2526b72 100755 --- a/tests/qemu-iotests/296 +++ b/tests/qemu-iotests/296 @@ -42,7 +42,7 @@ class Secret: return [ "secret,id=3D" + self._id + ",data=3D" + self._secret] =20 def to_qmp_object(self): - return { "qom_type" : "secret", "id": self.id(), + return { "qom-type" : "secret", "id": self.id(), "data": self.secret() } =20 ##########################################################################= ###### @@ -61,9 +61,9 @@ class EncryptionSetupTestCase(iotests.QMPTestCase): # create the secrets and load 'em into the VMs self.secrets =3D [ Secret(i) for i in range(0, 4) ] for secret in self.secrets: - result =3D self.vm1.qmp("object-add", **secret.to_qmp_object()) + result =3D self.vm1.qmp("object-add", secret.to_qmp_object()) self.assert_qmp(result, 'return', {}) - result =3D self.vm2.qmp("object-add", **secret.to_qmp_object()) + result =3D self.vm2.qmp("object-add", secret.to_qmp_object()) self.assert_qmp(result, 'return', {}) =20 # test case shutdown @@ -135,15 +135,14 @@ class EncryptionSetupTestCase(iotests.QMPTestCase): result =3D vm.qmp(command, options=3D[opts]) self.assert_qmp(result, 'return', {}) else: - result =3D vm.qmp(command, **opts) + result =3D vm.qmp(command, opts) self.assert_qmp(result, 'return', {}) =20 =20 ######################################################################= ##### # add virtio-blk consumer for a block device def addImageUser(self, vm, id, disk_id, share_rw=3DFalse): - result =3D vm.qmp('device_add', ** - { + result =3D vm.qmp('device_add', { 'driver': 'virtio-blk', 'id': id, 'drive': disk_id, @@ -155,7 +154,7 @@ class EncryptionSetupTestCase(iotests.QMPTestCase): =20 # close the encrypted block device def closeImageQmp(self, vm, id): - result =3D vm.qmp('blockdev-del', **{ 'node-name': id }) + result =3D vm.qmp('blockdev-del', {'node-name': id}) self.assert_qmp(result, 'return', {}) =20 ######################################################################= ##### @@ -174,7 +173,7 @@ class EncryptionSetupTestCase(iotests.QMPTestCase): }, } =20 - result =3D vm.qmp('x-blockdev-amend', **args) + result =3D vm.qmp('x-blockdev-amend', args) iotests.log(result) # Run the job only if it was created event =3D ('JOB_STATUS_CHANGE', diff --git a/tests/qemu-iotests/tests/migrate-bitmaps-test b/tests/qemu-iot= ests/tests/migrate-bitmaps-test index 8668caae1e..eebb256485 100755 --- a/tests/qemu-iotests/tests/migrate-bitmaps-test +++ b/tests/qemu-iotests/tests/migrate-bitmaps-test @@ -67,7 +67,7 @@ class TestDirtyBitmapMigration(iotests.QMPTestCase): if persistent: params['persistent'] =3D True =20 - result =3D vm.qmp('block-dirty-bitmap-add', **params) + result =3D vm.qmp('block-dirty-bitmap-add', params) self.assert_qmp(result, 'return', {}) =20 def check_bitmap(self, vm, sha256): @@ -256,7 +256,7 @@ class TestDirtyBitmapBackingMigration(iotests.QMPTestCa= se): self.vm =3D iotests.VM() self.vm.launch() =20 - result =3D self.vm.qmp('blockdev-add', **blockdev) + result =3D self.vm.qmp('blockdev-add', blockdev) self.assert_qmp(result, 'return', {}) =20 # Check that the bitmaps are there diff --git a/tests/qemu-iotests/tests/mirror-ready-cancel-error b/tests/qem= u-iotests/tests/mirror-ready-cancel-error index 01217459b9..a59e245659 100755 --- a/tests/qemu-iotests/tests/mirror-ready-cancel-error +++ b/tests/qemu-iotests/tests/mirror-ready-cancel-error @@ -49,12 +49,12 @@ class TestMirrorReadyCancelError(iotests.QMPTestCase): =20 def add_blockdevs(self, once: bool) -> None: res =3D self.vm.qmp('blockdev-add', - **{'node-name': 'source', - 'driver': iotests.imgfmt, - 'file': { - 'driver': 'file', - 'filename': source - }}) + {'node-name': 'source', + 'driver': iotests.imgfmt, + 'file': { + 'driver': 'file', + 'filename': source + }}) self.assert_qmp(res, 'return', {}) =20 # blkdebug notes: @@ -63,25 +63,25 @@ class TestMirrorReadyCancelError(iotests.QMPTestCase): # when the job is about to complete, and we want that one to # fail. res =3D self.vm.qmp('blockdev-add', - **{'node-name': 'target', - 'driver': iotests.imgfmt, - 'file': { - 'driver': 'blkdebug', - 'image': { - 'driver': 'file', - 'filename': target - }, - 'set-state': [{ - 'event': 'flush_to_disk', - 'state': 1, - 'new_state': 2 - }], - 'inject-error': [{ - 'event': 'flush_to_disk', - 'once': once, - 'immediately': True, - 'state': 2 - }]}}) + {'node-name': 'target', + 'driver': iotests.imgfmt, + 'file': { + 'driver': 'blkdebug', + 'image': { + 'driver': 'file', + 'filename': target + }, + 'set-state': [{ + 'event': 'flush_to_disk', + 'state': 1, + 'new_state': 2 + }], + 'inject-error': [{ + 'event': 'flush_to_disk', + 'once': once, + 'immediately': True, + 'state': 2 + }]}}) self.assert_qmp(res, 'return', {}) =20 def start_mirror(self) -> None: --=20 2.41.0