render / rpms / libvirt

Forked from rpms/libvirt 10 months ago
Clone
d76c62
From e79ccc88c3668567bf656cd0113ca46058ef8f00 Mon Sep 17 00:00:00 2001
d76c62
Message-Id: <e79ccc88c3668567bf656cd0113ca46058ef8f00@dist-git>
d76c62
From: Peter Krempa <pkrempa@redhat.com>
d76c62
Date: Tue, 4 Feb 2020 15:08:11 +0100
d76c62
Subject: [PATCH] tests: qemublock: Add synthetic snapshot+checkpoint test data
d76c62
MIME-Version: 1.0
d76c62
Content-Type: text/plain; charset=UTF-8
d76c62
Content-Transfer-Encoding: 8bit
d76c62
d76c62
Add a faked qemu output which would simulate scenario where libvirt
d76c62
would take a snapshot and checkpoint simultaneously. This is visible in
d76c62
libvirt-2-format node where bitmap 'c' appears, but bitmap 'b' which is
d76c62
active in the previous layer is not present.
d76c62
d76c62
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
d76c62
Reviewed-by: Ján Tomko <jtomko@redhat.com>
d76c62
(cherry picked from commit d7d97e87afe00b58e23291cafb0ddb8aec3894d6)
d76c62
d76c62
https://bugzilla.redhat.com/show_bug.cgi?id=1207659
d76c62
Message-Id: <16c6b0162647c59d81b2b0ceb5ebc5f03c029285.1580824112.git.pkrempa@redhat.com>
d76c62
Reviewed-by: Ján Tomko <jtomko@redhat.com>
d76c62
---
d76c62
 tests/qemublocktest.c                         |   1 +
d76c62
 .../snapshots-synthetic-checkpoint.json       | 827 ++++++++++++++++++
d76c62
 .../bitmap/snapshots-synthetic-checkpoint.out |  13 +
d76c62
 3 files changed, 841 insertions(+)
d76c62
 create mode 100644 tests/qemublocktestdata/bitmap/snapshots-synthetic-checkpoint.json
d76c62
 create mode 100644 tests/qemublocktestdata/bitmap/snapshots-synthetic-checkpoint.out
d76c62
d76c62
diff --git a/tests/qemublocktest.c b/tests/qemublocktest.c
d76c62
index f48e4ce4b2..edaf82053d 100644
d76c62
--- a/tests/qemublocktest.c
d76c62
+++ b/tests/qemublocktest.c
d76c62
@@ -966,6 +966,7 @@ mymain(void)
d76c62
     TEST_BITMAP_DETECT("basic");
d76c62
     TEST_BITMAP_DETECT("synthetic");
d76c62
     TEST_BITMAP_DETECT("snapshots");
d76c62
+    TEST_BITMAP_DETECT("snapshots-synthetic-checkpoint");
d76c62
 
d76c62
 #define TEST_BACKUP_BITMAP_CALCULATE(testname, source, incrbackup, named) \
