render / rpms / libvirt

Forked from rpms/libvirt 9 months ago
Clone
fbe740
From 2eb309fcc6bc22e5eff4fe048683176056a43a94 Mon Sep 17 00:00:00 2001
fbe740
Message-Id: <2eb309fcc6bc22e5eff4fe048683176056a43a94@dist-git>
fbe740
From: Peter Krempa <pkrempa@redhat.com>
fbe740
Date: Mon, 16 Mar 2020 22:12:26 +0100
fbe740
Subject: [PATCH] qemublocktest: Add more tests for block-commit bitmap
fbe740
 handling with snapshots
fbe740
MIME-Version: 1.0
fbe740
Content-Type: text/plain; charset=UTF-8
fbe740
Content-Transfer-Encoding: 8bit
fbe740
fbe740
Test handling of more complex cases of merging bitmaps accross
fbe740
snapshots.
fbe740
fbe740
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
fbe740
Reviewed-by: Eric Blake <eblake@redhat.com>
fbe740
(cherry picked from commit 8f096cd8808b186d451ec100c646dc8ddd974735)
fbe740
https://bugzilla.redhat.com/show_bug.cgi?id=1799013
fbe740
Message-Id: <45bfd1540594f663240f64a58a369c31cd83e607.1584391727.git.pkrempa@redhat.com>
fbe740
Reviewed-by: Ján Tomko <jtomko@redhat.com>
fbe740
---
fbe740
 tests/qemublocktest.c                         |  15 ++
fbe740
 .../bitmapblockcommit/snapshots-1-2           |  49 +++++++
fbe740
 .../bitmapblockcommit/snapshots-1-3           |  76 ++++++++++
fbe740
 .../bitmapblockcommit/snapshots-1-4           | 126 +++++++++++++++++
fbe740
 .../bitmapblockcommit/snapshots-1-5           | 130 ++++++++++++++++++
fbe740
 .../bitmapblockcommit/snapshots-2-3           |  49 +++++++
fbe740
 .../bitmapblockcommit/snapshots-2-4           |  99 +++++++++++++
fbe740
 .../bitmapblockcommit/snapshots-2-5           | 103 ++++++++++++++
fbe740
 .../bitmapblockcommit/snapshots-3-4           |  72 ++++++++++
fbe740
 .../bitmapblockcommit/snapshots-3-5           |  76 ++++++++++
fbe740
 .../bitmapblockcommit/snapshots-4-5           |  33 +++++
fbe740
 11 files changed, 828 insertions(+)
fbe740
 create mode 100644 tests/qemublocktestdata/bitmapblockcommit/snapshots-1-2
fbe740
 create mode 100644 tests/qemublocktestdata/bitmapblockcommit/snapshots-1-3
fbe740
 create mode 100644 tests/qemublocktestdata/bitmapblockcommit/snapshots-1-4
fbe740
 create mode 100644 tests/qemublocktestdata/bitmapblockcommit/snapshots-1-5
fbe740
 create mode 100644 tests/qemublocktestdata/bitmapblockcommit/snapshots-2-3
fbe740
 create mode 100644 tests/qemublocktestdata/bitmapblockcommit/snapshots-2-4
fbe740
 create mode 100644 tests/qemublocktestdata/bitmapblockcommit/snapshots-2-5
fbe740
 create mode 100644 tests/qemublocktestdata/bitmapblockcommit/snapshots-3-4
fbe740
 create mode 100644 tests/qemublocktestdata/bitmapblockcommit/snapshots-3-5
fbe740
 create mode 100644 tests/qemublocktestdata/bitmapblockcommit/snapshots-4-5
fbe740
fbe740
diff --git a/tests/qemublocktest.c b/tests/qemublocktest.c
fbe740
index 63ac80b584..ad68b37c80 100644
fbe740
--- a/tests/qemublocktest.c
fbe740
+++ b/tests/qemublocktest.c
fbe740
@@ -1392,6 +1392,21 @@ mymain(void)
fbe740
     TEST_BITMAP_BLOCKCOMMIT("basic-1-3", 1, 3, "basic");
fbe740
     TEST_BITMAP_BLOCKCOMMIT("basic-2-3", 2, 3, "basic");
fbe740
 
