render / rpms / libvirt

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