From nobody Mon Feb 9 02:08:04 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 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1499777803008100.6190235816033; Tue, 11 Jul 2017 05:56:43 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 95437C04B92C; Tue, 11 Jul 2017 12:56:39 +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 580827FB9D; Tue, 11 Jul 2017 12:56:39 +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 EAC613FAE3; Tue, 11 Jul 2017 12:56:38 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v6BCuTjm013125 for ; Tue, 11 Jul 2017 08:56:29 -0400 Received: by smtp.corp.redhat.com (Postfix) id D38BC757D5; Tue, 11 Jul 2017 12:56:29 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.201]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0D59F757D1; Tue, 11 Jul 2017 12:56:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 95437C04B92C Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 95437C04B92C From: Peter Krempa To: libvir-list@redhat.com Date: Tue, 11 Jul 2017 14:56:23 +0200 Message-Id: <457f5b34b192d6c6d6afabbee579cc125ca2040b.1499777674.git.pkrempa@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Cc: Peter Krempa Subject: [libvirt] [PATCH v2 2/4] tests: virjson: Remove spaces from 'very-hard' parsing example 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: , MIME-Version: 1.0 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.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Tue, 11 Jul 2017 12:56:40 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" The example is rather long and upcomming patch will check whether the string can be formatted back. As the formatted string lacks spaces and adding the 'expect' string with spaces would be rather long, just drop spaces from this test case. There are other test cases which do contain spaces. Reviewed-by: John Ferlan --- tests/virjsontest.c | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/tests/virjsontest.c b/tests/virjsontest.c index a5ffc4707..029a580f4 100644 --- a/tests/virjsontest.c +++ b/tests/virjsontest.c @@ -386,30 +386,30 @@ mymain(void) "\"label\": \"charmonitor\"}, {\"filename\": \"pty:/dev/= pts/158\"," "\"label\": \"charserial0\"}], \"id\": \"libvirt-3\"}"); - DO_TEST_PARSE("VeryHard", "{\"return\": [{\"name\": \"quit\"}, {\"name= \":" - "\"eject\"}, {\"name\": \"change\"}, {\"name\": \"screen= dump\"}," - "{\"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\"}, {\"n= ame\":" - "\"getfd\"}, {\"name\": \"closefd\"}, {\"name\": \"block= _passwd\"}," - "{\"name\": \"set_password\"}, {\"name\": \"expire_passw= ord\"}," - "{\"name\": \"qmp_capabilities\"}, {\"name\": " - "\"human-monitor-command\"}, {\"name\": \"query-version\= "}," - "{\"name\": \"query-commands\"}, {\"name\": \"query-char= dev\"}," - "{\"name\": \"query-block\"}, {\"name\": \"query-blockst= ats\"}, " - "{\"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\"}"); + DO_TEST_PARSE("VeryHard", "{\"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_pas= swd\"}," + "{\"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\"},{\"n= ame\":" + "\"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\"}"); DO_TEST_FULL("add and remove", AddRemove, "{\"name\": \"sample\", \"value\": true}", --=20 2.12.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list