render / rpms / libvirt

Forked from rpms/libvirt 10 months ago
Clone
a41c76
From 79ee60c0e547a9023eeb7912b10fe363645f5d5a Mon Sep 17 00:00:00 2001
a41c76
Message-Id: <79ee60c0e547a9023eeb7912b10fe363645f5d5a@dist-git>
a41c76
From: Peter Krempa <pkrempa@redhat.com>
a41c76
Date: Tue, 23 Jun 2020 12:23:48 +0200
a41c76
Subject: [PATCH] qemublocktest: Replace 'basic' bitmap detection test case
a41c76
 data
a41c76
MIME-Version: 1.0
a41c76
Content-Type: text/plain; charset=UTF-8
a41c76
Content-Transfer-Encoding: 8bit
a41c76
a41c76
Use test data which conforms to the new semantics which changed in the
a41c76
previous patch.
a41c76
a41c76
The test data was created by the same set of commands as originally in
a41c76
commit 9aac9d5bdab039a50de2d8c627b3a1f1578ed471
a41c76
a41c76
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
a41c76
Reviewed-by: Eric Blake <eblake@redhat.com>
a41c76
(cherry picked from commit de32397007d5d2a9ca57791ec159f72f7666322b)
a41c76
https://bugzilla.redhat.com/show_bug.cgi?id=1804593
a41c76
Message-Id: <f0985f5309514919dab4baedb04e4b3c214ae407.1592906423.git.pkrempa@redhat.com>
a41c76
Reviewed-by: Ján Tomko <jtomko@redhat.com>
a41c76
---
a41c76
 tests/qemublocktestdata/bitmap/basic.json | 229 +++++++++++-----------
a41c76
 tests/qemublocktestdata/bitmap/basic.out  |   8 +-
a41c76
 2 files changed, 119 insertions(+), 118 deletions(-)
