From nobody Fri May 16 05:26:19 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 1501063401330629.5891233509592; Wed, 26 Jul 2017 03:03:21 -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 40BF4806BF; Wed, 26 Jul 2017 10:03:18 +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 0BFBF703BD; Wed, 26 Jul 2017 10:03:18 +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 3E67A180BA88; Wed, 26 Jul 2017 10:03:05 +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 v6QA1EHJ008923 for ; Wed, 26 Jul 2017 06:01:14 -0400 Received: by smtp.corp.redhat.com (Postfix) id E76576FE6E; Wed, 26 Jul 2017 10:01:14 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.201]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4449F6FE60; Wed, 26 Jul 2017 10:01:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 40BF4806BF Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx02.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:48 +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 18/24] tests: qemumonitorjson: Add data and fix 'same-backing' node detection 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.26]); Wed, 26 Jul 2017 10:03:19 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" With the new approach we are actually able to correctly detect node names for the two instances of the same backing file. --- ...nitorjson-nodename-same-backing-blockstats.json | 221 +++++++++++++++++= ++++ ...itorjson-nodename-same-backing-named-nodes.json | 16 +- .../qemumonitorjson-nodename-same-backing.result | 28 ++- tests/qemumonitorjsontest.c | 2 +- 4 files changed, 252 insertions(+), 15 deletions(-) create mode 100644 tests/qemumonitorjsondata/qemumonitorjson-nodename-same= -backing-blockstats.json diff --git a/tests/qemumonitorjsondata/qemumonitorjson-nodename-same-backin= g-blockstats.json b/tests/qemumonitorjsondata/qemumonitorjson-nodename-same= -backing-blockstats.json new file mode 100644 index 000000000..7fd238301 --- /dev/null +++ b/tests/qemumonitorjsondata/qemumonitorjson-nodename-same-backing-block= stats.json @@ -0,0 +1,221 @@ +[ + { + "device": "drive-sata0-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": "#block020" + }, + "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": 290083, + "flush_operations": 0, + "wr_operations": 0, + "rd_merged": 0, + "rd_bytes": 512, + "invalid_flush_operations": 0, + "account_failed": true, + "idle_time_ns": 74812730779, + "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": "#block224" + }, + "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": "#block320" + }, + "node-name": "#block132" + }, + { + "device": "drive-sata0-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": "#block487" + }, + "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": "#block692" + }, + "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": "#block771" + }, + "node-name": "#block548" + } + ] diff --git a/tests/qemumonitorjsondata/qemumonitorjson-nodename-same-backin= g-named-nodes.json b/tests/qemumonitorjsondata/qemumonitorjson-nodename-sam= e-backing-named-nodes.json index 78954bb25..3945ff5ed 100644 --- a/tests/qemumonitorjsondata/qemumonitorjson-nodename-same-backing-named= -nodes.json +++ b/tests/qemumonitorjsondata/qemumonitorjson-nodename-same-backing-named= -nodes.json @@ -21,7 +21,7 @@ }, "iops_wr": 0, "ro": true, - "node-name": "#block729", + "node-name": "#block771", "backing_file_depth": 0, "drv": "qcow2", "iops": 0, @@ -50,7 +50,7 @@ }, "iops_wr": 0, "ro": true, - "node-name": "#block628", + "node-name": "#block692", "backing_file_depth": 0, "drv": "file", "iops": 0, @@ -109,7 +109,7 @@ }, "iops_wr": 0, "ro": false, - "node-name": "#block574", + "node-name": "#block548", "backing_file_depth": 1, "drv": "qcow2", "iops": 0, @@ -139,7 +139,7 @@ }, "iops_wr": 0, "ro": false, - "node-name": "#block405", + "node-name": "#block487", "backing_file_depth": 0, "drv": "file", "iops": 0, @@ -178,7 +178,7 @@ }, "iops_wr": 0, "ro": true, - "node-name": "#block399", + "node-name": "#block320", "backing_file_depth": 0, "drv": "qcow2", "iops": 0, @@ -207,7 +207,7 @@ }, "iops_wr": 0, "ro": true, - "node-name": "#block257", + "node-name": "#block224", "backing_file_depth": 0, "drv": "file", "iops": 0, @@ -266,7 +266,7 @@ }, "iops_wr": 0, "ro": false, - "node-name": "#block170", + "node-name": "#block132", "backing_file_depth": 1, "drv": "qcow2", "iops": 0, @@ -296,7 +296,7 @@ }, "iops_wr": 0, "ro": false, - "node-name": "#block057", + "node-name": "#block020", "backing_file_depth": 0, "drv": "file", "iops": 0, diff --git a/tests/qemumonitorjsondata/qemumonitorjson-nodename-same-backin= g.result b/tests/qemumonitorjsondata/qemumonitorjson-nodename-same-backing.= result index 3ad8423a3..87431f7ca 100644 --- a/tests/qemumonitorjsondata/qemumonitorjson-nodename-same-backing.result +++ b/tests/qemumonitorjsondata/qemumonitorjson-nodename-same-backing.result @@ -1,7 +1,23 @@ -filename : '/var/lib/libvirt/images/a.qcow2' -format node : '#block170' -storage node: '#block057' - +drive-sata0-0-1 filename : '/var/lib/libvirt/images/b.qcow2' -format node : '#block574' -storage node: '#block405' +format node : '#block548' +format drv : 'qcow2' +storage node: '#block487' +storage drv : 'file' + filename : '/var/lib/libvirt/images/base.qcow2' + format node : '#block771' + format drv : 'qcow2' + storage node: '#block692' + storage drv : 'file' + +drive-sata0-0-0 +filename : '/var/lib/libvirt/images/a.qcow2' +format node : '#block132' +format drv : 'qcow2' +storage node: '#block020' +storage drv : 'file' + filename : '/var/lib/libvirt/images/base.qcow2' + format node : '#block320' + format drv : 'qcow2' + storage node: '#block224' + storage drv : 'file' diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index 346d5c401..e85cf7b24 100644 --- a/tests/qemumonitorjsontest.c +++ b/tests/qemumonitorjsontest.c @@ -2927,7 +2927,7 @@ mymain(void) } while (0) DO_TEST_BLOCK_NODE_DETECT("basic"); -/* DO_TEST_BLOCK_NODE_DETECT("same-backing"); */ + DO_TEST_BLOCK_NODE_DETECT("same-backing"); /* DO_TEST_BLOCK_NODE_DETECT("relative"); */ /* DO_TEST_BLOCK_NODE_DETECT("gluster"); */ --=20 2.13.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list