From nobody Sun Feb 8 13:16:53 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1554219823489366.60499138692796; Tue, 2 Apr 2019 08:43:43 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 458E181E05; Tue, 2 Apr 2019 15:43:42 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 13797608B9; Tue, 2 Apr 2019 15:43:42 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id A96DA4ED3F; Tue, 2 Apr 2019 15:43:41 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x32FgM8p012246 for ; Tue, 2 Apr 2019 11:42:22 -0400 Received: by smtp.corp.redhat.com (Postfix) id B2B875C21A; Tue, 2 Apr 2019 15:42:22 +0000 (UTC) Received: from icr.brq.redhat.com (unknown [10.43.2.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3C0115C708 for ; Tue, 2 Apr 2019 15:42:20 +0000 (UTC) From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Tue, 2 Apr 2019 17:41:51 +0200 Message-Id: <60fee9c66744bc9aac0b0cdcb68def1b18f9ac64.1554219669.git.jtomko@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCHv2 12/14] virjsondata: json_reformat input data X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Tue, 02 Apr 2019 15:43:42 +0000 (UTC) Remove trailing slashes and run json_reformat. Signed-off-by: J=C3=A1n Tomko --- tests/virjsondata/parse-Harder-in.json | 17 +- tests/virjsondata/parse-NotSoSimple-in.json | 18 ++- tests/virjsondata/parse-Simple-in.json | 7 +- tests/virjsondata/parse-VeryHard-in.json | 167 +++++++++++++++++--- 4 files changed, 177 insertions(+), 32 deletions(-) diff --git a/tests/virjsondata/parse-Harder-in.json b/tests/virjsondata/par= se-Harder-in.json index 739d780fb9..1cdac1f0c9 100644 --- a/tests/virjsondata/parse-Harder-in.json +++ b/tests/virjsondata/parse-Harder-in.json @@ -1,4 +1,13 @@ -{"return": [{"filename": \ -"unix:/home/berrange/.libvirt/qemu/lib/tck.monitor,server",\ -"label": "charmonitor"}, {"filename": "pty:/dev/pts/158",\ -"label": "charserial0"}], "id": "libvirt-3"} +{ + "return": [ + { + "filename": "unix:/home/berrange/.libvirt/qemu/lib/tck.monitor= ,server", + "label": "charmonitor" + }, + { + "filename": "pty:/dev/pts/158", + "label": "charserial0" + } + ], + "id": "libvirt-3" +} diff --git a/tests/virjsondata/parse-NotSoSimple-in.json b/tests/virjsondat= a/parse-NotSoSimple-in.json index bda5fd1c3f..c6553b74af 100644 --- a/tests/virjsondata/parse-NotSoSimple-in.json +++ b/tests/virjsondata/parse-NotSoSimple-in.json @@ -1,3 +1,15 @@ -{"QMP": {"version": {"qemu":\ -{"micro": 91, "minor": 13, "major": 0},\ -"package": " (qemu-kvm-devel)"}, "capabilities": []}} +{ + "QMP": { + "version": { + "qemu": { + "micro": 91, + "minor": 13, + "major": 0 + }, + "package": " (qemu-kvm-devel)" + }, + "capabilities": [ + + ] + } +} diff --git a/tests/virjsondata/parse-Simple-in.json b/tests/virjsondata/par= se-Simple-in.json index a40724b322..167bdccdf8 100644 --- a/tests/virjsondata/parse-Simple-in.json +++ b/tests/virjsondata/parse-Simple-in.json @@ -1 +1,6 @@ -{"return": {}, "id": "libvirt-1"} +{ + "return": { + + }, + "id": "libvirt-1" +} diff --git a/tests/virjsondata/parse-VeryHard-in.json b/tests/virjsondata/p= arse-VeryHard-in.json index e10d605950..dc64fc1661 100644 --- a/tests/virjsondata/parse-VeryHard-in.json +++ b/tests/virjsondata/parse-VeryHard-in.json @@ -1,24 +1,143 @@ -{"return":[{"name":"quit"},{"name":\ -"eject"},{"name":"change"},{"name":"screendump"},\ -{"name":"stop"},{"name":"cont"},{"name":\ -"system_reset"},{"name":"system_powerdown"},\ -{"name":"device_add"},{"name":"device_del"},\ -{"name":"cpu"},{"name":"memsave"},{"name":\ -"pmemsave"},{"name":"migrate"},{"name":\ -"migrate_cancel"},{"name":"migrate_set_speed"},\ -{"name":"client_migrate_info"},{"name":\ -"migrate_set_downtime"},{"name":"netdev_add"},\ -{"name":"netdev_del"},{"name":"block_resize"},\ -{"name":"balloon"},{"name":"set_link"},{"name":\ -"getfd"},{"name":"closefd"},{"name":"block_passwd"},\ -{"name":"set_password"},{"name":"expire_password"},\ -{"name":"qmp_capabilities"},{"name":\ -"human-monitor-command"},{"name":"query-version"},\ -{"name":"query-commands"},{"name":"query-chardev"},\ -{"name":"query-block"},{"name":"query-blockstats"},\ -{"name":"query-cpus"},{"name":"query-pci"},{"name":\ -"query-kvm"},{"name":"query-status"},{"name":\ -"query-mice"},{"name":"query-vnc"},{"name":\ -"query-spice"},{"name":"query-name"},{"name":\ -"query-uuid"},{"name":"query-migrate"},{"name":\ -"query-balloon"}],"id":"libvirt-2"} +{ + "return": [ + { + "name": "quit" + }, + { + "name": "eject" + }, + { + "name": "change" + }, + { + "name": "screendump" + }, + { + "name": "stop" + }, + { + "name": "cont" + }, + { + "name": "system_reset" + }, + { + "name": "system_powerdown" + }, + { + "name": "device_add" + }, + { + "name": "device_del" + }, + { + "name": "cpu" + }, + { + "name": "memsave" + }, + { + "name": "pmemsave" + }, + { + "name": "migrate" + }, + { + "name": "migrate_cancel" + }, + { + "name": "migrate_set_speed" + }, + { + "name": "client_migrate_info" + }, + { + "name": "migrate_set_downtime" + }, + { + "name": "netdev_add" + }, + { + "name": "netdev_del" + }, + { + "name": "block_resize" + }, + { + "name": "balloon" + }, + { + "name": "set_link" + }, + { + "name": "getfd" + }, + { + "name": "closefd" + }, + { + "name": "block_passwd" + }, + { + "name": "set_password" + }, + { + "name": "expire_password" + }, + { + "name": "qmp_capabilities" + }, + { + "name": "human-monitor-command" + }, + { + "name": "query-version" + }, + { + "name": "query-commands" + }, + { + "name": "query-chardev" + }, + { + "name": "query-block" + }, + { + "name": "query-blockstats" + }, + { + "name": "query-cpus" + }, + { + "name": "query-pci" + }, + { + "name": "query-kvm" + }, + { + "name": "query-status" + }, + { + "name": "query-mice" + }, + { + "name": "query-vnc" + }, + { + "name": "query-spice" + }, + { + "name": "query-name" + }, + { + "name": "query-uuid" + }, + { + "name": "query-migrate" + }, + { + "name": "query-balloon" + } + ], + "id": "libvirt-2" +} --=20 2.19.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list