From nobody Fri May 16 05:05:59 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 1501063408835554.5103661602938; Wed, 26 Jul 2017 03:03:28 -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 F0E3C4A6E4; Wed, 26 Jul 2017 10:03:23 +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 AFC8F6FE6D; Wed, 26 Jul 2017 10:03:23 +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 ECC18180BA90; Wed, 26 Jul 2017 10:03:08 +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 v6QA1FGH008929 for ; Wed, 26 Jul 2017 06:01:15 -0400 Received: by smtp.corp.redhat.com (Postfix) id E30A86FE6A; Wed, 26 Jul 2017 10:01:15 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.201]) by smtp.corp.redhat.com (Postfix) with ESMTP id 409046FE6E; Wed, 26 Jul 2017 10:01:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com F0E3C4A6E4 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:49 +0200 Message-Id: <6115b55ec7123edf545e8f848b274adf5eeb016f.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 19/24] tests: qemumonitorjson: Fix 'relative' 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:24 +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. --- ...mumonitorjson-nodename-relative-blockstats.json | 329 +++++++++++++++++= ++++ ...umonitorjson-nodename-relative-named-nodes.json | 26 +- .../qemumonitorjson-nodename-relative.result | 44 ++- tests/qemumonitorjsontest.c | 2 +- 4 files changed, 372 insertions(+), 29 deletions(-) create mode 100644 tests/qemumonitorjsondata/qemumonitorjson-nodename-rela= tive-blockstats.json diff --git a/tests/qemumonitorjsondata/qemumonitorjson-nodename-relative-bl= ockstats.json b/tests/qemumonitorjsondata/qemumonitorjson-nodename-relative= -blockstats.json new file mode 100644 index 000000000..9838ad1a7 --- /dev/null +++ b/tests/qemumonitorjsondata/qemumonitorjson-nodename-relative-blockstat= s.json @@ -0,0 +1,329 @@ +[ + { + "device": "drive-ide0-0-0", + "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": "#block092" + }, + "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": 61904, + "flush_operations": 0, + "wr_operations": 0, + "rd_merged": 0, + "rd_bytes": 512, + "invalid_flush_operations": 0, + "account_failed": true, + "idle_time_ns": 309814663943, + "rd_operations": 1, + "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": "#block232" + }, + "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 + }, + "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": "#block442" + }, + "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 + }, + "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": "#block614" + }, + "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": "#block797" + }, + "node-name": "#block548" + }, + "node-name": "#block346" + }, + "node-name": "#block118" + }, + { + "device": "drive-ide0-0-1", + "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": "#block1107" + }, + "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": "#block800" + }, + "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": "#block927" + }, + "node-name": "#block1290" + } +] diff --git a/tests/qemumonitorjsondata/qemumonitorjson-nodename-relative-na= med-nodes.json b/tests/qemumonitorjsondata/qemumonitorjson-nodename-relativ= e-named-nodes.json index 1fee149ac..2fcc3b47e 100644 --- a/tests/qemumonitorjsondata/qemumonitorjson-nodename-relative-named-nod= es.json +++ b/tests/qemumonitorjsondata/qemumonitorjson-nodename-relative-named-nod= es.json @@ -41,7 +41,7 @@ }, "iops_wr": 0, "ro": false, - "node-name": "#block1177", + "node-name": "#block1290", "backing_file_depth": 1, "drv": "qcow2", "iops": 0, @@ -71,7 +71,7 @@ }, "iops_wr": 0, "ro": false, - "node-name": "#block1027", + "node-name": "#block1107", "backing_file_depth": 0, "drv": "file", "iops": 0, @@ -110,7 +110,7 @@ }, "iops_wr": 0, "ro": true, - "node-name": "#block957", + "node-name": "#block927", "backing_file_depth": 0, "drv": "qcow2", "iops": 0, @@ -139,7 +139,7 @@ }, "iops_wr": 0, "ro": true, - "node-name": "#block840", + "node-name": "#block800", "backing_file_depth": 0, "drv": "file", "iops": 0, @@ -178,7 +178,7 @@ }, "iops_wr": 0, "ro": true, - "node-name": "#block709", + "node-name": "#block797", "backing_file_depth": 0, "drv": "qcow2", "iops": 0, @@ -207,7 +207,7 @@ }, "iops_wr": 0, "ro": true, - "node-name": "#block665", + "node-name": "#block614", "backing_file_depth": 0, "drv": "file", "iops": 0, @@ -266,7 +266,7 @@ }, "iops_wr": 0, "ro": true, - "node-name": "#block514", + "node-name": "#block548", "backing_file_depth": 1, "drv": "qcow2", "iops": 0, @@ -296,7 +296,7 @@ }, "iops_wr": 0, "ro": true, - "node-name": "#block481", + "node-name": "#block442", "backing_file_depth": 0, "drv": "file", "iops": 0, @@ -375,7 +375,7 @@ }, "iops_wr": 0, "ro": true, - "node-name": "#block357", + "node-name": "#block346", "backing_file_depth": 2, "drv": "qcow2", "iops": 0, @@ -405,7 +405,7 @@ }, "iops_wr": 0, "ro": true, - "node-name": "#block290", + "node-name": "#block232", "backing_file_depth": 0, "drv": "file", "iops": 0, @@ -504,7 +504,7 @@ }, "iops_wr": 0, "ro": false, - "node-name": "#block153", + "node-name": "#block118", "backing_file_depth": 3, "drv": "qcow2", "iops": 0, @@ -534,7 +534,7 @@ }, "iops_wr": 0, "ro": false, - "node-name": "#block076", + "node-name": "#block092", "backing_file_depth": 0, "drv": "file", "iops": 0, @@ -551,4 +551,4 @@ "file": "/var/lib/libvirt/images/img3", "encryption_key_missing": false } - ] +] diff --git a/tests/qemumonitorjsondata/qemumonitorjson-nodename-relative.re= sult b/tests/qemumonitorjsondata/qemumonitorjson-nodename-relative.result index 27d9652c6..6c0c77618 100644 --- a/tests/qemumonitorjsondata/qemumonitorjson-nodename-relative.result +++ b/tests/qemumonitorjsondata/qemumonitorjson-nodename-relative.result @@ -1,19 +1,33 @@ +drive-ide0-0-1 +filename : '/var/lib/libvirt/images/relsnap.qcow2' +format node : '#block1290' +format drv : 'qcow2' +storage node: '#block1107' +storage drv : 'file' + filename : '/var/lib/libvirt/images/base.qcow2' + format node : '#block927' + format drv : 'qcow2' + storage node: '#block800' + storage drv : 'file' + +drive-ide0-0-0 filename : '/var/lib/libvirt/images/img3' -format node : '#block153' -storage node: '#block076' +format node : '#block118' +format drv : 'qcow2' +storage node: '#block092' +storage drv : 'file' filename : '/var/lib/libvirt/images/img2' - format node : '#block357' - storage node: '#block290' + format node : '#block346' + format drv : 'qcow2' + storage node: '#block232' + storage drv : 'file' filename : '/var/lib/libvirt/images/img1' - format node : '#block514' - storage node: '#block481' + format node : '#block548' + format drv : 'qcow2' + storage node: '#block442' + storage drv : 'file' filename : '/var/lib/libvirt/images/img0' - format node : '#block709' - storage node: '#block665' - -filename : '/var/lib/libvirt/images/relsnap.qcow2' -format node : '#block1177' -storage node: '#block1027' - filename : '/var/lib/libvirt/images/base.qcow2' - format node : '#block957' - storage node: '#block840' + format node : '#block797' + format drv : 'qcow2' + storage node: '#block614' + storage drv : 'file' diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index e85cf7b24..2b10a75cd 100644 --- a/tests/qemumonitorjsontest.c +++ b/tests/qemumonitorjsontest.c @@ -2928,7 +2928,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("relative"); /* 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