[PATCH 21/23] tests: qemumonitorjson: Test node name detection on networked storage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 .../qemumonitorjson-nodename-gluster.json          | 135 +++++++++++++++++++++
 .../qemumonitorjson-nodename-gluster.result        |  10 ++
 tests/qemumonitorjsontest.c                        |   1 +
 3 files changed, 146 insertions(+)
 create mode 100644 tests/qemumonitorjsondata/qemumonitorjson-nodename-gluster.json
 create mode 100644 tests/qemumonitorjsondata/qemumonitorjson-nodename-gluster.result

diff --git a/tests/qemumonitorjsondata/qemumonitorjson-nodename-gluster.json b/tests/qemumonitorjsondata/qemumonitorjson-nodename-gluster.json
new file mode 100644
index 000000000..7ea5c5d54
--- /dev/null
+++ b/tests/qemumonitorjsondata/qemumonitorjson-nodename-gluster.json
@@ -0,0 +1,135 @@
+[
+    {
+      "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
+      },
+      "iops_wr": 0,
+      "ro": false,
+      "node-name": "#block1008",
+      "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,
+      "cache": {
+        "no-flush": false,
+        "direct": true,
+        "writeback": true
+      },
+      "file": "gluster://gluster-host/vol0/img1",
+      "encryption_key_missing": false
+    },
+    {
+      "iops_rd": 0,
+      "detect_zeroes": "off",
+      "image": {
+        "virtual-size": 197120,
+        "filename": "gluster://gluster-host/vol0/img1",
+        "format": "gluster",
+        "actual-size": 197120
+      },
+      "iops_wr": 0,
+      "ro": false,
+      "node-name": "#block981",
+      "backing_file_depth": 0,
+      "drv": "gluster",
+      "iops": 0,
+      "bps_wr": 0,
+      "write_threshold": 0,
+      "encrypted": false,
+      "bps": 0,
+      "bps_rd": 0,
+      "cache": {
+        "no-flush": false,
+        "direct": true,
+        "writeback": true
+      },
+      "file": "gluster://gluster-host/vol0/img1",
+      "encryption_key_missing": false
+    },
+    {
+      "iops_rd": 0,
+      "detect_zeroes": "off",
+      "image": {
+        "virtual-size": 197120,
+        "filename": "gluster://gluster-host/vol0/img0",
+        "format": "raw",
+        "actual-size": 197120
+      },
+      "iops_wr": 0,
+      "ro": true,
+      "node-name": "#block349",
+      "backing_file_depth": 0,
+      "drv": "raw",
+      "iops": 0,
+      "bps_wr": 0,
+      "write_threshold": 0,
+      "encrypted": false,
+      "bps": 0,
+      "bps_rd": 0,
+      "cache": {
+        "no-flush": false,
+        "direct": true,
+        "writeback": true
+      },
+      "file": "gluster://gluster-host/vol0/img0",
+      "encryption_key_missing": false
+    },
+    {
+      "iops_rd": 0,
+      "detect_zeroes": "off",
+      "image": {
+        "virtual-size": 197120,
+        "filename": "gluster://gluster-host/vol0/img0",
+        "format": "gluster",
+        "actual-size": 197120
+      },
+      "iops_wr": 0,
+      "ro": true,
+      "node-name": "#block269",
+      "backing_file_depth": 0,
+      "drv": "gluster",
+      "iops": 0,
+      "bps_wr": 0,
+      "write_threshold": 0,
+      "encrypted": false,
+      "bps": 0,
+      "bps_rd": 0,
+      "cache": {
+        "no-flush": false,
+        "direct": true,
+        "writeback": true
+      },
+      "file": "gluster://gluster-host/vol0/img0",
+      "encryption_key_missing": false
+    }
+  ]
diff --git a/tests/qemumonitorjsondata/qemumonitorjson-nodename-gluster.result b/tests/qemumonitorjsondata/qemumonitorjson-nodename-gluster.result
new file mode 100644
index 000000000..f38798d4b
--- /dev/null
+++ b/tests/qemumonitorjsondata/qemumonitorjson-nodename-gluster.result
@@ -0,0 +1,10 @@
+filename    : 'gluster://gluster-host/vol0/img1'
+format node : '#block1008'
+storage node: '#block981'
+backingfile : 'gluster://gluster-host/vol0/img0'
+backing ptr : '#block349'
+  filename    : 'gluster://gluster-host/vol0/img0'
+  format node : '#block349'
+  storage node: '#block269'
+  backingfile : '<null>'
+  backing ptr : '<null>'
diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c
index 5b9f24d24..4925a00b7 100644
--- a/tests/qemumonitorjsontest.c
+++ b/tests/qemumonitorjsontest.c
@@ -2909,6 +2909,7 @@ mymain(void)
     DO_TEST_BLOCK_NODE_DETECT("2", "#block161");
     DO_TEST_BLOCK_NODE_DETECT("same-backing", "#block170,#block574");
     DO_TEST_BLOCK_NODE_DETECT("relative", "#block153,#block1177");
+    DO_TEST_BLOCK_NODE_DETECT("gluster", "#block1008");

 #undef DO_TEST_BLOCK_NODE_DETECT

-- 
2.12.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux