From nobody Fri May 16 04:52:20 2025 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 1501063377123118.30028336664543; Wed, 26 Jul 2017 03:02:57 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 45734C00F0AB; Wed, 26 Jul 2017 10:02:52 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0DC6A6889D; Wed, 26 Jul 2017 10:02:52 +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 B8FC0180597F; Wed, 26 Jul 2017 10:02:51 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v6QA0tAc008746 for ; Wed, 26 Jul 2017 06:00:55 -0400 Received: by smtp.corp.redhat.com (Postfix) id 7BE6F6FB65; Wed, 26 Jul 2017 10:00:55 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.201]) by smtp.corp.redhat.com (Postfix) with ESMTP id C71CD51C89; Wed, 26 Jul 2017 10:00:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 45734C00F0AB 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 From: Peter Krempa To: libvir-list@redhat.com Date: Wed, 26 Jul 2017 12:00:33 +0200 Message-Id: <66bf987a8f57c341c13f99c83ba3e10f650a8b87.1501062802.git.pkrempa@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Cc: Peter Krempa Subject: [libvirt] [PATCH 03/24] tests: qemumonitor: Prepare for more test data in testBlockNodeNameDetect 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.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Wed, 26 Jul 2017 10:02:52 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Rename 'json' and related variables to 'nodeNameJson'. Also rename the test files along. This is a preparation for modifying how we detect node names which will require also data from 'query-blockstats'. --- ...emumonitorjson-nodename-basic-named-nodes.json} | 0 ...umonitorjson-nodename-gluster-named-nodes.json} | 0 ...monitorjson-nodename-relative-named-nodes.json} | 0 ...torjson-nodename-same-backing-named-nodes.json} | 0 tests/qemumonitorjsontest.c | 22 +++++++++++-------= ---- 5 files changed, 11 insertions(+), 11 deletions(-) rename tests/qemumonitorjsondata/{qemumonitorjson-nodename-basic.json =3D>= qemumonitorjson-nodename-basic-named-nodes.json} (100%) rename tests/qemumonitorjsondata/{qemumonitorjson-nodename-gluster.json = =3D> qemumonitorjson-nodename-gluster-named-nodes.json} (100%) rename tests/qemumonitorjsondata/{qemumonitorjson-nodename-relative.json = =3D> qemumonitorjson-nodename-relative-named-nodes.json} (100%) rename tests/qemumonitorjsondata/{qemumonitorjson-nodename-same-backing.js= on =3D> qemumonitorjson-nodename-same-backing-named-nodes.json} (100%) diff --git a/tests/qemumonitorjsondata/qemumonitorjson-nodename-basic.json = b/tests/qemumonitorjsondata/qemumonitorjson-nodename-basic-named-nodes.json similarity index 100% rename from tests/qemumonitorjsondata/qemumonitorjson-nodename-basic.json rename to tests/qemumonitorjsondata/qemumonitorjson-nodename-basic-named-no= des.json diff --git a/tests/qemumonitorjsondata/qemumonitorjson-nodename-gluster.jso= n b/tests/qemumonitorjsondata/qemumonitorjson-nodename-gluster-named-nodes.= json similarity index 100% rename from tests/qemumonitorjsondata/qemumonitorjson-nodename-gluster.json rename to tests/qemumonitorjsondata/qemumonitorjson-nodename-gluster-named-= nodes.json diff --git a/tests/qemumonitorjsondata/qemumonitorjson-nodename-relative.js= on b/tests/qemumonitorjsondata/qemumonitorjson-nodename-relative-named-node= s.json similarity index 100% rename from tests/qemumonitorjsondata/qemumonitorjson-nodename-relative.json rename to tests/qemumonitorjsondata/qemumonitorjson-nodename-relative-named= -nodes.json diff --git a/tests/qemumonitorjsondata/qemumonitorjson-nodename-same-backin= g.json b/tests/qemumonitorjsondata/qemumonitorjson-nodename-same-backing-na= med-nodes.json similarity index 100% rename from tests/qemumonitorjsondata/qemumonitorjson-nodename-same-backing= .json rename to tests/qemumonitorjsondata/qemumonitorjson-nodename-same-backing-n= amed-nodes.json diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index c343c0d38..5bab9f507 100644 --- a/tests/qemumonitorjsontest.c +++ b/tests/qemumonitorjsontest.c @@ -2740,19 +2740,19 @@ static int testBlockNodeNameDetect(const void *opaque) { const struct testBlockNodeNameDetectData *data =3D opaque; - char *jsonFile =3D NULL; - char *jsonStr =3D NULL; + char *namedNodesFile =3D NULL; + char *namedNodesStr =3D NULL; char *resultFile =3D NULL; char *actual =3D NULL; char **nodenames =3D NULL; char **next; - virJSONValuePtr json =3D NULL; + virJSONValuePtr namedNodesJson =3D NULL; virHashTablePtr nodedata =3D NULL; virBuffer buf =3D VIR_BUFFER_INITIALIZER; int ret =3D -1; - if (virAsprintf(&jsonFile, - "%s/qemumonitorjsondata/qemumonitorjson-nodename-%s.js= on", + if (virAsprintf(&namedNodesFile, + "%s/qemumonitorjsondata/qemumonitorjson-nodename-%s-na= med-nodes.json", abs_srcdir, data->name) < 0 || virAsprintf(&resultFile, "%s/qemumonitorjsondata/qemumonitorjson-nodename-%s.re= sult", @@ -2762,13 +2762,13 @@ testBlockNodeNameDetect(const void *opaque) if (!(nodenames =3D virStringSplit(data->nodenames, ",", 0))) goto cleanup; - if (virTestLoadFile(jsonFile, &jsonStr) < 0) + if (virTestLoadFile(namedNodesFile, &namedNodesStr) < 0) goto cleanup; - if (!(json =3D virJSONValueFromString(jsonStr))) + if (!(namedNodesJson =3D virJSONValueFromString(namedNodesStr))) goto cleanup; - if (!(nodedata =3D qemuBlockNodeNameGetBackingChain(json))) + if (!(nodedata =3D qemuBlockNodeNameGetBackingChain(namedNodesJson))) goto cleanup; for (next =3D nodenames; *next; next++) @@ -2787,13 +2787,13 @@ testBlockNodeNameDetect(const void *opaque) ret =3D 0; cleanup: - VIR_FREE(jsonFile); + VIR_FREE(namedNodesFile); VIR_FREE(resultFile); - VIR_FREE(jsonStr); + VIR_FREE(namedNodesStr); VIR_FREE(actual); virHashFree(nodedata); virStringListFree(nodenames); - virJSONValueFree(json); + virJSONValueFree(namedNodesJson); return ret; } --=20 2.13.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list