fbe740
+    TEST_BITMAP_BLOCKCOMMIT("snapshots-1-2", 1, 2, "snapshots");
fbe740
+    TEST_BITMAP_BLOCKCOMMIT("snapshots-1-3", 1, 3, "snapshots");
fbe740
+    TEST_BITMAP_BLOCKCOMMIT("snapshots-1-4", 1, 4, "snapshots");
fbe740
+    TEST_BITMAP_BLOCKCOMMIT("snapshots-1-5", 1, 5, "snapshots");
fbe740
+
fbe740
+    TEST_BITMAP_BLOCKCOMMIT("snapshots-2-3", 2, 3, "snapshots");
fbe740
+    TEST_BITMAP_BLOCKCOMMIT("snapshots-2-4", 2, 4, "snapshots");
fbe740
+    TEST_BITMAP_BLOCKCOMMIT("snapshots-2-5", 2, 5, "snapshots");
fbe740
+
fbe740
+    TEST_BITMAP_BLOCKCOMMIT("snapshots-3-4", 3, 4, "snapshots");
fbe740
+    TEST_BITMAP_BLOCKCOMMIT("snapshots-3-5", 3, 5, "snapshots");
fbe740
+
fbe740
+    TEST_BITMAP_BLOCKCOMMIT("snapshots-4-5", 4, 5, "snapshots");
fbe740
+
fbe740
+
fbe740
  cleanup:
fbe740
     qemuTestDriverFree(&driver);
fbe740
     VIR_FREE(capslatest_x86_64);
