From nobody Sun Feb 8 19:43:21 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 1501063383508653.770962314821; Wed, 26 Jul 2017 03:03:03 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id ADD25A9644; Wed, 26 Jul 2017 10:02:59 +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 7BEA86FE6D; Wed, 26 Jul 2017 10:02:59 +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 D775014B2D; Wed, 26 Jul 2017 10:02:58 +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 v6QA1GYP008937 for ; Wed, 26 Jul 2017 06:01:16 -0400 Received: by smtp.corp.redhat.com (Postfix) id E23C16FE76; Wed, 26 Jul 2017 10:01:16 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.201]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3BD156FE60; Wed, 26 Jul 2017 10:01:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com ADD25A9644 Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx09.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:50 +0200 Message-Id: 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 20/24] tests: qemumonitorjson: Fix 'gluster' node name detection test case 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.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Wed, 26 Jul 2017 10:03:00 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Add the blockstats data and fix the expected output. --- ...emumonitorjson-nodename-gluster-blockstats.json | 111 +++++++++++++++++= ++++ ...mumonitorjson-nodename-gluster-named-nodes.json | 90 ++++++++--------- .../qemumonitorjson-nodename-gluster.result | 15 ++- tests/qemumonitorjsontest.c | 2 +- 4 files changed, 167 insertions(+), 51 deletions(-) create mode 100644 tests/qemumonitorjsondata/qemumonitorjson-nodename-glus= ter-blockstats.json diff --git a/tests/qemumonitorjsondata/qemumonitorjson-nodename-gluster-blo= ckstats.json b/tests/qemumonitorjsondata/qemumonitorjson-nodename-gluster-b= lockstats.json new file mode 100644 index 000000000..665a6b05b --- /dev/null +++ b/tests/qemumonitorjsondata/qemumonitorjson-nodename-gluster-blockstats= .json @@ -0,0 +1,111 @@ +[ + { + "device": "drive-virtio-disk0", + "parent": { + "stats": { + "flush_total_time_ns": 0, + "wr_highest_offset": 0, + "wr_total_time_ns": 0, + "failed_wr_operations": 0, + "failed_rd_operations": 0, + "wr_merged": 0, + "wr_bytes": 0, + "timed_stats": [ + + ], + "failed_flush_operations": 0, + "account_invalid": false, + "rd_total_time_ns": 0, + "flush_operations": 0, + "wr_operations": 0, + "rd_merged": 0, + "rd_bytes": 0, + "invalid_flush_operations": 0, + "account_failed": false, + "rd_operations": 0, + "invalid_wr_operations": 0, + "invalid_rd_operations": 0 + }, + "node-name": "#block282" + }, + "stats": { + "flush_total_time_ns": 0, + "wr_highest_offset": 0, + "wr_total_time_ns": 0, + "failed_wr_operations": 0, + "failed_rd_operations": 0, + "wr_merged": 0, + "wr_bytes": 0, + "timed_stats": [ + + ], + "failed_flush_operations": 0, + "account_invalid": true, + "rd_total_time_ns": 0, + "flush_operations": 0, + "wr_operations": 0, + "rd_merged": 0, + "rd_bytes": 0, + "invalid_flush_operations": 0, + "account_failed": true, + "rd_operations": 0, + "invalid_wr_operations": 0, + "invalid_rd_operations": 0 + }, + "backing": { + "parent": { + "stats": { + "flush_total_time_ns": 0, + "wr_highest_offset": 0, + "wr_total_time_ns": 0, + "failed_wr_operations": 0, + "failed_rd_operations": 0, + "wr_merged": 0, + "wr_bytes": 0, + "timed_stats": [ + + ], + "failed_flush_operations": 0, + "account_invalid": false, + "rd_total_time_ns": 0, + "flush_operations": 0, + "wr_operations": 0, + "rd_merged": 0, + "rd_bytes": 0, + "invalid_flush_operations": 0, + "account_failed": false, + "rd_operations": 0, + "invalid_wr_operations": 0, + "invalid_rd_operations": 0 + }, + "node-name": "#block477" + }, + "stats": { + "flush_total_time_ns": 0, + "wr_highest_offset": 0, + "wr_total_time_ns": 0, + "failed_wr_operations": 0, + "failed_rd_operations": 0, + "wr_merged": 0, + "wr_bytes": 0, + "timed_stats": [ + + ], + "failed_flush_operations": 0, + "account_invalid": false, + "rd_total_time_ns": 0, + "flush_operations": 0, + "wr_operations": 0, + "rd_merged": 0, + "rd_bytes": 0, + "invalid_flush_operations": 0, + "account_failed": false, + "rd_operations": 0, + "invalid_wr_operations": 0, + "invalid_rd_operations": 0 + }, + "node-name": "#block596" + }, + "node-name": "#block338" + } + ] diff --git a/tests/qemumonitorjsondata/qemumonitorjson-nodename-gluster-nam= ed-nodes.json b/tests/qemumonitorjsondata/qemumonitorjson-nodename-gluster-= named-nodes.json index 7ea5c5d54..e6bd2cfa7 100644 --- a/tests/qemumonitorjsondata/qemumonitorjson-nodename-gluster-named-node= s.json +++ b/tests/qemumonitorjsondata/qemumonitorjson-nodename-gluster-named-node= s.json @@ -3,40 +3,19 @@ "iops_rd": 0, "detect_zeroes": "off", "image": { - "backing-image": { - "virtual-size": 197120, - "filename": "gluster://gluster-host/vol0/img0", - "format": "raw", - "actual-size": 197120 - }, - "backing-filename-format": "raw", "virtual-size": 197120, - "filename": "gluster://gluster-host/vol0/img1", - "cluster-size": 65536, - "format": "qcow2", - "actual-size": 197120, - "format-specific": { - "type": "qcow2", - "data": { - "compat": "1.1", - "lazy-refcounts": false, - "refcount-bits": 16, - "corrupt": false - } - }, - "full-backing-filename": "gluster://gluster-host/vol0/img0", - "backing-filename": "gluster://gluster-host/vol0/img0", - "dirty-flag": false + "filename": "gluster://gluster-host/vol0/img0", + "format": "raw", + "actual-size": 197120 }, "iops_wr": 0, - "ro": false, - "node-name": "#block1008", - "backing_file_depth": 1, - "drv": "qcow2", + "ro": true, + "node-name": "#block596", + "backing_file_depth": 0, + "drv": "raw", "iops": 0, "bps_wr": 0, "write_threshold": 0, - "backing_file": "gluster://gluster-host/vol0/img0", "encrypted": false, "bps": 0, "bps_rd": 0, @@ -45,7 +24,7 @@ "direct": true, "writeback": true }, - "file": "gluster://gluster-host/vol0/img1", + "file": "gluster://gluster-host/vol0/img0", "encryption_key_missing": false }, { @@ -53,13 +32,13 @@ "detect_zeroes": "off", "image": { "virtual-size": 197120, - "filename": "gluster://gluster-host/vol0/img1", + "filename": "gluster://gluster-host/vol0/img0", "format": "gluster", "actual-size": 197120 }, "iops_wr": 0, - "ro": false, - "node-name": "#block981", + "ro": true, + "node-name": "#block477", "backing_file_depth": 0, "drv": "gluster", "iops": 0, @@ -73,26 +52,47 @@ "direct": true, "writeback": true }, - "file": "gluster://gluster-host/vol0/img1", + "file": "gluster://gluster-host/vol0/img0", "encryption_key_missing": false }, { "iops_rd": 0, "detect_zeroes": "off", "image": { + "backing-image": { + "virtual-size": 197120, + "filename": "gluster://gluster-host/vol0/img0", + "format": "raw", + "actual-size": 197120 + }, + "backing-filename-format": "raw", "virtual-size": 197120, - "filename": "gluster://gluster-host/vol0/img0", - "format": "raw", - "actual-size": 197120 + "filename": "gluster://gluster-host:24007/vol0/img1", + "cluster-size": 65536, + "format": "qcow2", + "actual-size": 197120, + "format-specific": { + "type": "qcow2", + "data": { + "compat": "1.1", + "lazy-refcounts": false, + "refcount-bits": 16, + "corrupt": false + } + }, + "full-backing-filename": "gluster://gluster-host/vol0/img0", + "backing-filename": "gluster://gluster-host/vol0/img0", + "dirty-flag": false }, "iops_wr": 0, - "ro": true, - "node-name": "#block349", - "backing_file_depth": 0, - "drv": "raw", + "ro": false, + "node-name": "#block338", + "backing_file_depth": 1, + "drv": "qcow2", "iops": 0, "bps_wr": 0, "write_threshold": 0, + "backing_file": "gluster://gluster-host/vol0/img0", "encrypted": false, "bps": 0, "bps_rd": 0, @@ -101,7 +101,7 @@ "direct": true, "writeback": true }, - "file": "gluster://gluster-host/vol0/img0", + "file": "gluster://gluster-host:24007/vol0/img1", "encryption_key_missing": false }, { @@ -109,13 +109,13 @@ "detect_zeroes": "off", "image": { "virtual-size": 197120, - "filename": "gluster://gluster-host/vol0/img0", + "filename": "gluster://gluster-host:24007/vol0/img1", "format": "gluster", "actual-size": 197120 }, "iops_wr": 0, - "ro": true, - "node-name": "#block269", + "ro": false, + "node-name": "#block282", "backing_file_depth": 0, "drv": "gluster", "iops": 0, @@ -129,7 +129,7 @@ "direct": true, "writeback": true }, - "file": "gluster://gluster-host/vol0/img0", + "file": "gluster://gluster-host:24007/vol0/img1", "encryption_key_missing": false } ] diff --git a/tests/qemumonitorjsondata/qemumonitorjson-nodename-gluster.res= ult b/tests/qemumonitorjsondata/qemumonitorjson-nodename-gluster.result index d99576202..6289fdd1a 100644 --- a/tests/qemumonitorjsondata/qemumonitorjson-nodename-gluster.result +++ b/tests/qemumonitorjsondata/qemumonitorjson-nodename-gluster.result @@ -1,6 +1,11 @@ -filename : 'gluster://gluster-host/vol0/img1' -format node : '#block1008' -storage node: '#block981' +drive-virtio-disk0 +filename : 'gluster://gluster-host:24007/vol0/img1' +format node : '#block338' +format drv : 'qcow2' +storage node: '#block282' +storage drv : 'gluster' filename : 'gluster://gluster-host/vol0/img0' - format node : '#block349' - storage node: '#block269' + format node : '#block596' + format drv : 'raw' + storage node: '#block477' + storage drv : 'gluster' diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index 2b10a75cd..8edb3f121 100644 --- a/tests/qemumonitorjsontest.c +++ b/tests/qemumonitorjsontest.c @@ -2929,7 +2929,7 @@ mymain(void) DO_TEST_BLOCK_NODE_DETECT("basic"); DO_TEST_BLOCK_NODE_DETECT("same-backing"); DO_TEST_BLOCK_NODE_DETECT("relative"); -/* DO_TEST_BLOCK_NODE_DETECT("gluster"); */ + DO_TEST_BLOCK_NODE_DETECT("gluster"); #undef DO_TEST_BLOCK_NODE_DETECT --=20 2.13.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list