render / rpms / libvirt

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