fbe740
diff --git a/tests/qemublocktestdata/bitmapblockcommit/snapshots-1-2 b/tests/qemublocktestdata/bitmapblockcommit/snapshots-1-2
fbe740
new file mode 100644
fbe740
index 0000000000..0015b9ceb3
fbe740
--- /dev/null
fbe740
+++ b/tests/qemublocktestdata/bitmapblockcommit/snapshots-1-2
fbe740
@@ -0,0 +1,49 @@
fbe740
+pre job bitmap disable:
fbe740
+[
fbe740
+  {
fbe740
+    "type": "block-dirty-bitmap-disable",
fbe740
+    "data": {
fbe740
+      "node": "libvirt-2-format",
fbe740
+      "name": "d"
fbe740
+    }
fbe740
+  }
fbe740
+]
fbe740
+merge bitmpas:
fbe740
+[
fbe740
+  {
fbe740
+    "type": "block-dirty-bitmap-add",
fbe740
+    "data": {
fbe740
+      "node": "libvirt-2-format",
fbe740
+      "name": "current",
fbe740
+      "persistent": true,
fbe740
+      "disabled": false,
fbe740
+      "granularity": 65536
fbe740
+    }
fbe740
+  },
fbe740
+  {
fbe740
+    "type": "block-dirty-bitmap-merge",
fbe740
+    "data": {
fbe740
+      "node": "libvirt-2-format",
fbe740
+      "target": "current",
fbe740
+      "bitmaps": [
fbe740
+        {
fbe740
+          "node": "libvirt-1-format",
fbe740
+          "name": "current"
fbe740
+        }
fbe740
+      ]
fbe740
+    }
fbe740
+  },
fbe740
+  {
fbe740
+    "type": "block-dirty-bitmap-merge",
fbe740
+    "data": {
fbe740
+      "node": "libvirt-2-format",
fbe740
+      "target": "d",
fbe740
+      "bitmaps": [
fbe740
+        {
fbe740
+          "node": "libvirt-1-format",
fbe740
+          "name": "d"
fbe740
+        }
fbe740
+      ]
fbe740
+    }
fbe740
+  }
fbe740
+]
fbe740
diff --git a/tests/qemublocktestdata/bitmapblockcommit/snapshots-1-3 b/tests/qemublocktestdata/bitmapblockcommit/snapshots-1-3
fbe740
new file mode 100644
fbe740
index 0000000000..5691b408aa
fbe740
--- /dev/null
fbe740
+++ b/tests/qemublocktestdata/bitmapblockcommit/snapshots-1-3
fbe740
@@ -0,0 +1,76 @@
fbe740
+pre job bitmap disable:
fbe740
+[
fbe740
+  {
fbe740
+    "type": "block-dirty-bitmap-disable",
fbe740
+    "data": {
fbe740
+      "node": "libvirt-3-format",
fbe740
+      "name": "c"
fbe740
+    }
fbe740
+  }
fbe740
+]
fbe740
+merge bitmpas:
fbe740
+[
fbe740
+  {
fbe740
+    "type": "block-dirty-bitmap-add",
fbe740
+    "data": {
fbe740
+      "node": "libvirt-3-format",
fbe740
+      "name": "current",
fbe740
+      "persistent": true,
fbe740
+      "disabled": false,
fbe740
+      "granularity": 65536
fbe740
+    }
fbe740
+  },
fbe740
+  {
fbe740
+    "type": "block-dirty-bitmap-merge",
fbe740
+    "data": {
fbe740
+      "node": "libvirt-3-format",
fbe740
+      "target": "current",
fbe740
+      "bitmaps": [
fbe740
+        {
fbe740
+          "node": "libvirt-1-format",
fbe740
+          "name": "current"
fbe740
+        }
fbe740
+      ]
fbe740
+    }
fbe740
+  },
fbe740
+  {
fbe740
+    "type": "block-dirty-bitmap-merge",
fbe740
+    "data": {
fbe740
+      "node": "libvirt-3-format",
fbe740
+      "target": "c",
fbe740
+      "bitmaps": [
fbe740
+        {
fbe740
+          "node": "libvirt-2-format",
fbe740
+          "name": "c"
fbe740
+        }
fbe740
+      ]
fbe740
+    }
fbe740
+  },
fbe740
+  {
fbe740
+    "type": "block-dirty-bitmap-add",
fbe740
+    "data": {
fbe740
+      "node": "libvirt-3-format",
fbe740
+      "name": "d",
fbe740
+      "persistent": true,
fbe740
+      "disabled": true,
fbe740
+      "granularity": 65536
fbe740
+    }
fbe740
+  },
fbe740
+  {
fbe740
+    "type": "block-dirty-bitmap-merge",
fbe740
+    "data": {
fbe740
+      "node": "libvirt-3-format",
fbe740
+      "target": "d",
fbe740
+      "bitmaps": [
fbe740
+        {
fbe740
+          "node": "libvirt-1-format",
fbe740
+          "name": "d"
fbe740
+        },
fbe740
+        {
fbe740
+          "node": "libvirt-2-format",
fbe740
+          "name": "d"
fbe740
+        }
fbe740
+      ]
fbe740
+    }
fbe740
+  }
fbe740
+]
fbe740
diff --git a/tests/qemublocktestdata/bitmapblockcommit/snapshots-1-4 b/tests/qemublocktestdata/bitmapblockcommit/snapshots-1-4
fbe740
new file mode 100644
fbe740
index 0000000000..454001531a
fbe740
--- /dev/null
fbe740
+++ b/tests/qemublocktestdata/bitmapblockcommit/snapshots-1-4
fbe740
@@ -0,0 +1,126 @@
fbe740
+pre job bitmap disable:
fbe740
+[
fbe740
+  {
fbe740
+    "type": "block-dirty-bitmap-disable",
fbe740
+    "data": {
fbe740
+      "node": "libvirt-4-format",
fbe740
+      "name": "a"
fbe740
+    }
fbe740
+  }
fbe740
+]
fbe740
+merge bitmpas:
fbe740
+[
fbe740
+  {
fbe740
+    "type": "block-dirty-bitmap-merge",
fbe740
+    "data": {
fbe740
+      "node": "libvirt-4-format",
fbe740
+      "target": "a",
fbe740
+      "bitmaps": [
fbe740
+        {
fbe740
+          "node": "libvirt-3-format",
fbe740
+          "name": "a"
fbe740
+        }
fbe740
+      ]
fbe740
+    }
fbe740
+  },
fbe740
+  {
fbe740
+    "type": "block-dirty-bitmap-add",
fbe740
+    "data": {
fbe740
+      "node": "libvirt-4-format",
fbe740
+      "name": "b",
fbe740
+      "persistent": true,
fbe740
+      "disabled": true,
fbe740
+      "granularity": 65536
fbe740
+    }
fbe740
+  },
fbe740
+  {
fbe740
+    "type": "block-dirty-bitmap-merge",
fbe740
+    "data": {
fbe740
+      "node": "libvirt-4-format",
fbe740
+      "target": "b",
fbe740
+      "bitmaps": [
fbe740
+        {
fbe740
+          "node": "libvirt-3-format",
fbe740
+          "name": "b"
fbe740
+        }
fbe740
+      ]
fbe740
+    }
fbe740
+  },
fbe740
+  {
fbe740
+    "type": "block-dirty-bitmap-add",
fbe740
+    "data": {
fbe740
+      "node": "libvirt-4-format",
fbe740
+      "name": "current",
fbe740
+      "persistent": true,
fbe740
+      "disabled": false,
fbe740
+      "granularity": 65536
fbe740
+    }
fbe740
+  },
fbe740
+  {
fbe740
+    "type": "block-dirty-bitmap-merge",
fbe740
+    "data": {
fbe740
+      "node": "libvirt-4-format",
fbe740
+      "target": "current",
fbe740
+      "bitmaps": [
fbe740
+        {
fbe740
+          "node": "libvirt-1-format",
fbe740
+          "name": "current"
fbe740
+        }
fbe740
+      ]
fbe740
+    }
fbe740
+  },
fbe740
+  {
fbe740
+    "type": "block-dirty-bitmap-add",
fbe740
+    "data": {
fbe740
+      "node": "libvirt-4-format",
fbe740
+      "name": "c",
fbe740
+      "persistent": true,
fbe740
+      "disabled": true,
fbe740
+      "granularity": 65536
fbe740
+    }
fbe740
+  },
fbe740
+  {
fbe740
+    "type": "block-dirty-bitmap-merge",
fbe740
+    "data": {
fbe740
+      "node": "libvirt-4-format",
fbe740
+      "target": "c",
fbe740
+      "bitmaps": [
fbe740
+        {
fbe740
+          "node": "libvirt-2-format",
fbe740
+          "name": "c"
fbe740
+        },
fbe740
+        {
fbe740
+          "node": "libvirt-3-format",
fbe740
+          "name": "c"
fbe740
+        }
fbe740
+      ]
fbe740
+    }
fbe740
+  },
fbe740
+  {
fbe740
+    "type": "block-dirty-bitmap-add",
fbe740
+    "data": {
fbe740
+      "node": "libvirt-4-format",
fbe740
+      "name": "d",
fbe740
+      "persistent": true,
fbe740
+      "disabled": true,
fbe740
+      "granularity": 65536
fbe740
+    }
fbe740
+  },
fbe740
+  {
fbe740
+    "type": "block-dirty-bitmap-merge",
fbe740
+    "data": {
fbe740
+      "node": "libvirt-4-format",
fbe740
+      "target": "d",
fbe740
+      "bitmaps": [
fbe740
+        {
fbe740
+          "node": "libvirt-1-format",
fbe740
+          "name": "d"
fbe740
+        },
fbe740
+        {
fbe740
+          "node": "libvirt-2-format",
fbe740
+          "name": "d"
fbe740
+        }
fbe740
+      ]
fbe740
+    }
fbe740
+  }
fbe740
+]
fbe740
diff --git a/tests/qemublocktestdata/bitmapblockcommit/snapshots-1-5 b/tests/qemublocktestdata/bitmapblockcommit/snapshots-1-5
fbe740
new file mode 100644
fbe740
index 0000000000..2fd43d7917
fbe740
--- /dev/null
fbe740
+++ b/tests/qemublocktestdata/bitmapblockcommit/snapshots-1-5
fbe740
@@ -0,0 +1,130 @@
fbe740
+pre job bitmap disable:
fbe740
+[
fbe740
+  {
fbe740
+    "type": "block-dirty-bitmap-disable",
fbe740
+    "data": {
fbe740
+      "node": "libvirt-5-format",
fbe740
+      "name": "a"
fbe740
+    }
fbe740
+  }
fbe740
+]
fbe740
+merge bitmpas:
fbe740
+[
fbe740
+  {
fbe740
+    "type": "block-dirty-bitmap-merge",
fbe740
+    "data": {
fbe740
+      "node": "libvirt-5-format",
fbe740
+      "target": "a",
fbe740
+      "bitmaps": [
fbe740
+        {
fbe740
+          "node": "libvirt-3-format",
fbe740
+          "name": "a"
fbe740
+        },
fbe740
+        {
fbe740
+          "node": "libvirt-4-format",
fbe740
+          "name": "a"
fbe740
+        }
fbe740
+      ]
fbe740
+    }
fbe740
+  },
fbe740
+  {
fbe740
+    "type": "block-dirty-bitmap-add",
fbe740
+    "data": {
fbe740
+      "node": "libvirt-5-format",
fbe740
+      "name": "b",
fbe740
+      "persistent": true,
fbe740
+      "disabled": true,
fbe740
+      "granularity": 65536
fbe740
+    }
fbe740
+  },
fbe740
+  {
fbe740
+    "type": "block-dirty-bitmap-merge",
fbe740
+    "data": {
fbe740
+      "node": "libvirt-5-format",
fbe740
+      "target": "b",
fbe740
+      "bitmaps": [
fbe740
+        {
fbe740
+          "node": "libvirt-3-format",
fbe740
+          "name": "b"
fbe740
+        }
fbe740
+      ]
fbe740
+    }
fbe740
+  },
fbe740
+  {
fbe740
+    "type": "block-dirty-bitmap-add",
fbe740
+    "data": {
fbe740
+      "node": "libvirt-5-format",
fbe740
+      "name": "current",
fbe740
+      "persistent": true,
fbe740
+      "disabled": false,
fbe740
+      "granularity": 65536
fbe740
+    }
fbe740
+  },
fbe740
+  {
fbe740
+    "type": "block-dirty-bitmap-merge",
fbe740
+    "data": {
fbe740
+      "node": "libvirt-5-format",
fbe740
+      "target": "current",
fbe740
+      "bitmaps": [
fbe740
+        {
fbe740
+          "node": "libvirt-1-format",
fbe740
+          "name": "current"
fbe740
+        }
fbe740
+      ]
fbe740
+    }
fbe740
+  },
fbe740
+  {
fbe740
+    "type": "block-dirty-bitmap-add",
fbe740
+    "data": {
fbe740
+      "node": "libvirt-5-format",
fbe740
+      "name": "c",
fbe740
+      "persistent": true,
fbe740
+      "disabled": true,
fbe740
+      "granularity": 65536
fbe740
+    }
fbe740
+  },
fbe740
+  {
fbe740
+    "type": "block-dirty-bitmap-merge",
fbe740
+    "data": {
fbe740
+      "node": "libvirt-5-format",
fbe740
+      "target": "c",
fbe740
+      "bitmaps": [
fbe740
+        {
fbe740
+          "node": "libvirt-2-format",
fbe740
+          "name": "c"
fbe740
+        },
fbe740
+        {
fbe740
+          "node": "libvirt-3-format",
fbe740
+          "name": "c"
fbe740
+        }
fbe740
+      ]
fbe740
+    }
fbe740
+  },
fbe740
+  {
fbe740
+    "type": "block-dirty-bitmap-add",
fbe740
+    "data": {
fbe740
+      "node": "libvirt-5-format",
fbe740
+      "name": "d",
fbe740
+      "persistent": true,
fbe740
+      "disabled": true,
fbe740
+      "granularity": 65536
fbe740
+    }
fbe740
+  },
fbe740
+  {
fbe740
+    "type": "block-dirty-bitmap-merge",
fbe740
+    "data": {
fbe740
+      "node": "libvirt-5-format",
fbe740
+      "target": "d",
fbe740
+      "bitmaps": [
fbe740
+        {
fbe740
+          "node": "libvirt-1-format",
fbe740
+          "name": "d"
fbe740
+        },
fbe740
+        {
fbe740
+          "node": "libvirt-2-format",
fbe740
+          "name": "d"
fbe740
+        }
fbe740
+      ]
fbe740
+    }
fbe740
+  }
fbe740
+]
fbe740
diff --git a/tests/qemublocktestdata/bitmapblockcommit/snapshots-2-3 b/tests/qemublocktestdata/bitmapblockcommit/snapshots-2-3
fbe740
new file mode 100644
fbe740
index 0000000000..d719a90bd7
fbe740
--- /dev/null
fbe740
+++ b/tests/qemublocktestdata/bitmapblockcommit/snapshots-2-3
fbe740
@@ -0,0 +1,49 @@
fbe740
+pre job bitmap disable:
fbe740
+[
fbe740
+  {
fbe740
+    "type": "block-dirty-bitmap-disable",
fbe740
+    "data": {
fbe740
+      "node": "libvirt-3-format",
fbe740
+      "name": "c"
fbe740
+    }
fbe740
+  }
fbe740
+]
fbe740
+merge bitmpas:
fbe740
+[
fbe740
+  {
fbe740
+    "type": "block-dirty-bitmap-merge",
fbe740
+    "data": {
fbe740
+      "node": "libvirt-3-format",
fbe740
+      "target": "c",
fbe740
+      "bitmaps": [
fbe740
+        {
fbe740
+          "node": "libvirt-2-format",
fbe740
+          "name": "c"
fbe740
+        }
fbe740
+      ]
fbe740
+    }
fbe740
+  },
fbe740
+  {
fbe740
+    "type": "block-dirty-bitmap-add",
fbe740
+    "data": {
fbe740
+      "node": "libvirt-3-format",
fbe740
+      "name": "d",
fbe740
+      "persistent": true,
fbe740
+      "disabled": false,
fbe740
+      "granularity": 65536
fbe740
+    }
fbe740
+  },
fbe740
+  {
fbe740
+    "type": "block-dirty-bitmap-merge",
fbe740
+    "data": {
fbe740
+      "node": "libvirt-3-format",
fbe740
+      "target": "d",
fbe740
+      "bitmaps": [
fbe740
+        {
fbe740
+          "node": "libvirt-2-format",
fbe740
+          "name": "d"
fbe740
+        }
fbe740
+      ]
fbe740
+    }
fbe740
+  }
fbe740
+]
fbe740
diff --git a/tests/qemublocktestdata/bitmapblockcommit/snapshots-2-4 b/tests/qemublocktestdata/bitmapblockcommit/snapshots-2-4
fbe740
new file mode 100644
fbe740
index 0000000000..9e37962344
fbe740
--- /dev/null
fbe740
+++ b/tests/qemublocktestdata/bitmapblockcommit/snapshots-2-4
fbe740
@@ -0,0 +1,99 @@
fbe740
+pre job bitmap disable:
fbe740
+[
fbe740
+  {
fbe740
+    "type": "block-dirty-bitmap-disable",
fbe740
+    "data": {
fbe740
+      "node": "libvirt-4-format",
fbe740
+      "name": "a"
fbe740
+    }
fbe740
+  }
fbe740
+]
fbe740
+merge bitmpas:
fbe740
+[
fbe740
+  {
fbe740
+    "type": "block-dirty-bitmap-merge",
fbe740
+    "data": {
fbe740
+      "node": "libvirt-4-format",
fbe740
+      "target": "a",
fbe740
+      "bitmaps": [
fbe740
+        {
fbe740
+          "node": "libvirt-3-format",
fbe740
+          "name": "a"
fbe740
+        }
fbe740
+      ]
fbe740
+    }
fbe740
+  },
fbe740
+  {
fbe740
+    "type": "block-dirty-bitmap-add",
fbe740
+    "data": {
fbe740
+      "node": "libvirt-4-format",
fbe740
+      "name": "b",
fbe740
+      "persistent": true,
fbe740
+      "disabled": true,
fbe740
+      "granularity": 65536
fbe740
+    }
fbe740
+  },
fbe740
+  {
fbe740
+    "type": "block-dirty-bitmap-merge",
fbe740
+    "data": {
fbe740
+      "node": "libvirt-4-format",
fbe740
+      "target": "b",
fbe740
+      "bitmaps": [
fbe740
+        {
fbe740
+          "node": "libvirt-3-format",
fbe740
+          "name": "b"
fbe740
+        }
fbe740
+      ]
fbe740
+    }
fbe740
+  },
fbe740
+  {
fbe740
+    "type": "block-dirty-bitmap-add",
fbe740
+    "data": {
fbe740
+      "node": "libvirt-4-format",
fbe740
+      "name": "c",
fbe740
+      "persistent": true,
fbe740
+      "disabled": true,
fbe740
+      "granularity": 65536
fbe740
+    }
fbe740
+  },
fbe740
+  {
fbe740
+    "type": "block-dirty-bitmap-merge",
fbe740
+    "data": {
fbe740
+      "node": "libvirt-4-format",
fbe740
+      "target": "c",
fbe740
+      "bitmaps": [
fbe740
+        {
fbe740
+          "node": "libvirt-2-format",
fbe740
+          "name": "c"
fbe740
+        },
fbe740
+        {
fbe740
+          "node": "libvirt-3-format",
fbe740
+          "name": "c"
fbe740
+        }
fbe740
+      ]
fbe740
+    }
fbe740
+  },
fbe740
+  {
fbe740
+    "type": "block-dirty-bitmap-add",
fbe740
+    "data": {
fbe740
+      "node": "libvirt-4-format",
fbe740
+      "name": "d",
fbe740
+      "persistent": true,
fbe740
+      "disabled": false,
fbe740
+      "granularity": 65536
fbe740
+    }
fbe740
+  },
fbe740
+  {
fbe740
+    "type": "block-dirty-bitmap-merge",
fbe740
+    "data": {
fbe740
+      "node": "libvirt-4-format",
fbe740
+      "target": "d",
fbe740
+      "bitmaps": [
fbe740
+        {
fbe740
+          "node": "libvirt-2-format",
fbe740
+          "name": "d"
fbe740
+        }
fbe740
+      ]
fbe740
+    }
fbe740
+  }
fbe740
+]
fbe740
diff --git a/tests/qemublocktestdata/bitmapblockcommit/snapshots-2-5 b/tests/qemublocktestdata/bitmapblockcommit/snapshots-2-5
fbe740
new file mode 100644
fbe740
index 0000000000..d6b20a5d05
fbe740
--- /dev/null
fbe740
+++ b/tests/qemublocktestdata/bitmapblockcommit/snapshots-2-5
fbe740
@@ -0,0 +1,103 @@
fbe740
+pre job bitmap disable:
fbe740
+[
fbe740
+  {
fbe740
+    "type": "block-dirty-bitmap-disable",
fbe740
+    "data": {
fbe740
+      "node": "libvirt-5-format",
fbe740
+      "name": "a"
fbe740
+    }
fbe740
+  }
fbe740
+]
fbe740
+merge bitmpas:
fbe740
+[
fbe740
+  {
fbe740
+    "type": "block-dirty-bitmap-merge",
fbe740
+    "data": {
fbe740
+      "node": "libvirt-5-format",
fbe740
+      "target": "a",
fbe740
+      "bitmaps": [
fbe740
+        {
fbe740
+          "node": "libvirt-3-format",
fbe740
+          "name": "a"
fbe740
+        },
fbe740
+        {
fbe740
+          "node": "libvirt-4-format",
fbe740
+          "name": "a"
fbe740
+        }
fbe740
+      ]
fbe740
+    }
fbe740
+  },
fbe740
+  {
fbe740
+    "type": "block-dirty-bitmap-add",
fbe740
+    "data": {
fbe740
+      "node": "libvirt-5-format",
fbe740
+      "name": "b",
fbe740
+      "persistent": true,
fbe740
+      "disabled": true,
fbe740
+      "granularity": 65536
fbe740
+    }
fbe740
+  },
fbe740
+  {
fbe740
+    "type": "block-dirty-bitmap-merge",
fbe740
+    "data": {
fbe740
+      "node": "libvirt-5-format",
fbe740
+      "target": "b",
fbe740
+      "bitmaps": [
fbe740
+        {
fbe740
+          "node": "libvirt-3-format",
fbe740
+          "name": "b"
fbe740
+        }
fbe740
+      ]
fbe740
+    }
fbe740
+  },
fbe740
+  {
fbe740
+    "type": "block-dirty-bitmap-add",
fbe740
+    "data": {
fbe740
+      "node": "libvirt-5-format",
fbe740
+      "name": "c",
fbe740
+      "persistent": true,
fbe740
+      "disabled": true,
fbe740
+      "granularity": 65536
fbe740
+    }
fbe740
+  },
fbe740
+  {
fbe740
+    "type": "block-dirty-bitmap-merge",
fbe740
+    "data": {
fbe740
+      "node": "libvirt-5-format",
fbe740
+      "target": "c",
fbe740
+      "bitmaps": [
fbe740
+        {
fbe740
+          "node": "libvirt-2-format",
fbe740
+          "name": "c"
fbe740
+        },
fbe740
+        {
fbe740
+          "node": "libvirt-3-format",
fbe740
+          "name": "c"
fbe740
+        }
fbe740
+      ]
fbe740
+    }
fbe740
+  },
fbe740
+  {
fbe740
+    "type": "block-dirty-bitmap-add",
fbe740
+    "data": {
fbe740
+      "node": "libvirt-5-format",
fbe740
+      "name": "d",
fbe740
+      "persistent": true,
fbe740
+      "disabled": false,
fbe740
+      "granularity": 65536
fbe740
+    }
fbe740
+  },
fbe740
+  {
fbe740
+    "type": "block-dirty-bitmap-merge",
fbe740
+    "data": {
fbe740
+      "node": "libvirt-5-format",
fbe740
+      "target": "d",
fbe740
+      "bitmaps": [
fbe740
+        {
fbe740
+          "node": "libvirt-2-format",
fbe740
+          "name": "d"
fbe740
+        }
fbe740
+      ]
fbe740
+    }
fbe740
+  }
fbe740
+]
fbe740
diff --git a/tests/qemublocktestdata/bitmapblockcommit/snapshots-3-4 b/tests/qemublocktestdata/bitmapblockcommit/snapshots-3-4
fbe740
new file mode 100644
fbe740
index 0000000000..b96e8910d7
fbe740
--- /dev/null
fbe740
+++ b/tests/qemublocktestdata/bitmapblockcommit/snapshots-3-4
fbe740
@@ -0,0 +1,72 @@
fbe740
+pre job bitmap disable:
fbe740
+[
fbe740
+  {
fbe740
+    "type": "block-dirty-bitmap-disable",
fbe740
+    "data": {
fbe740
+      "node": "libvirt-4-format",
fbe740
+      "name": "a"
fbe740
+    }
fbe740
+  }
fbe740
+]
fbe740
+merge bitmpas:
fbe740
+[
fbe740
+  {
fbe740
+    "type": "block-dirty-bitmap-merge",
fbe740
+    "data": {
fbe740
+      "node": "libvirt-4-format",
fbe740
+      "target": "a",
fbe740
+      "bitmaps": [
fbe740
+        {
fbe740
+          "node": "libvirt-3-format",
fbe740
+          "name": "a"
fbe740
+        }
fbe740
+      ]
fbe740
+    }
fbe740
+  },
fbe740
+  {
fbe740
+    "type": "block-dirty-bitmap-add",
fbe740
+    "data": {
fbe740
+      "node": "libvirt-4-format",
fbe740
+      "name": "b",
fbe740
+      "persistent": true,
fbe740
+      "disabled": true,
fbe740
+      "granularity": 65536
fbe740
+    }
fbe740
+  },
fbe740
+  {
fbe740
+    "type": "block-dirty-bitmap-merge",
fbe740
+    "data": {
fbe740
+      "node": "libvirt-4-format",
fbe740
+      "target": "b",
fbe740
+      "bitmaps": [
fbe740
+        {
fbe740
+          "node": "libvirt-3-format",
fbe740
+          "name": "b"
fbe740
+        }
fbe740
+      ]
fbe740
+    }
fbe740
+  },
fbe740
+  {
fbe740
+    "type": "block-dirty-bitmap-add",
fbe740
+    "data": {
fbe740
+      "node": "libvirt-4-format",
fbe740
+      "name": "c",
fbe740
+      "persistent": true,
fbe740
+      "disabled": false,
fbe740
+      "granularity": 65536
fbe740
+    }
fbe740
+  },
fbe740
+  {
fbe740
+    "type": "block-dirty-bitmap-merge",
fbe740
+    "data": {
fbe740
+      "node": "libvirt-4-format",
fbe740
+      "target": "c",
fbe740
+      "bitmaps": [
fbe740
+        {
fbe740
+          "node": "libvirt-3-format",
fbe740
+          "name": "c"
fbe740
+        }
fbe740
+      ]
fbe740
+    }
fbe740
+  }
fbe740
+]
fbe740
diff --git a/tests/qemublocktestdata/bitmapblockcommit/snapshots-3-5 b/tests/qemublocktestdata/bitmapblockcommit/snapshots-3-5
fbe740
new file mode 100644
fbe740
index 0000000000..9570c34c40
fbe740
--- /dev/null
fbe740
+++ b/tests/qemublocktestdata/bitmapblockcommit/snapshots-3-5
fbe740
@@ -0,0 +1,76 @@
fbe740
+pre job bitmap disable:
fbe740
+[
fbe740
+  {
fbe740
+    "type": "block-dirty-bitmap-disable",
fbe740
+    "data": {
fbe740
+      "node": "libvirt-5-format",
fbe740
+      "name": "a"
fbe740
+    }
fbe740
+  }
fbe740
+]
fbe740
+merge bitmpas:
fbe740
+[
fbe740
+  {
fbe740
+    "type": "block-dirty-bitmap-merge",
fbe740
+    "data": {
fbe740
+      "node": "libvirt-5-format",
fbe740
+      "target": "a",
fbe740
+      "bitmaps": [
fbe740
+        {
fbe740
+          "node": "libvirt-3-format",
fbe740
+          "name": "a"
fbe740
+        },
fbe740
+        {
fbe740
+          "node": "libvirt-4-format",
fbe740
+          "name": "a"
fbe740
+        }
fbe740
+      ]
fbe740
+    }
fbe740
+  },
fbe740
+  {
fbe740
+    "type": "block-dirty-bitmap-add",
fbe740
+    "data": {
fbe740
+      "node": "libvirt-5-format",
fbe740
+      "name": "b",
fbe740
+      "persistent": true,
fbe740
+      "disabled": true,
fbe740
+      "granularity": 65536
fbe740
+    }
fbe740
+  },
fbe740
+  {
fbe740
+    "type": "block-dirty-bitmap-merge",
fbe740
+    "data": {
fbe740
+      "node": "libvirt-5-format",
fbe740
+      "target": "b",
fbe740
+      "bitmaps": [
fbe740
+        {
fbe740
+          "node": "libvirt-3-format",
fbe740
+          "name": "b"
fbe740
+        }
fbe740
+      ]
fbe740
+    }
fbe740
+  },
fbe740
+  {
fbe740
+    "type": "block-dirty-bitmap-add",
fbe740
+    "data": {
fbe740
+      "node": "libvirt-5-format",
fbe740
+      "name": "c",
fbe740
+      "persistent": true,
fbe740
+      "disabled": false,
fbe740
+      "granularity": 65536
fbe740
+    }
fbe740
+  },
fbe740
+  {
fbe740
+    "type": "block-dirty-bitmap-merge",
fbe740
+    "data": {
fbe740
+      "node": "libvirt-5-format",
fbe740
+      "target": "c",
fbe740
+      "bitmaps": [
fbe740
+        {
fbe740
+          "node": "libvirt-3-format",
fbe740
+          "name": "c"
fbe740
+        }
fbe740
+      ]
fbe740
+    }
fbe740
+  }
fbe740
+]
fbe740
diff --git a/tests/qemublocktestdata/bitmapblockcommit/snapshots-4-5 b/tests/qemublocktestdata/bitmapblockcommit/snapshots-4-5
fbe740
new file mode 100644
fbe740
index 0000000000..7e1020d96e
fbe740
--- /dev/null
fbe740
+++ b/tests/qemublocktestdata/bitmapblockcommit/snapshots-4-5
fbe740
@@ -0,0 +1,33 @@
fbe740
+pre job bitmap disable:
fbe740
+[
fbe740
+  {
fbe740
+    "type": "block-dirty-bitmap-disable",
fbe740
+    "data": {
fbe740
+      "node": "libvirt-5-format",
fbe740
+      "name": "a"
fbe740
+    }
fbe740
+  }
fbe740
+]
fbe740
+merge bitmpas:
fbe740
+[
fbe740
+  {
fbe740
+    "type": "block-dirty-bitmap-enable",
fbe740
+    "data": {
fbe740
+      "node": "libvirt-5-format",
fbe740
+      "name": "a"
fbe740
+    }
fbe740
+  },
fbe740
+  {
fbe740
+    "type": "block-dirty-bitmap-merge",
fbe740
+    "data": {
fbe740
+      "node": "libvirt-5-format",
fbe740
+      "target": "a",
fbe740
+      "bitmaps": [
fbe740
+        {
fbe740
+          "node": "libvirt-4-format",
fbe740
+          "name": "a"
fbe740
+        }
fbe740
+      ]
fbe740
+    }
fbe740
+  }
fbe740
+]
fbe740
-- 
fbe740
2.25.1
fbe740