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