a41c76
a41c76
diff --git a/tests/qemublocktestdata/bitmap/basic.json b/tests/qemublocktestdata/bitmap/basic.json
a41c76
index 9d418b1a37..718106bf99 100644
a41c76
--- a/tests/qemublocktestdata/bitmap/basic.json
a41c76
+++ b/tests/qemublocktestdata/bitmap/basic.json
a41c76
@@ -1,117 +1,118 @@
a41c76
 [
a41c76
-    {
a41c76
-        "iops_rd": 0,
a41c76
-        "detect_zeroes": "off",
a41c76
-        "image": {
a41c76
-            "virtual-size": 10485760,
a41c76
-            "filename": "/tmp/pull4.qcow2",
a41c76
-            "cluster-size": 65536,
a41c76
-            "format": "qcow2",
a41c76
-            "actual-size": 200704,
a41c76
-            "format-specific": {
a41c76
-                "type": "qcow2",
a41c76
-                "data": {
a41c76
-                    "compat": "1.1",
a41c76
-                    "lazy-refcounts": false,
a41c76
-                    "refcount-bits": 16,
a41c76
-                    "corrupt": false
a41c76
-                }
a41c76
-            },
a41c76
-            "dirty-flag": false
a41c76
-        },
a41c76
-        "iops_wr": 0,
a41c76
-        "ro": false,
a41c76
-        "node-name": "libvirt-1-format",
a41c76
-        "backing_file_depth": 0,
a41c76
-        "drv": "qcow2",
a41c76
-        "iops": 0,
a41c76
-        "bps_wr": 0,
a41c76
-        "write_threshold": 0,
a41c76
-        "dirty-bitmaps": [
a41c76
-            {
a41c76
-                "name": "current",
a41c76
-                "recording": true,
a41c76
-                "persistent": true,
a41c76
-                "busy": false,
a41c76
-                "status": "active",
a41c76
-                "granularity": 65536,
a41c76
-                "count": 0
a41c76
-            },
a41c76
-            {
a41c76
-                "name": "d",
a41c76
-                "recording": false,
a41c76
-                "persistent": true,
a41c76
-                "busy": false,
a41c76
-                "status": "disabled",
a41c76
-                "granularity": 65536,
a41c76
-                "count": 0
a41c76
-            },
a41c76
-            {
a41c76
-                "name": "c",
a41c76
-                "recording": false,
a41c76
-                "persistent": true,
a41c76
-                "busy": false,
a41c76
-                "status": "disabled",
a41c76
-                "granularity": 65536,
a41c76
-                "count": 0
a41c76
-            },
a41c76
-            {
a41c76
-                "name": "b",
a41c76
-                "recording": false,
a41c76
-                "persistent": true,
a41c76
-                "busy": false,
a41c76
-                "status": "disabled",
a41c76
-                "granularity": 65536,
a41c76
-                "count": 0
a41c76
-            },
a41c76
-            {
a41c76
-                "name": "a",
a41c76
-                "recording": false,
a41c76
-                "persistent": true,
a41c76
-                "busy": false,
a41c76
-                "status": "disabled",
a41c76
-                "granularity": 65536,
a41c76
-                "count": 0
a41c76
-            }
a41c76
-        ],
a41c76
-        "encrypted": false,
a41c76
-        "bps": 0,
a41c76
-        "bps_rd": 0,
a41c76
-        "cache": {
a41c76
-            "no-flush": false,
a41c76
-            "direct": false,
a41c76
-            "writeback": true
a41c76
-        },
a41c76
-        "file": "/tmp/pull4.qcow2",
a41c76
-        "encryption_key_missing": false
a41c76
+  {
a41c76
+    "iops_rd": 0,
a41c76
+    "detect_zeroes": "off",
a41c76
+    "image": {
a41c76
+      "virtual-size": 10485760,
a41c76
+      "filename": "/tmp/bitmaps.qcow2",
a41c76
+      "cluster-size": 65536,
a41c76
+      "format": "qcow2",
a41c76
+      "actual-size": 200704,
a41c76
+      "format-specific": {
a41c76
+        "type": "qcow2",
a41c76
+        "data": {
a41c76
+          "compat": "1.1",
a41c76
+          "compression-type": "zlib",
a41c76
+          "lazy-refcounts": false,
a41c76
+          "refcount-bits": 16,
a41c76
+          "corrupt": false
a41c76
+        }
a41c76
+      },
a41c76
+      "dirty-flag": false
a41c76
     },
a41c76
-    {
a41c76
-        "iops_rd": 0,
a41c76
-        "detect_zeroes": "off",
a41c76
-        "image": {
a41c76
-            "virtual-size": 197120,
a41c76
-            "filename": "/tmp/pull4.qcow2",
a41c76
-            "format": "file",
a41c76
-            "actual-size": 200704,
a41c76
-            "dirty-flag": false
a41c76
-        },
a41c76
-        "iops_wr": 0,
a41c76
-        "ro": false,
a41c76
-        "node-name": "libvirt-1-storage",
a41c76
-        "backing_file_depth": 0,
a41c76
-        "drv": "file",
a41c76
-        "iops": 0,
a41c76
-        "bps_wr": 0,
a41c76
-        "write_threshold": 0,
a41c76
-        "encrypted": false,
a41c76
-        "bps": 0,
a41c76
-        "bps_rd": 0,
a41c76
-        "cache": {
a41c76
-            "no-flush": false,
a41c76
-            "direct": false,
a41c76
-            "writeback": true
a41c76
-        },
a41c76
-        "file": "/tmp/pull4.qcow2",
a41c76
-        "encryption_key_missing": false
a41c76
-    }
a41c76
+    "iops_wr": 0,
a41c76
+    "ro": false,
a41c76
+    "node-name": "libvirt-1-format",
a41c76
+    "backing_file_depth": 0,
a41c76
+    "drv": "qcow2",
a41c76
+    "iops": 0,
a41c76
+    "bps_wr": 0,
a41c76
+    "write_threshold": 0,
a41c76
+    "dirty-bitmaps": [
a41c76
+      {
a41c76
+        "name": "current",
a41c76
+        "recording": true,
a41c76
+        "persistent": true,
a41c76
+        "busy": false,
a41c76
+        "status": "active",
a41c76
+        "granularity": 65536,
a41c76
+        "count": 0
a41c76
+      },
a41c76
+      {
a41c76
+        "name": "d",
a41c76
+        "recording": true,
a41c76
+        "persistent": true,
a41c76
+        "busy": false,
a41c76
+        "status": "active",
a41c76
+        "granularity": 65536,
a41c76
+        "count": 0
a41c76
+      },
a41c76
+      {
a41c76
+        "name": "c",
a41c76
+        "recording": true,
a41c76
+        "persistent": true,
a41c76
+        "busy": false,
a41c76
+        "status": "active",
a41c76
+        "granularity": 65536,
a41c76
+        "count": 0
a41c76
+      },
a41c76
+      {
a41c76
+        "name": "b",
a41c76
+        "recording": true,
a41c76
+        "persistent": true,
a41c76
+        "busy": false,
a41c76
+        "status": "active",
a41c76
+        "granularity": 65536,
a41c76
+        "count": 0
a41c76
+      },
a41c76
+      {
a41c76
+        "name": "a",
a41c76
+        "recording": true,
a41c76
+        "persistent": true,
a41c76
+        "busy": false,
a41c76
+        "status": "active",
a41c76
+        "granularity": 65536,
a41c76
+        "count": 0
a41c76
+      }
a41c76
+    ],
a41c76
+    "encrypted": false,
a41c76
+    "bps": 0,
a41c76
+    "bps_rd": 0,
a41c76
+    "cache": {
a41c76
+      "no-flush": false,
a41c76
+      "direct": false,
a41c76
+      "writeback": true
a41c76
+    },
a41c76
+    "file": "/tmp/bitmaps.qcow2",
a41c76
+    "encryption_key_missing": false
a41c76
+  },
a41c76
+  {
a41c76
+    "iops_rd": 0,
a41c76
+    "detect_zeroes": "off",
a41c76
+    "image": {
a41c76
+      "virtual-size": 197120,
a41c76
+      "filename": "/tmp/bitmaps.qcow2",
a41c76
+      "format": "file",
a41c76
+      "actual-size": 200704,
a41c76
+      "dirty-flag": false
a41c76
+    },
a41c76
+    "iops_wr": 0,
a41c76
+    "ro": false,
a41c76
+    "node-name": "libvirt-1-storage",
a41c76
+    "backing_file_depth": 0,
a41c76
+    "drv": "file",
a41c76
+    "iops": 0,
a41c76
+    "bps_wr": 0,
a41c76
+    "write_threshold": 0,
a41c76
+    "encrypted": false,
a41c76
+    "bps": 0,
a41c76
+    "bps_rd": 0,
a41c76
+    "cache": {
a41c76
+      "no-flush": false,
a41c76
+      "direct": false,
a41c76
+      "writeback": true
a41c76
+    },
a41c76
+    "file": "/tmp/bitmaps.qcow2",
a41c76
+    "encryption_key_missing": false
a41c76
+  }
a41c76
 ]
a41c76
diff --git a/tests/qemublocktestdata/bitmap/basic.out b/tests/qemublocktestdata/bitmap/basic.out
a41c76
index 539f7d9bad..5c4c35b3f0 100644
a41c76
--- a/tests/qemublocktestdata/bitmap/basic.out
a41c76
+++ b/tests/qemublocktestdata/bitmap/basic.out
a41c76
@@ -1,6 +1,6 @@
a41c76
 libvirt-1-format:
a41c76
   current: record:1 busy:0 persist:1 inconsist:0 gran:65536 dirty:0
a41c76
-        d: record:0 busy:0 persist:1 inconsist:0 gran:65536 dirty:0
a41c76
-        c: record:0 busy:0 persist:1 inconsist:0 gran:65536 dirty:0
a41c76
-        b: record:0 busy:0 persist:1 inconsist:0 gran:65536 dirty:0
a41c76
-        a: record:0 busy:0 persist:1 inconsist:0 gran:65536 dirty:0
a41c76
+        d: record:1 busy:0 persist:1 inconsist:0 gran:65536 dirty:0
a41c76
+        c: record:1 busy:0 persist:1 inconsist:0 gran:65536 dirty:0
a41c76
+        b: record:1 busy:0 persist:1 inconsist:0 gran:65536 dirty:0
a41c76
+        a: record:1 busy:0 persist:1 inconsist:0 gran:65536 dirty:0
a41c76
-- 
a41c76
2.27.0
a41c76