d76c62
     do { \
d76c62
diff --git a/tests/qemublocktestdata/bitmap/snapshots-synthetic-checkpoint.json b/tests/qemublocktestdata/bitmap/snapshots-synthetic-checkpoint.json
d76c62
new file mode 100644
d76c62
index 0000000000..25cc150d67
d76c62
--- /dev/null
d76c62
+++ b/tests/qemublocktestdata/bitmap/snapshots-synthetic-checkpoint.json
d76c62
@@ -0,0 +1,827 @@
d76c62
+[
d76c62
+    {
d76c62
+        "iops_rd": 0,
d76c62
+        "detect_zeroes": "off",
d76c62
+        "image": {
d76c62
+            "backing-image": {
d76c62
+                "backing-image": {
d76c62
+                    "backing-image": {
d76c62
+                        "backing-image": {
d76c62
+                            "virtual-size": 10485760,
d76c62
+                            "filename": "/tmp/pull4.qcow2",
d76c62
+                            "cluster-size": 65536,
d76c62
+                            "format": "qcow2",
d76c62
+                            "actual-size": 208896,
d76c62
+                            "format-specific": {
d76c62
+                                "type": "qcow2",
d76c62
+                                "data": {
d76c62
+                                    "compat": "1.1",
d76c62
+                                    "lazy-refcounts": false,
d76c62
+                                    "bitmaps": [
d76c62
+                                        {
d76c62
+                                            "flags": [
d76c62
+                                                "auto"
d76c62
+                                            ],
d76c62
+                                            "name": "a",
d76c62
+                                            "granularity": 65536
d76c62
+                                        }
d76c62
+                                    ],
d76c62
+                                    "refcount-bits": 16,
d76c62
+                                    "corrupt": false
d76c62
+                                }
d76c62
+                            },
d76c62
+                            "dirty-flag": false
d76c62
+                        },
d76c62
+                        "backing-filename-format": "qcow2",
d76c62
+                        "virtual-size": 10485760,
d76c62
+                        "filename": "/tmp/pull4.1575911522",
d76c62
+                        "cluster-size": 65536,
d76c62
+                        "format": "qcow2",
d76c62
+                        "actual-size": 208896,
d76c62
+                        "format-specific": {
d76c62
+                            "type": "qcow2",
d76c62
+                            "data": {
d76c62
+                                "compat": "1.1",
d76c62
+                                "lazy-refcounts": false,
d76c62
+                                "bitmaps": [
d76c62
+                                    {
d76c62
+                                        "flags": [
d76c62
+                                            "auto"
d76c62
+                                        ],
d76c62
+                                        "name": "a",
d76c62
+                                        "granularity": 65536
d76c62
+                                    }
d76c62
+                                ],
d76c62
+                                "refcount-bits": 16,
d76c62
+                                "corrupt": false
d76c62
+                            }
d76c62
+                        },
d76c62
+                        "full-backing-filename": "/tmp/pull4.qcow2",
d76c62
+                        "backing-filename": "/tmp/pull4.qcow2",
d76c62
+                        "dirty-flag": false
d76c62
+                    },
d76c62
+                    "backing-filename-format": "qcow2",
d76c62
+                    "virtual-size": 10485760,
d76c62
+                    "filename": "/tmp/pull4.1575911527",
d76c62
+                    "cluster-size": 65536,
d76c62
+                    "format": "qcow2",
d76c62
+                    "actual-size": 217088,
d76c62
+                    "format-specific": {
d76c62
+                        "type": "qcow2",
d76c62
+                        "data": {
d76c62
+                            "compat": "1.1",
d76c62
+                            "lazy-refcounts": false,
d76c62
+                            "bitmaps": [
d76c62
+                                {
d76c62
+                                    "flags": [
d76c62
+                                        "auto"
d76c62
+                                    ],
d76c62
+                                    "name": "c",
d76c62
+                                    "granularity": 65536
d76c62
+                                },
d76c62
+                                {
d76c62
+                                    "flags": [
d76c62
+
d76c62
+                                    ],
d76c62
+                                    "name": "b",
d76c62
+                                    "granularity": 65536
d76c62
+                                },
d76c62
+                                {
d76c62
+                                    "flags": [
d76c62
+
d76c62
+                                    ],
d76c62
+                                    "name": "a",
d76c62
+                                    "granularity": 65536
d76c62
+                                }
d76c62
+                            ],
d76c62
+                            "refcount-bits": 16,
d76c62
+                            "corrupt": false
d76c62
+                        }
d76c62
+                    },
d76c62
+                    "full-backing-filename": "/tmp/pull4.1575911522",
d76c62
+                    "backing-filename": "/tmp/pull4.1575911522",
d76c62
+                    "dirty-flag": false
d76c62
+                },
d76c62
+                "backing-filename-format": "qcow2",
d76c62
+                "virtual-size": 10485760,
d76c62
+                "filename": "/tmp/pull4.1575911540",
d76c62
+                "cluster-size": 65536,
d76c62
+                "format": "qcow2",
d76c62
+                "actual-size": 212992,
d76c62
+                "format-specific": {
d76c62
+                    "type": "qcow2",
d76c62
+                    "data": {
d76c62
+                        "compat": "1.1",
d76c62
+                        "lazy-refcounts": false,
d76c62
+                        "bitmaps": [
d76c62
+                            {
d76c62
+                                "flags": [
d76c62
+                                    "auto"
d76c62
+                                ],
d76c62
+                                "name": "d",
d76c62
+                                "granularity": 65536
d76c62
+                            },
d76c62
+                            {
d76c62
+                                "flags": [
d76c62
+
d76c62
+                                ],
d76c62
+                                "name": "c",
d76c62
+                                "granularity": 65536
d76c62
+                            }
d76c62
+                        ],
d76c62
+                        "refcount-bits": 16,
d76c62
+                        "corrupt": false
d76c62
+                    }
d76c62
+                },
d76c62
+                "full-backing-filename": "/tmp/pull4.1575911527",
d76c62
+                "backing-filename": "/tmp/pull4.1575911527",
d76c62
+                "dirty-flag": false
d76c62
+            },
d76c62
+            "backing-filename-format": "qcow2",
d76c62
+            "virtual-size": 10485760,
d76c62
+            "filename": "/tmp/pull4.1575911550",
d76c62
+            "cluster-size": 65536,
d76c62
+            "format": "qcow2",
d76c62
+            "actual-size": 212992,
d76c62
+            "format-specific": {
d76c62
+                "type": "qcow2",
d76c62
+                "data": {
d76c62
+                    "compat": "1.1",
d76c62
+                    "lazy-refcounts": false,
d76c62
+                    "bitmaps": [
d76c62
+                        {
d76c62
+                            "flags": [
d76c62
+                                "in-use",
d76c62
+                                "auto"
d76c62
+                            ],
d76c62
+                            "name": "current",
d76c62
+                            "granularity": 65536
d76c62
+                        },
d76c62
+                        {
d76c62
+                            "flags": [
d76c62
+                                "in-use"
d76c62
+                            ],
d76c62
+                            "name": "d",
d76c62
+                            "granularity": 65536
d76c62
+                        }
d76c62
+                    ],
d76c62
+                    "refcount-bits": 16,
d76c62
+                    "corrupt": false
d76c62
+                }
d76c62
+            },
d76c62
+            "full-backing-filename": "/tmp/pull4.1575911540",
d76c62
+            "backing-filename": "/tmp/pull4.1575911540",
d76c62
+            "dirty-flag": false
d76c62
+        },
d76c62
+        "iops_wr": 0,
d76c62
+        "ro": false,
d76c62
+        "node-name": "libvirt-1-format",
d76c62
+        "backing_file_depth": 4,
d76c62
+        "drv": "qcow2",
d76c62
+        "iops": 0,
d76c62
+        "bps_wr": 0,
d76c62
+        "write_threshold": 0,
d76c62
+        "backing_file": "/tmp/pull4.1575911540",
d76c62
+        "dirty-bitmaps": [
d76c62
+            {
d76c62
+                "name": "d",
d76c62
+                "recording": false,
d76c62
+                "persistent": true,
d76c62
+                "busy": false,
d76c62
+                "status": "disabled",
d76c62
+                "granularity": 65536,
d76c62
+                "count": 0
d76c62
+            },
d76c62
+            {
d76c62
+                "name": "current",
d76c62
+                "recording": true,
d76c62
+                "persistent": true,
d76c62
+                "busy": false,
d76c62
+                "status": "active",
d76c62
+                "granularity": 65536,
d76c62
+                "count": 0
d76c62
+            }
d76c62
+        ],
d76c62
+        "encrypted": false,
d76c62
+        "bps": 0,
d76c62
+        "bps_rd": 0,
d76c62
+        "cache": {
d76c62
+            "no-flush": false,
d76c62
+            "direct": false,
d76c62
+            "writeback": true
d76c62
+        },
d76c62
+        "file": "/tmp/pull4.1575911550",
d76c62
+        "encryption_key_missing": false
d76c62
+    },
d76c62
+    {
d76c62
+        "iops_rd": 0,
d76c62
+        "detect_zeroes": "off",
d76c62
+        "image": {
d76c62
+            "virtual-size": 393728,
d76c62
+            "filename": "/tmp/pull4.1575911550",
d76c62
+            "format": "file",
d76c62
+            "actual-size": 212992,
d76c62
+            "dirty-flag": false
d76c62
+        },
d76c62
+        "iops_wr": 0,
d76c62
+        "ro": false,
d76c62
+        "node-name": "libvirt-1-storage",
d76c62
+        "backing_file_depth": 0,
d76c62
+        "drv": "file",
d76c62
+        "iops": 0,
d76c62
+        "bps_wr": 0,
d76c62
+        "write_threshold": 0,
d76c62
+        "encrypted": false,
d76c62
+        "bps": 0,
d76c62
+        "bps_rd": 0,
d76c62
+        "cache": {
d76c62
+            "no-flush": false,
d76c62
+            "direct": false,
d76c62
+            "writeback": true
d76c62
+        },
d76c62
+        "file": "/tmp/pull4.1575911550",
d76c62
+        "encryption_key_missing": false
d76c62
+    },
d76c62
+    {
d76c62
+        "iops_rd": 0,
d76c62
+        "detect_zeroes": "off",
d76c62
+        "image": {
d76c62
+            "backing-image": {
d76c62
+                "backing-image": {
d76c62
+                    "backing-image": {
d76c62
+                        "virtual-size": 10485760,
d76c62
+                        "filename": "/tmp/pull4.qcow2",
d76c62
+                        "cluster-size": 65536,
d76c62
+                        "format": "qcow2",
d76c62
+                        "actual-size": 208896,
d76c62
+                        "format-specific": {
d76c62
+                            "type": "qcow2",
d76c62
+                            "data": {
d76c62
+                                "compat": "1.1",
d76c62
+                                "lazy-refcounts": false,
d76c62
+                                "bitmaps": [
d76c62
+                                    {
d76c62
+                                        "flags": [
d76c62
+                                            "auto"
d76c62
+                                        ],
d76c62
+                                        "name": "a",
d76c62
+                                        "granularity": 65536
d76c62
+                                    }
d76c62
+                                ],
d76c62
+                                "refcount-bits": 16,
d76c62
+                                "corrupt": false
d76c62
+                            }
d76c62
+                        },
d76c62
+                        "dirty-flag": false
d76c62
+                    },
d76c62
+                    "backing-filename-format": "qcow2",
d76c62
+                    "virtual-size": 10485760,
d76c62
+                    "filename": "/tmp/pull4.1575911522",
d76c62
+                    "cluster-size": 65536,
d76c62
+                    "format": "qcow2",
d76c62
+                    "actual-size": 208896,
d76c62
+                    "format-specific": {
d76c62
+                        "type": "qcow2",
d76c62
+                        "data": {
d76c62
+                            "compat": "1.1",
d76c62
+                            "lazy-refcounts": false,
d76c62
+                            "bitmaps": [
d76c62
+                                {
d76c62
+                                    "flags": [
d76c62
+                                        "auto"
d76c62
+                                    ],
d76c62
+                                    "name": "a",
d76c62
+                                    "granularity": 65536
d76c62
+                                }
d76c62
+                            ],
d76c62
+                            "refcount-bits": 16,
d76c62
+                            "corrupt": false
d76c62
+                        }
d76c62
+                    },
d76c62
+                    "full-backing-filename": "/tmp/pull4.qcow2",
d76c62
+                    "backing-filename": "/tmp/pull4.qcow2",
d76c62
+                    "dirty-flag": false
d76c62
+                },
d76c62
+                "backing-filename-format": "qcow2",
d76c62
+                "virtual-size": 10485760,
d76c62
+                "filename": "/tmp/pull4.1575911527",
d76c62
+                "cluster-size": 65536,
d76c62
+                "format": "qcow2",
d76c62
+                "actual-size": 217088,
d76c62
+                "format-specific": {
d76c62
+                    "type": "qcow2",
d76c62
+                    "data": {
d76c62
+                        "compat": "1.1",
d76c62
+                        "lazy-refcounts": false,
d76c62
+                        "bitmaps": [
d76c62
+                            {
d76c62
+                                "flags": [
d76c62
+                                    "auto"
d76c62
+                                ],
d76c62
+                                "name": "c",
d76c62
+                                "granularity": 65536
d76c62
+                            },
d76c62
+                            {
d76c62
+                                "flags": [
d76c62
+
d76c62
+                                ],
d76c62
+                                "name": "b",
d76c62
+                                "granularity": 65536
d76c62
+                            },
d76c62
+                            {
d76c62
+                                "flags": [
d76c62
+
d76c62
+                                ],
d76c62
+                                "name": "a",
d76c62
+                                "granularity": 65536
d76c62
+                            }
d76c62
+                        ],
d76c62
+                        "refcount-bits": 16,
d76c62
+                        "corrupt": false
d76c62
+                    }
d76c62
+                },
d76c62
+                "full-backing-filename": "/tmp/pull4.1575911522",
d76c62
+                "backing-filename": "/tmp/pull4.1575911522",
d76c62
+                "dirty-flag": false
d76c62
+            },
d76c62
+            "backing-filename-format": "qcow2",
d76c62
+            "virtual-size": 10485760,
d76c62
+            "filename": "/tmp/pull4.1575911540",
d76c62
+            "cluster-size": 65536,
d76c62
+            "format": "qcow2",
d76c62
+            "actual-size": 212992,
d76c62
+            "format-specific": {
d76c62
+                "type": "qcow2",
d76c62
+                "data": {
d76c62
+                    "compat": "1.1",
d76c62
+                    "lazy-refcounts": false,
d76c62
+                    "bitmaps": [
d76c62
+                        {
d76c62
+                            "flags": [
d76c62
+                                "auto"
d76c62
+                            ],
d76c62
+                            "name": "d",
d76c62
+                            "granularity": 65536
d76c62
+                        },
d76c62
+                        {
d76c62
+                            "flags": [
d76c62
+
d76c62
+                            ],
d76c62
+                            "name": "c",
d76c62
+                            "granularity": 65536
d76c62
+                        }
d76c62
+                    ],
d76c62
+                    "refcount-bits": 16,
d76c62
+                    "corrupt": false
d76c62
+                }
d76c62
+            },
d76c62
+            "full-backing-filename": "/tmp/pull4.1575911527",
d76c62
+            "backing-filename": "/tmp/pull4.1575911527",
d76c62
+            "dirty-flag": false
d76c62
+        },
d76c62
+        "iops_wr": 0,
d76c62
+        "ro": true,
d76c62
+        "node-name": "libvirt-2-format",
d76c62
+        "backing_file_depth": 3,
d76c62
+        "drv": "qcow2",
d76c62
+        "iops": 0,
d76c62
+        "bps_wr": 0,
d76c62
+        "write_threshold": 0,
d76c62
+        "backing_file": "/tmp/pull4.1575911527",
d76c62
+        "dirty-bitmaps": [
d76c62
+            {
d76c62
+                "name": "c",
d76c62
+                "recording": false,
d76c62
+                "persistent": true,
d76c62
+                "busy": false,
d76c62
+                "status": "disabled",
d76c62
+                "granularity": 65536,
d76c62
+                "count": 0
d76c62
+            },
d76c62
+            {
d76c62
+                "name": "d",
d76c62
+                "recording": true,
d76c62
+                "persistent": true,
d76c62
+                "busy": false,
d76c62
+                "status": "active",
d76c62
+                "granularity": 65536,
d76c62
+                "count": 0
d76c62
+            }
d76c62
+        ],
d76c62
+        "encrypted": false,
d76c62
+        "bps": 0,
d76c62
+        "bps_rd": 0,
d76c62
+        "cache": {
d76c62
+            "no-flush": false,
d76c62
+            "direct": false,
d76c62
+            "writeback": true
d76c62
+        },
d76c62
+        "file": "/tmp/pull4.1575911540",
d76c62
+        "encryption_key_missing": false
d76c62
+    },
d76c62
+    {
d76c62
+        "iops_rd": 0,
d76c62
+        "detect_zeroes": "off",
d76c62
+        "image": {
d76c62
+            "virtual-size": 393728,
d76c62
+            "filename": "/tmp/pull4.1575911540",
d76c62
+            "format": "file",
d76c62
+            "actual-size": 212992,
d76c62
+            "dirty-flag": false
d76c62
+        },
d76c62
+        "iops_wr": 0,
d76c62
+        "ro": false,
d76c62
+        "node-name": "libvirt-2-storage",
d76c62
+        "backing_file_depth": 0,
d76c62
+        "drv": "file",
d76c62
+        "iops": 0,
d76c62
+        "bps_wr": 0,
d76c62
+        "write_threshold": 0,
d76c62
+        "encrypted": false,
d76c62
+        "bps": 0,
d76c62
+        "bps_rd": 0,
d76c62
+        "cache": {
d76c62
+            "no-flush": false,
d76c62
+            "direct": false,
d76c62
+            "writeback": true
d76c62
+        },
d76c62
+        "file": "/tmp/pull4.1575911540",
d76c62
+        "encryption_key_missing": false
d76c62
+    },
d76c62
+    {
d76c62
+        "iops_rd": 0,
d76c62
+        "detect_zeroes": "off",
d76c62
+        "image": {
d76c62
+            "backing-image": {
d76c62
+                "backing-image": {
d76c62
+                    "virtual-size": 10485760,
d76c62
+                    "filename": "/tmp/pull4.qcow2",
d76c62
+                    "cluster-size": 65536,
d76c62
+                    "format": "qcow2",
d76c62
+                    "actual-size": 208896,
d76c62
+                    "format-specific": {
d76c62
+                        "type": "qcow2",
d76c62
+                        "data": {
d76c62
+                            "compat": "1.1",
d76c62
+                            "lazy-refcounts": false,
d76c62
+                            "bitmaps": [
d76c62
+                                {
d76c62
+                                    "flags": [
d76c62
+                                        "auto"
d76c62
+                                    ],
d76c62
+                                    "name": "a",
d76c62
+                                    "granularity": 65536
d76c62
+                                }
d76c62
+                            ],
d76c62
+                            "refcount-bits": 16,
d76c62
+                            "corrupt": false
d76c62
+                        }
d76c62
+                    },
d76c62
+                    "dirty-flag": false
d76c62
+                },
d76c62
+                "backing-filename-format": "qcow2",
d76c62
+                "virtual-size": 10485760,
d76c62
+                "filename": "/tmp/pull4.1575911522",
d76c62
+                "cluster-size": 65536,
d76c62
+                "format": "qcow2",
d76c62
+                "actual-size": 208896,
d76c62
+                "format-specific": {
d76c62
+                    "type": "qcow2",
d76c62
+                    "data": {
d76c62
+                        "compat": "1.1",
d76c62
+                        "lazy-refcounts": false,
d76c62
+                        "bitmaps": [
d76c62
+                            {
d76c62
+                                "flags": [
d76c62
+                                    "auto"
d76c62
+                                ],
d76c62
+                                "name": "a",
d76c62
+                                "granularity": 65536
d76c62
+                            }
d76c62
+                        ],
d76c62
+                        "refcount-bits": 16,
d76c62
+                        "corrupt": false
d76c62
+                    }
d76c62
+                },
d76c62
+                "full-backing-filename": "/tmp/pull4.qcow2",
d76c62
+                "backing-filename": "/tmp/pull4.qcow2",
d76c62
+                "dirty-flag": false
d76c62
+            },
d76c62
+            "backing-filename-format": "qcow2",
d76c62
+            "virtual-size": 10485760,
d76c62
+            "filename": "/tmp/pull4.1575911527",
d76c62
+            "cluster-size": 65536,
d76c62
+            "format": "qcow2",
d76c62
+            "actual-size": 217088,
d76c62
+            "format-specific": {
d76c62
+                "type": "qcow2",
d76c62
+                "data": {
d76c62
+                    "compat": "1.1",
d76c62
+                    "lazy-refcounts": false,
d76c62
+                    "bitmaps": [
d76c62
+                        {
d76c62
+                            "flags": [
d76c62
+                                "auto"
d76c62
+                            ],
d76c62
+                            "name": "c",
d76c62
+                            "granularity": 65536
d76c62
+                        },
d76c62
+                        {
d76c62
+                            "flags": [
d76c62
+
d76c62
+                            ],
d76c62
+                            "name": "b",
d76c62
+                            "granularity": 65536
d76c62
+                        },
d76c62
+                        {
d76c62
+                            "flags": [
d76c62
+
d76c62
+                            ],
d76c62
+                            "name": "a",
d76c62
+                            "granularity": 65536
d76c62
+                        }
d76c62
+                    ],
d76c62
+                    "refcount-bits": 16,
d76c62
+                    "corrupt": false
d76c62
+                }
d76c62
+            },
d76c62
+            "full-backing-filename": "/tmp/pull4.1575911522",
d76c62
+            "backing-filename": "/tmp/pull4.1575911522",
d76c62
+            "dirty-flag": false
d76c62
+        },
d76c62
+        "iops_wr": 0,
d76c62
+        "ro": true,
d76c62
+        "node-name": "libvirt-3-format",
d76c62
+        "backing_file_depth": 2,
d76c62
+        "drv": "qcow2",
d76c62
+        "iops": 0,
d76c62
+        "bps_wr": 0,
d76c62
+        "write_threshold": 0,
d76c62
+        "backing_file": "/tmp/pull4.1575911522",
d76c62
+        "dirty-bitmaps": [
d76c62
+            {
d76c62
+                "name": "a",
d76c62
+                "recording": false,
d76c62
+                "persistent": true,
d76c62
+                "busy": false,
d76c62
+                "status": "disabled",
d76c62
+                "granularity": 65536,
d76c62
+                "count": 0
d76c62
+            },
d76c62
+            {
d76c62
+                "name": "b",
d76c62
+                "recording": true,
d76c62
+                "persistent": true,
d76c62
+                "busy": false,
d76c62
+                "status": "disabled",
d76c62
+                "granularity": 65536,
d76c62
+                "count": 0
d76c62
+            }
d76c62
+        ],
d76c62
+        "encrypted": false,
d76c62
+        "bps": 0,
d76c62
+        "bps_rd": 0,
d76c62
+        "cache": {
d76c62
+            "no-flush": false,
d76c62
+            "direct": false,
d76c62
+            "writeback": true
d76c62
+        },
d76c62
+        "file": "/tmp/pull4.1575911527",
d76c62
+        "encryption_key_missing": false
d76c62
+    },
d76c62
+    {
d76c62
+        "iops_rd": 0,
d76c62
+        "detect_zeroes": "off",
d76c62
+        "image": {
d76c62
+            "virtual-size": 459264,
d76c62
+            "filename": "/tmp/pull4.1575911527",
d76c62
+            "format": "file",
d76c62
+            "actual-size": 217088,
d76c62
+            "dirty-flag": false
d76c62
+        },
d76c62
+        "iops_wr": 0,
d76c62
+        "ro": false,
d76c62
+        "node-name": "libvirt-3-storage",
d76c62
+        "backing_file_depth": 0,
d76c62
+        "drv": "file",
d76c62
+        "iops": 0,
d76c62
+        "bps_wr": 0,
d76c62
+        "write_threshold": 0,
d76c62
+        "encrypted": false,
d76c62
+        "bps": 0,
d76c62
+        "bps_rd": 0,
d76c62
+        "cache": {
d76c62
+            "no-flush": false,
d76c62
+            "direct": false,
d76c62
+            "writeback": true
d76c62
+        },
d76c62
+        "file": "/tmp/pull4.1575911527",
d76c62
+        "encryption_key_missing": false
d76c62
+    },
d76c62
+    {
d76c62
+        "iops_rd": 0,
d76c62
+        "detect_zeroes": "off",
d76c62
+        "image": {
d76c62
+            "backing-image": {
d76c62
+                "virtual-size": 10485760,
d76c62
+                "filename": "/tmp/pull4.qcow2",
d76c62
+                "cluster-size": 65536,
d76c62
+                "format": "qcow2",
d76c62
+                "actual-size": 208896,
d76c62
+                "format-specific": {
d76c62
+                    "type": "qcow2",
d76c62
+                    "data": {
d76c62
+                        "compat": "1.1",
d76c62
+                        "lazy-refcounts": false,
d76c62
+                        "bitmaps": [
d76c62
+                            {
d76c62
+                                "flags": [
d76c62
+                                    "auto"
d76c62
+                                ],
d76c62
+                                "name": "a",
d76c62
+                                "granularity": 65536
d76c62
+                            }
d76c62
+                        ],
d76c62
+                        "refcount-bits": 16,
d76c62
+                        "corrupt": false
d76c62
+                    }
d76c62
+                },
d76c62
+                "dirty-flag": false
d76c62
+            },
d76c62
+            "backing-filename-format": "qcow2",
d76c62
+            "virtual-size": 10485760,
d76c62
+            "filename": "/tmp/pull4.1575911522",
d76c62
+            "cluster-size": 65536,
d76c62
+            "format": "qcow2",
d76c62
+            "actual-size": 208896,
d76c62
+            "format-specific": {
d76c62
+                "type": "qcow2",
d76c62
+                "data": {
d76c62
+                    "compat": "1.1",
d76c62
+                    "lazy-refcounts": false,
d76c62
+                    "bitmaps": [
d76c62
+                        {
d76c62
+                            "flags": [
d76c62
+                                "auto"
d76c62
+                            ],
d76c62
+                            "name": "a",
d76c62
+                            "granularity": 65536
d76c62
+                        }
d76c62
+                    ],
d76c62
+                    "refcount-bits": 16,
d76c62
+                    "corrupt": false
d76c62
+                }
d76c62
+            },
d76c62
+            "full-backing-filename": "/tmp/pull4.qcow2",
d76c62
+            "backing-filename": "/tmp/pull4.qcow2",
d76c62
+            "dirty-flag": false
d76c62
+        },
d76c62
+        "iops_wr": 0,
d76c62
+        "ro": true,
d76c62
+        "node-name": "libvirt-4-format",
d76c62
+        "backing_file_depth": 1,
d76c62
+        "drv": "qcow2",
d76c62
+        "iops": 0,
d76c62
+        "bps_wr": 0,
d76c62
+        "write_threshold": 0,
d76c62
+        "backing_file": "/tmp/pull4.qcow2",
d76c62
+        "dirty-bitmaps": [
d76c62
+            {
d76c62
+                "name": "a",
d76c62
+                "recording": true,
d76c62
+                "persistent": true,
d76c62
+                "busy": false,
d76c62
+                "status": "active",
d76c62
+                "granularity": 65536,
d76c62
+                "count": 0
d76c62
+            }
d76c62
+        ],
d76c62
+        "encrypted": false,
d76c62
+        "bps": 0,
d76c62
+        "bps_rd": 0,
d76c62
+        "cache": {
d76c62
+            "no-flush": false,
d76c62
+            "direct": false,
d76c62
+            "writeback": true
d76c62
+        },
d76c62
+        "file": "/tmp/pull4.1575911522",
d76c62
+        "encryption_key_missing": false
d76c62
+    },
d76c62
+    {
d76c62
+        "iops_rd": 0,
d76c62
+        "detect_zeroes": "off",
d76c62
+        "image": {
d76c62
+            "virtual-size": 328192,
d76c62
+            "filename": "/tmp/pull4.1575911522",
d76c62
+            "format": "file",
d76c62
+            "actual-size": 208896,
d76c62
+            "dirty-flag": false
d76c62
+        },
d76c62
+        "iops_wr": 0,
d76c62
+        "ro": false,
d76c62
+        "node-name": "libvirt-4-storage",
d76c62
+        "backing_file_depth": 0,
d76c62
+        "drv": "file",
d76c62
+        "iops": 0,
d76c62
+        "bps_wr": 0,
d76c62
+        "write_threshold": 0,
d76c62
+        "encrypted": false,
d76c62
+        "bps": 0,
d76c62
+        "bps_rd": 0,
d76c62
+        "cache": {
d76c62
+            "no-flush": false,
d76c62
+            "direct": false,
d76c62
+            "writeback": true
d76c62
+        },
d76c62
+        "file": "/tmp/pull4.1575911522",
d76c62
+        "encryption_key_missing": false
d76c62
+    },
d76c62
+    {
d76c62
+        "iops_rd": 0,
d76c62
+        "detect_zeroes": "off",
d76c62
+        "image": {
d76c62
+            "virtual-size": 10485760,
d76c62
+            "filename": "/tmp/pull4.qcow2",
d76c62
+            "cluster-size": 65536,
d76c62
+            "format": "qcow2",
d76c62
+            "actual-size": 208896,
d76c62
+            "format-specific": {
d76c62
+                "type": "qcow2",
d76c62
+                "data": {
d76c62
+                    "compat": "1.1",
d76c62
+                    "lazy-refcounts": false,
d76c62
+                    "bitmaps": [
d76c62
+                        {
d76c62
+                            "flags": [
d76c62
+                                "auto"
d76c62
+                            ],
d76c62
+                            "name": "a",
d76c62
+                            "granularity": 65536
d76c62
+                        }
d76c62
+                    ],
d76c62
+                    "refcount-bits": 16,
d76c62
+                    "corrupt": false
d76c62
+                }
d76c62
+            },
d76c62
+            "dirty-flag": false
d76c62
+        },
d76c62
+        "iops_wr": 0,
d76c62
+        "ro": true,
d76c62
+        "node-name": "libvirt-5-format",
d76c62
+        "backing_file_depth": 0,
d76c62
+        "drv": "qcow2",
d76c62
+        "iops": 0,
d76c62
+        "bps_wr": 0,
d76c62
+        "write_threshold": 0,
d76c62
+        "dirty-bitmaps": [
d76c62
+            {
d76c62
+                "name": "a",
d76c62
+                "recording": true,
d76c62
+                "persistent": true,
d76c62
+                "busy": false,
d76c62
+                "status": "active",
d76c62
+                "granularity": 65536,
d76c62
+                "count": 0
d76c62
+            }
d76c62
+        ],
d76c62
+        "encrypted": false,
d76c62
+        "bps": 0,
d76c62
+        "bps_rd": 0,
d76c62
+        "cache": {
d76c62
+            "no-flush": false,
d76c62
+            "direct": false,
d76c62
+            "writeback": true
d76c62
+        },
d76c62
+        "file": "/tmp/pull4.qcow2",
d76c62
+        "encryption_key_missing": false
d76c62
+    },
d76c62
+    {
d76c62
+        "iops_rd": 0,
d76c62
+        "detect_zeroes": "off",
d76c62
+        "image": {
d76c62
+            "virtual-size": 328192,
d76c62
+            "filename": "/tmp/pull4.qcow2",
d76c62
+            "format": "file",
d76c62
+            "actual-size": 208896,
d76c62
+            "dirty-flag": false
d76c62
+        },
d76c62
+        "iops_wr": 0,
d76c62
+        "ro": false,
d76c62
+        "node-name": "libvirt-5-storage",
d76c62
+        "backing_file_depth": 0,
d76c62
+        "drv": "file",
d76c62
+        "iops": 0,
d76c62
+        "bps_wr": 0,
d76c62
+        "write_threshold": 0,
d76c62
+        "encrypted": false,
d76c62
+        "bps": 0,
d76c62
+        "bps_rd": 0,
d76c62
+        "cache": {
d76c62
+            "no-flush": false,
d76c62
+            "direct": false,
d76c62
+            "writeback": true
d76c62
+        },
d76c62
+        "file": "/tmp/pull4.qcow2",
d76c62
+        "encryption_key_missing": false
d76c62
+    }
d76c62
+]
d76c62
diff --git a/tests/qemublocktestdata/bitmap/snapshots-synthetic-checkpoint.out b/tests/qemublocktestdata/bitmap/snapshots-synthetic-checkpoint.out
d76c62
new file mode 100644
d76c62
index 0000000000..0270657001
d76c62
--- /dev/null
d76c62
+++ b/tests/qemublocktestdata/bitmap/snapshots-synthetic-checkpoint.out
d76c62
@@ -0,0 +1,13 @@
d76c62
+libvirt-1-format:
d76c62
+        d: record:0 busy:0 persist:1 inconsist:0 gran:65536 dirty:0
d76c62
+  current: record:1 busy:0 persist:1 inconsist:0 gran:65536 dirty:0
d76c62
+libvirt-2-format:
d76c62
+        c: record:0 busy:0 persist:1 inconsist:0 gran:65536 dirty:0
d76c62
+        d: record:1 busy:0 persist:1 inconsist:0 gran:65536 dirty:0
d76c62
+libvirt-3-format:
d76c62
+        a: record:0 busy:0 persist:1 inconsist:0 gran:65536 dirty:0
d76c62
+        b: record:1 busy:0 persist:1 inconsist:0 gran:65536 dirty:0
d76c62
+libvirt-4-format:
d76c62
+        a: record:1 busy:0 persist:1 inconsist:0 gran:65536 dirty:0
d76c62
+libvirt-5-format:
d76c62
+        a: record:1 busy:0 persist:1 inconsist:0 gran:65536 dirty:0
d76c62
-- 
d76c62
2.25.0
d76c62