render / rpms / libvirt

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