1106 lines
25 KiB
Diff
1106 lines
25 KiB
Diff
From 59a754b5c95a4795178d2a117abb7f7145c830a4 Mon Sep 17 00:00:00 2001
|
|
Message-Id: <59a754b5c95a4795178d2a117abb7f7145c830a4@dist-git>
|
|
From: Peter Krempa <pkrempa@redhat.com>
|
|
Date: Tue, 23 Jun 2020 12:24:02 +0200
|
|
Subject: [PATCH] qemublocktest: Add 'snapshots' tests for block commit bitmap
|
|
handling
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
Simulate commit between all the combinations of layers in the
|
|
'snapshots' case to see whether the code merges the correct bitmaps with
|
|
the correct depth of temporary bitmaps.
|
|
|
|
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
|
|
Reviewed-by: Eric Blake <eblake@redhat.com>
|
|
(cherry picked from commit b5eaabfbf892c8d4a30b2822325959a6ecb93cb6)
|
|
https://bugzilla.redhat.com/show_bug.cgi?id=1804593
|
|
Message-Id: <e2a3ce231bab06d274039daf7cdebd086b2a5691.1592906423.git.pkrempa@redhat.com>
|
|
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
|
---
|
|
tests/qemublocktest.c | 14 ++
|
|
.../bitmapblockcommit/snapshots-1-2 | 105 +++++++++++
|
|
.../bitmapblockcommit/snapshots-1-3 | 131 ++++++++++++++
|
|
.../bitmapblockcommit/snapshots-1-4 | 163 +++++++++++++++++
|
|
.../bitmapblockcommit/snapshots-1-5 | 167 ++++++++++++++++++
|
|
.../bitmapblockcommit/snapshots-2-3 | 65 +++++++
|
|
.../bitmapblockcommit/snapshots-2-4 | 97 ++++++++++
|
|
.../bitmapblockcommit/snapshots-2-5 | 101 +++++++++++
|
|
.../bitmapblockcommit/snapshots-3-4 | 62 +++++++
|
|
.../bitmapblockcommit/snapshots-3-5 | 66 +++++++
|
|
.../bitmapblockcommit/snapshots-4-5 | 16 ++
|
|
11 files changed, 987 insertions(+)
|
|
create mode 100644 tests/qemublocktestdata/bitmapblockcommit/snapshots-1-2
|
|
create mode 100644 tests/qemublocktestdata/bitmapblockcommit/snapshots-1-3
|
|
create mode 100644 tests/qemublocktestdata/bitmapblockcommit/snapshots-1-4
|
|
create mode 100644 tests/qemublocktestdata/bitmapblockcommit/snapshots-1-5
|
|
create mode 100644 tests/qemublocktestdata/bitmapblockcommit/snapshots-2-3
|
|
create mode 100644 tests/qemublocktestdata/bitmapblockcommit/snapshots-2-4
|
|
create mode 100644 tests/qemublocktestdata/bitmapblockcommit/snapshots-2-5
|
|
create mode 100644 tests/qemublocktestdata/bitmapblockcommit/snapshots-3-4
|
|
create mode 100644 tests/qemublocktestdata/bitmapblockcommit/snapshots-3-5
|
|
create mode 100644 tests/qemublocktestdata/bitmapblockcommit/snapshots-4-5
|
|
|
|
diff --git a/tests/qemublocktest.c b/tests/qemublocktest.c
|
|
index 43abc49534..e1468f13fa 100644
|
|
--- a/tests/qemublocktest.c
|
|
+++ b/tests/qemublocktest.c
|
|
@@ -1361,6 +1361,20 @@ mymain(void)
|
|
TEST_BITMAP_BLOCKCOMMIT("basic-1-3", 1, 3, "basic");
|
|
TEST_BITMAP_BLOCKCOMMIT("basic-2-3", 2, 3, "basic");
|
|
|
|
+ TEST_BITMAP_BLOCKCOMMIT("snapshots-1-2", 1, 2, "snapshots");
|
|
+ TEST_BITMAP_BLOCKCOMMIT("snapshots-1-3", 1, 3, "snapshots");
|
|
+ TEST_BITMAP_BLOCKCOMMIT("snapshots-1-4", 1, 4, "snapshots");
|
|
+ TEST_BITMAP_BLOCKCOMMIT("snapshots-1-5", 1, 5, "snapshots");
|
|
+
|
|
+ TEST_BITMAP_BLOCKCOMMIT("snapshots-2-3", 2, 3, "snapshots");
|
|
+ TEST_BITMAP_BLOCKCOMMIT("snapshots-2-4", 2, 4, "snapshots");
|
|
+ TEST_BITMAP_BLOCKCOMMIT("snapshots-2-5", 2, 5, "snapshots");
|
|
+
|
|
+ TEST_BITMAP_BLOCKCOMMIT("snapshots-3-4", 3, 4, "snapshots");
|
|
+ TEST_BITMAP_BLOCKCOMMIT("snapshots-3-5", 3, 5, "snapshots");
|
|
+
|
|
+ TEST_BITMAP_BLOCKCOMMIT("snapshots-4-5", 4, 5, "snapshots");
|
|
+
|
|
cleanup:
|
|
qemuTestDriverFree(&driver);
|
|
VIR_FREE(capslatest_x86_64);
|
|
diff --git a/tests/qemublocktestdata/bitmapblockcommit/snapshots-1-2 b/tests/qemublocktestdata/bitmapblockcommit/snapshots-1-2
|
|
new file mode 100644
|
|
index 0000000000..7d5b0a4402
|
|
--- /dev/null
|
|
+++ b/tests/qemublocktestdata/bitmapblockcommit/snapshots-1-2
|
|
@@ -0,0 +1,105 @@
|
|
+merge bitmpas:
|
|
+[
|
|
+ {
|
|
+ "type": "block-dirty-bitmap-add",
|
|
+ "data": {
|
|
+ "node": "libvirt-2-format",
|
|
+ "name": "current",
|
|
+ "persistent": true,
|
|
+ "disabled": false,
|
|
+ "granularity": 65536
|
|
+ }
|
|
+ },
|
|
+ {
|
|
+ "type": "block-dirty-bitmap-merge",
|
|
+ "data": {
|
|
+ "node": "libvirt-2-format",
|
|
+ "target": "current",
|
|
+ "bitmaps": [
|
|
+ {
|
|
+ "node": "libvirt-1-format",
|
|
+ "name": "current"
|
|
+ },
|
|
+ {
|
|
+ "node": "libvirt-2-format",
|
|
+ "name": "libvirt-tmp-activewrite"
|
|
+ }
|
|
+ ]
|
|
+ }
|
|
+ },
|
|
+ {
|
|
+ "type": "block-dirty-bitmap-merge",
|
|
+ "data": {
|
|
+ "node": "libvirt-2-format",
|
|
+ "target": "c",
|
|
+ "bitmaps": [
|
|
+ {
|
|
+ "node": "libvirt-1-format",
|
|
+ "name": "c"
|
|
+ },
|
|
+ {
|
|
+ "node": "libvirt-2-format",
|
|
+ "name": "libvirt-tmp-activewrite"
|
|
+ }
|
|
+ ]
|
|
+ }
|
|
+ },
|
|
+ {
|
|
+ "type": "block-dirty-bitmap-merge",
|
|
+ "data": {
|
|
+ "node": "libvirt-2-format",
|
|
+ "target": "b",
|
|
+ "bitmaps": [
|
|
+ {
|
|
+ "node": "libvirt-1-format",
|
|
+ "name": "b"
|
|
+ },
|
|
+ {
|
|
+ "node": "libvirt-2-format",
|
|
+ "name": "libvirt-tmp-activewrite"
|
|
+ }
|
|
+ ]
|
|
+ }
|
|
+ },
|
|
+ {
|
|
+ "type": "block-dirty-bitmap-merge",
|
|
+ "data": {
|
|
+ "node": "libvirt-2-format",
|
|
+ "target": "a",
|
|
+ "bitmaps": [
|
|
+ {
|
|
+ "node": "libvirt-1-format",
|
|
+ "name": "a"
|
|
+ },
|
|
+ {
|
|
+ "node": "libvirt-2-format",
|
|
+ "name": "libvirt-tmp-activewrite"
|
|
+ }
|
|
+ ]
|
|
+ }
|
|
+ },
|
|
+ {
|
|
+ "type": "block-dirty-bitmap-merge",
|
|
+ "data": {
|
|
+ "node": "libvirt-2-format",
|
|
+ "target": "d",
|
|
+ "bitmaps": [
|
|
+ {
|
|
+ "node": "libvirt-1-format",
|
|
+ "name": "d"
|
|
+ },
|
|
+ {
|
|
+ "node": "libvirt-2-format",
|
|
+ "name": "libvirt-tmp-activewrite"
|
|
+ }
|
|
+ ]
|
|
+ }
|
|
+ },
|
|
+ {
|
|
+ "type": "block-dirty-bitmap-remove",
|
|
+ "data": {
|
|
+ "node": "libvirt-2-format",
|
|
+ "name": "libvirt-tmp-activewrite"
|
|
+ }
|
|
+ }
|
|
+]
|
|
diff --git a/tests/qemublocktestdata/bitmapblockcommit/snapshots-1-3 b/tests/qemublocktestdata/bitmapblockcommit/snapshots-1-3
|
|
new file mode 100644
|
|
index 0000000000..17a020ba20
|
|
--- /dev/null
|
|
+++ b/tests/qemublocktestdata/bitmapblockcommit/snapshots-1-3
|
|
@@ -0,0 +1,131 @@
|
|
+merge bitmpas:
|
|
+[
|
|
+ {
|
|
+ "type": "block-dirty-bitmap-add",
|
|
+ "data": {
|
|
+ "node": "libvirt-3-format",
|
|
+ "name": "current",
|
|
+ "persistent": true,
|
|
+ "disabled": false,
|
|
+ "granularity": 65536
|
|
+ }
|
|
+ },
|
|
+ {
|
|
+ "type": "block-dirty-bitmap-merge",
|
|
+ "data": {
|
|
+ "node": "libvirt-3-format",
|
|
+ "target": "current",
|
|
+ "bitmaps": [
|
|
+ {
|
|
+ "node": "libvirt-1-format",
|
|
+ "name": "current"
|
|
+ },
|
|
+ {
|
|
+ "node": "libvirt-3-format",
|
|
+ "name": "libvirt-tmp-activewrite"
|
|
+ }
|
|
+ ]
|
|
+ }
|
|
+ },
|
|
+ {
|
|
+ "type": "block-dirty-bitmap-merge",
|
|
+ "data": {
|
|
+ "node": "libvirt-3-format",
|
|
+ "target": "c",
|
|
+ "bitmaps": [
|
|
+ {
|
|
+ "node": "libvirt-1-format",
|
|
+ "name": "c"
|
|
+ },
|
|
+ {
|
|
+ "node": "libvirt-2-format",
|
|
+ "name": "c"
|
|
+ },
|
|
+ {
|
|
+ "node": "libvirt-3-format",
|
|
+ "name": "libvirt-tmp-activewrite"
|
|
+ }
|
|
+ ]
|
|
+ }
|
|
+ },
|
|
+ {
|
|
+ "type": "block-dirty-bitmap-merge",
|
|
+ "data": {
|
|
+ "node": "libvirt-3-format",
|
|
+ "target": "b",
|
|
+ "bitmaps": [
|
|
+ {
|
|
+ "node": "libvirt-1-format",
|
|
+ "name": "b"
|
|
+ },
|
|
+ {
|
|
+ "node": "libvirt-2-format",
|
|
+ "name": "b"
|
|
+ },
|
|
+ {
|
|
+ "node": "libvirt-3-format",
|
|
+ "name": "libvirt-tmp-activewrite"
|
|
+ }
|
|
+ ]
|
|
+ }
|
|
+ },
|
|
+ {
|
|
+ "type": "block-dirty-bitmap-merge",
|
|
+ "data": {
|
|
+ "node": "libvirt-3-format",
|
|
+ "target": "a",
|
|
+ "bitmaps": [
|
|
+ {
|
|
+ "node": "libvirt-1-format",
|
|
+ "name": "a"
|
|
+ },
|
|
+ {
|
|
+ "node": "libvirt-2-format",
|
|
+ "name": "a"
|
|
+ },
|
|
+ {
|
|
+ "node": "libvirt-3-format",
|
|
+ "name": "libvirt-tmp-activewrite"
|
|
+ }
|
|
+ ]
|
|
+ }
|
|
+ },
|
|
+ {
|
|
+ "type": "block-dirty-bitmap-add",
|
|
+ "data": {
|
|
+ "node": "libvirt-3-format",
|
|
+ "name": "d",
|
|
+ "persistent": true,
|
|
+ "disabled": false,
|
|
+ "granularity": 65536
|
|
+ }
|
|
+ },
|
|
+ {
|
|
+ "type": "block-dirty-bitmap-merge",
|
|
+ "data": {
|
|
+ "node": "libvirt-3-format",
|
|
+ "target": "d",
|
|
+ "bitmaps": [
|
|
+ {
|
|
+ "node": "libvirt-1-format",
|
|
+ "name": "d"
|
|
+ },
|
|
+ {
|
|
+ "node": "libvirt-2-format",
|
|
+ "name": "d"
|
|
+ },
|
|
+ {
|
|
+ "node": "libvirt-3-format",
|
|
+ "name": "libvirt-tmp-activewrite"
|
|
+ }
|
|
+ ]
|
|
+ }
|
|
+ },
|
|
+ {
|
|
+ "type": "block-dirty-bitmap-remove",
|
|
+ "data": {
|
|
+ "node": "libvirt-3-format",
|
|
+ "name": "libvirt-tmp-activewrite"
|
|
+ }
|
|
+ }
|
|
+]
|
|
diff --git a/tests/qemublocktestdata/bitmapblockcommit/snapshots-1-4 b/tests/qemublocktestdata/bitmapblockcommit/snapshots-1-4
|
|
new file mode 100644
|
|
index 0000000000..972d30b2e1
|
|
--- /dev/null
|
|
+++ b/tests/qemublocktestdata/bitmapblockcommit/snapshots-1-4
|
|
@@ -0,0 +1,163 @@
|
|
+merge bitmpas:
|
|
+[
|
|
+ {
|
|
+ "type": "block-dirty-bitmap-add",
|
|
+ "data": {
|
|
+ "node": "libvirt-4-format",
|
|
+ "name": "current",
|
|
+ "persistent": true,
|
|
+ "disabled": false,
|
|
+ "granularity": 65536
|
|
+ }
|
|
+ },
|
|
+ {
|
|
+ "type": "block-dirty-bitmap-merge",
|
|
+ "data": {
|
|
+ "node": "libvirt-4-format",
|
|
+ "target": "current",
|
|
+ "bitmaps": [
|
|
+ {
|
|
+ "node": "libvirt-1-format",
|
|
+ "name": "current"
|
|
+ },
|
|
+ {
|
|
+ "node": "libvirt-4-format",
|
|
+ "name": "libvirt-tmp-activewrite"
|
|
+ }
|
|
+ ]
|
|
+ }
|
|
+ },
|
|
+ {
|
|
+ "type": "block-dirty-bitmap-add",
|
|
+ "data": {
|
|
+ "node": "libvirt-4-format",
|
|
+ "name": "c",
|
|
+ "persistent": true,
|
|
+ "disabled": false,
|
|
+ "granularity": 65536
|
|
+ }
|
|
+ },
|
|
+ {
|
|
+ "type": "block-dirty-bitmap-merge",
|
|
+ "data": {
|
|
+ "node": "libvirt-4-format",
|
|
+ "target": "c",
|
|
+ "bitmaps": [
|
|
+ {
|
|
+ "node": "libvirt-1-format",
|
|
+ "name": "c"
|
|
+ },
|
|
+ {
|
|
+ "node": "libvirt-2-format",
|
|
+ "name": "c"
|
|
+ },
|
|
+ {
|
|
+ "node": "libvirt-3-format",
|
|
+ "name": "c"
|
|
+ },
|
|
+ {
|
|
+ "node": "libvirt-4-format",
|
|
+ "name": "libvirt-tmp-activewrite"
|
|
+ }
|
|
+ ]
|
|
+ }
|
|
+ },
|
|
+ {
|
|
+ "type": "block-dirty-bitmap-add",
|
|
+ "data": {
|
|
+ "node": "libvirt-4-format",
|
|
+ "name": "b",
|
|
+ "persistent": true,
|
|
+ "disabled": false,
|
|
+ "granularity": 65536
|
|
+ }
|
|
+ },
|
|
+ {
|
|
+ "type": "block-dirty-bitmap-merge",
|
|
+ "data": {
|
|
+ "node": "libvirt-4-format",
|
|
+ "target": "b",
|
|
+ "bitmaps": [
|
|
+ {
|
|
+ "node": "libvirt-1-format",
|
|
+ "name": "b"
|
|
+ },
|
|
+ {
|
|
+ "node": "libvirt-2-format",
|
|
+ "name": "b"
|
|
+ },
|
|
+ {
|
|
+ "node": "libvirt-3-format",
|
|
+ "name": "b"
|
|
+ },
|
|
+ {
|
|
+ "node": "libvirt-4-format",
|
|
+ "name": "libvirt-tmp-activewrite"
|
|
+ }
|
|
+ ]
|
|
+ }
|
|
+ },
|
|
+ {
|
|
+ "type": "block-dirty-bitmap-merge",
|
|
+ "data": {
|
|
+ "node": "libvirt-4-format",
|
|
+ "target": "a",
|
|
+ "bitmaps": [
|
|
+ {
|
|
+ "node": "libvirt-1-format",
|
|
+ "name": "a"
|
|
+ },
|
|
+ {
|
|
+ "node": "libvirt-2-format",
|
|
+ "name": "a"
|
|
+ },
|
|
+ {
|
|
+ "node": "libvirt-3-format",
|
|
+ "name": "a"
|
|
+ },
|
|
+ {
|
|
+ "node": "libvirt-4-format",
|
|
+ "name": "libvirt-tmp-activewrite"
|
|
+ }
|
|
+ ]
|
|
+ }
|
|
+ },
|
|
+ {
|
|
+ "type": "block-dirty-bitmap-add",
|
|
+ "data": {
|
|
+ "node": "libvirt-4-format",
|
|
+ "name": "d",
|
|
+ "persistent": true,
|
|
+ "disabled": false,
|
|
+ "granularity": 65536
|
|
+ }
|
|
+ },
|
|
+ {
|
|
+ "type": "block-dirty-bitmap-merge",
|
|
+ "data": {
|
|
+ "node": "libvirt-4-format",
|
|
+ "target": "d",
|
|
+ "bitmaps": [
|
|
+ {
|
|
+ "node": "libvirt-1-format",
|
|
+ "name": "d"
|
|
+ },
|
|
+ {
|
|
+ "node": "libvirt-2-format",
|
|
+ "name": "d"
|
|
+ },
|
|
+ {
|
|
+ "node": "libvirt-4-format",
|
|
+ "name": "libvirt-tmp-activewrite"
|
|
+ }
|
|
+ ]
|
|
+ }
|
|
+ },
|
|
+ {
|
|
+ "type": "block-dirty-bitmap-remove",
|
|
+ "data": {
|
|
+ "node": "libvirt-4-format",
|
|
+ "name": "libvirt-tmp-activewrite"
|
|
+ }
|
|
+ }
|
|
+]
|
|
diff --git a/tests/qemublocktestdata/bitmapblockcommit/snapshots-1-5 b/tests/qemublocktestdata/bitmapblockcommit/snapshots-1-5
|
|
new file mode 100644
|
|
index 0000000000..3cda5b4132
|
|
--- /dev/null
|
|
+++ b/tests/qemublocktestdata/bitmapblockcommit/snapshots-1-5
|
|
@@ -0,0 +1,167 @@
|
|
+merge bitmpas:
|
|
+[
|
|
+ {
|
|
+ "type": "block-dirty-bitmap-add",
|
|
+ "data": {
|
|
+ "node": "libvirt-5-format",
|
|
+ "name": "current",
|
|
+ "persistent": true,
|
|
+ "disabled": false,
|
|
+ "granularity": 65536
|
|
+ }
|
|
+ },
|
|
+ {
|
|
+ "type": "block-dirty-bitmap-merge",
|
|
+ "data": {
|
|
+ "node": "libvirt-5-format",
|
|
+ "target": "current",
|
|
+ "bitmaps": [
|
|
+ {
|
|
+ "node": "libvirt-1-format",
|
|
+ "name": "current"
|
|
+ },
|
|
+ {
|
|
+ "node": "libvirt-5-format",
|
|
+ "name": "libvirt-tmp-activewrite"
|
|
+ }
|
|
+ ]
|
|
+ }
|
|
+ },
|
|
+ {
|
|
+ "type": "block-dirty-bitmap-add",
|
|
+ "data": {
|
|
+ "node": "libvirt-5-format",
|
|
+ "name": "c",
|
|
+ "persistent": true,
|
|
+ "disabled": false,
|
|
+ "granularity": 65536
|
|
+ }
|
|
+ },
|
|
+ {
|
|
+ "type": "block-dirty-bitmap-merge",
|
|
+ "data": {
|
|
+ "node": "libvirt-5-format",
|
|
+ "target": "c",
|
|
+ "bitmaps": [
|
|
+ {
|
|
+ "node": "libvirt-1-format",
|
|
+ "name": "c"
|
|
+ },
|
|
+ {
|
|
+ "node": "libvirt-2-format",
|
|
+ "name": "c"
|
|
+ },
|
|
+ {
|
|
+ "node": "libvirt-3-format",
|
|
+ "name": "c"
|
|
+ },
|
|
+ {
|
|
+ "node": "libvirt-5-format",
|
|
+ "name": "libvirt-tmp-activewrite"
|
|
+ }
|
|
+ ]
|
|
+ }
|
|
+ },
|
|
+ {
|
|
+ "type": "block-dirty-bitmap-add",
|
|
+ "data": {
|
|
+ "node": "libvirt-5-format",
|
|
+ "name": "b",
|
|
+ "persistent": true,
|
|
+ "disabled": false,
|
|
+ "granularity": 65536
|
|
+ }
|
|
+ },
|
|
+ {
|
|
+ "type": "block-dirty-bitmap-merge",
|
|
+ "data": {
|
|
+ "node": "libvirt-5-format",
|
|
+ "target": "b",
|
|
+ "bitmaps": [
|
|
+ {
|
|
+ "node": "libvirt-1-format",
|
|
+ "name": "b"
|
|
+ },
|
|
+ {
|
|
+ "node": "libvirt-2-format",
|
|
+ "name": "b"
|
|
+ },
|
|
+ {
|
|
+ "node": "libvirt-3-format",
|
|
+ "name": "b"
|
|
+ },
|
|
+ {
|
|
+ "node": "libvirt-5-format",
|
|
+ "name": "libvirt-tmp-activewrite"
|
|
+ }
|
|
+ ]
|
|
+ }
|
|
+ },
|
|
+ {
|
|
+ "type": "block-dirty-bitmap-merge",
|
|
+ "data": {
|
|
+ "node": "libvirt-5-format",
|
|
+ "target": "a",
|
|
+ "bitmaps": [
|
|
+ {
|
|
+ "node": "libvirt-1-format",
|
|
+ "name": "a"
|
|
+ },
|
|
+ {
|
|
+ "node": "libvirt-2-format",
|
|
+ "name": "a"
|
|
+ },
|
|
+ {
|
|
+ "node": "libvirt-3-format",
|
|
+ "name": "a"
|
|
+ },
|
|
+ {
|
|
+ "node": "libvirt-4-format",
|
|
+ "name": "a"
|
|
+ },
|
|
+ {
|
|
+ "node": "libvirt-5-format",
|
|
+ "name": "libvirt-tmp-activewrite"
|
|
+ }
|
|
+ ]
|
|
+ }
|
|
+ },
|
|
+ {
|
|
+ "type": "block-dirty-bitmap-add",
|
|
+ "data": {
|
|
+ "node": "libvirt-5-format",
|
|
+ "name": "d",
|
|
+ "persistent": true,
|
|
+ "disabled": false,
|
|
+ "granularity": 65536
|
|
+ }
|
|
+ },
|
|
+ {
|
|
+ "type": "block-dirty-bitmap-merge",
|
|
+ "data": {
|
|
+ "node": "libvirt-5-format",
|
|
+ "target": "d",
|
|
+ "bitmaps": [
|
|
+ {
|
|
+ "node": "libvirt-1-format",
|
|
+ "name": "d"
|
|
+ },
|
|
+ {
|
|
+ "node": "libvirt-2-format",
|
|
+ "name": "d"
|
|
+ },
|
|
+ {
|
|
+ "node": "libvirt-5-format",
|
|
+ "name": "libvirt-tmp-activewrite"
|
|
+ }
|
|
+ ]
|
|
+ }
|
|
+ },
|
|
+ {
|
|
+ "type": "block-dirty-bitmap-remove",
|
|
+ "data": {
|
|
+ "node": "libvirt-5-format",
|
|
+ "name": "libvirt-tmp-activewrite"
|
|
+ }
|
|
+ }
|
|
+]
|
|
diff --git a/tests/qemublocktestdata/bitmapblockcommit/snapshots-2-3 b/tests/qemublocktestdata/bitmapblockcommit/snapshots-2-3
|
|
new file mode 100644
|
|
index 0000000000..cb952eeb06
|
|
--- /dev/null
|
|
+++ b/tests/qemublocktestdata/bitmapblockcommit/snapshots-2-3
|
|
@@ -0,0 +1,65 @@
|
|
+merge bitmpas:
|
|
+[
|
|
+ {
|
|
+ "type": "block-dirty-bitmap-add",
|
|
+ "data": {
|
|
+ "node": "libvirt-3-format",
|
|
+ "name": "d",
|
|
+ "persistent": true,
|
|
+ "disabled": false,
|
|
+ "granularity": 65536
|
|
+ }
|
|
+ },
|
|
+ {
|
|
+ "type": "block-dirty-bitmap-merge",
|
|
+ "data": {
|
|
+ "node": "libvirt-3-format",
|
|
+ "target": "d",
|
|
+ "bitmaps": [
|
|
+ {
|
|
+ "node": "libvirt-2-format",
|
|
+ "name": "d"
|
|
+ }
|
|
+ ]
|
|
+ }
|
|
+ },
|
|
+ {
|
|
+ "type": "block-dirty-bitmap-merge",
|
|
+ "data": {
|
|
+ "node": "libvirt-3-format",
|
|
+ "target": "a",
|
|
+ "bitmaps": [
|
|
+ {
|
|
+ "node": "libvirt-2-format",
|
|
+ "name": "a"
|
|
+ }
|
|
+ ]
|
|
+ }
|
|
+ },
|
|
+ {
|
|
+ "type": "block-dirty-bitmap-merge",
|
|
+ "data": {
|
|
+ "node": "libvirt-3-format",
|
|
+ "target": "b",
|
|
+ "bitmaps": [
|
|
+ {
|
|
+ "node": "libvirt-2-format",
|
|
+ "name": "b"
|
|
+ }
|
|
+ ]
|
|
+ }
|
|
+ },
|
|
+ {
|
|
+ "type": "block-dirty-bitmap-merge",
|
|
+ "data": {
|
|
+ "node": "libvirt-3-format",
|
|
+ "target": "c",
|
|
+ "bitmaps": [
|
|
+ {
|
|
+ "node": "libvirt-2-format",
|
|
+ "name": "c"
|
|
+ }
|
|
+ ]
|
|
+ }
|
|
+ }
|
|
+]
|
|
diff --git a/tests/qemublocktestdata/bitmapblockcommit/snapshots-2-4 b/tests/qemublocktestdata/bitmapblockcommit/snapshots-2-4
|
|
new file mode 100644
|
|
index 0000000000..a540ca42e3
|
|
--- /dev/null
|
|
+++ b/tests/qemublocktestdata/bitmapblockcommit/snapshots-2-4
|
|
@@ -0,0 +1,97 @@
|
|
+merge bitmpas:
|
|
+[
|
|
+ {
|
|
+ "type": "block-dirty-bitmap-add",
|
|
+ "data": {
|
|
+ "node": "libvirt-4-format",
|
|
+ "name": "d",
|
|
+ "persistent": true,
|
|
+ "disabled": false,
|
|
+ "granularity": 65536
|
|
+ }
|
|
+ },
|
|
+ {
|
|
+ "type": "block-dirty-bitmap-merge",
|
|
+ "data": {
|
|
+ "node": "libvirt-4-format",
|
|
+ "target": "d",
|
|
+ "bitmaps": [
|
|
+ {
|
|
+ "node": "libvirt-2-format",
|
|
+ "name": "d"
|
|
+ }
|
|
+ ]
|
|
+ }
|
|
+ },
|
|
+ {
|
|
+ "type": "block-dirty-bitmap-merge",
|
|
+ "data": {
|
|
+ "node": "libvirt-4-format",
|
|
+ "target": "a",
|
|
+ "bitmaps": [
|
|
+ {
|
|
+ "node": "libvirt-2-format",
|
|
+ "name": "a"
|
|
+ },
|
|
+ {
|
|
+ "node": "libvirt-3-format",
|
|
+ "name": "a"
|
|
+ }
|
|
+ ]
|
|
+ }
|
|
+ },
|
|
+ {
|
|
+ "type": "block-dirty-bitmap-add",
|
|
+ "data": {
|
|
+ "node": "libvirt-4-format",
|
|
+ "name": "b",
|
|
+ "persistent": true,
|
|
+ "disabled": false,
|
|
+ "granularity": 65536
|
|
+ }
|
|
+ },
|
|
+ {
|
|
+ "type": "block-dirty-bitmap-merge",
|
|
+ "data": {
|
|
+ "node": "libvirt-4-format",
|
|
+ "target": "b",
|
|
+ "bitmaps": [
|
|
+ {
|
|
+ "node": "libvirt-2-format",
|
|
+ "name": "b"
|
|
+ },
|
|
+ {
|
|
+ "node": "libvirt-3-format",
|
|
+ "name": "b"
|
|
+ }
|
|
+ ]
|
|
+ }
|
|
+ },
|
|
+ {
|
|
+ "type": "block-dirty-bitmap-add",
|
|
+ "data": {
|
|
+ "node": "libvirt-4-format",
|
|
+ "name": "c",
|
|
+ "persistent": true,
|
|
+ "disabled": false,
|
|
+ "granularity": 65536
|
|
+ }
|
|
+ },
|
|
+ {
|
|
+ "type": "block-dirty-bitmap-merge",
|
|
+ "data": {
|
|
+ "node": "libvirt-4-format",
|
|
+ "target": "c",
|
|
+ "bitmaps": [
|
|
+ {
|
|
+ "node": "libvirt-2-format",
|
|
+ "name": "c"
|
|
+ },
|
|
+ {
|
|
+ "node": "libvirt-3-format",
|
|
+ "name": "c"
|
|
+ }
|
|
+ ]
|
|
+ }
|
|
+ }
|
|
+]
|
|
diff --git a/tests/qemublocktestdata/bitmapblockcommit/snapshots-2-5 b/tests/qemublocktestdata/bitmapblockcommit/snapshots-2-5
|
|
new file mode 100644
|
|
index 0000000000..8ea6036a33
|
|
--- /dev/null
|
|
+++ b/tests/qemublocktestdata/bitmapblockcommit/snapshots-2-5
|
|
@@ -0,0 +1,101 @@
|
|
+merge bitmpas:
|
|
+[
|
|
+ {
|
|
+ "type": "block-dirty-bitmap-add",
|
|
+ "data": {
|
|
+ "node": "libvirt-5-format",
|
|
+ "name": "d",
|
|
+ "persistent": true,
|
|
+ "disabled": false,
|
|
+ "granularity": 65536
|
|
+ }
|
|
+ },
|
|
+ {
|
|
+ "type": "block-dirty-bitmap-merge",
|
|
+ "data": {
|
|
+ "node": "libvirt-5-format",
|
|
+ "target": "d",
|
|
+ "bitmaps": [
|
|
+ {
|
|
+ "node": "libvirt-2-format",
|
|
+ "name": "d"
|
|
+ }
|
|
+ ]
|
|
+ }
|
|
+ },
|
|
+ {
|
|
+ "type": "block-dirty-bitmap-merge",
|
|
+ "data": {
|
|
+ "node": "libvirt-5-format",
|
|
+ "target": "a",
|
|
+ "bitmaps": [
|
|
+ {
|
|
+ "node": "libvirt-2-format",
|
|
+ "name": "a"
|
|
+ },
|
|
+ {
|
|
+ "node": "libvirt-3-format",
|
|
+ "name": "a"
|
|
+ },
|
|
+ {
|
|
+ "node": "libvirt-4-format",
|
|
+ "name": "a"
|
|
+ }
|
|
+ ]
|
|
+ }
|
|
+ },
|
|
+ {
|
|
+ "type": "block-dirty-bitmap-add",
|
|
+ "data": {
|
|
+ "node": "libvirt-5-format",
|
|
+ "name": "b",
|
|
+ "persistent": true,
|
|
+ "disabled": false,
|
|
+ "granularity": 65536
|
|
+ }
|
|
+ },
|
|
+ {
|
|
+ "type": "block-dirty-bitmap-merge",
|
|
+ "data": {
|
|
+ "node": "libvirt-5-format",
|
|
+ "target": "b",
|
|
+ "bitmaps": [
|
|
+ {
|
|
+ "node": "libvirt-2-format",
|
|
+ "name": "b"
|
|
+ },
|
|
+ {
|
|
+ "node": "libvirt-3-format",
|
|
+ "name": "b"
|
|
+ }
|
|
+ ]
|
|
+ }
|
|
+ },
|
|
+ {
|
|
+ "type": "block-dirty-bitmap-add",
|
|
+ "data": {
|
|
+ "node": "libvirt-5-format",
|
|
+ "name": "c",
|
|
+ "persistent": true,
|
|
+ "disabled": false,
|
|
+ "granularity": 65536
|
|
+ }
|
|
+ },
|
|
+ {
|
|
+ "type": "block-dirty-bitmap-merge",
|
|
+ "data": {
|
|
+ "node": "libvirt-5-format",
|
|
+ "target": "c",
|
|
+ "bitmaps": [
|
|
+ {
|
|
+ "node": "libvirt-2-format",
|
|
+ "name": "c"
|
|
+ },
|
|
+ {
|
|
+ "node": "libvirt-3-format",
|
|
+ "name": "c"
|
|
+ }
|
|
+ ]
|
|
+ }
|
|
+ }
|
|
+]
|
|
diff --git a/tests/qemublocktestdata/bitmapblockcommit/snapshots-3-4 b/tests/qemublocktestdata/bitmapblockcommit/snapshots-3-4
|
|
new file mode 100644
|
|
index 0000000000..736d4fd9df
|
|
--- /dev/null
|
|
+++ b/tests/qemublocktestdata/bitmapblockcommit/snapshots-3-4
|
|
@@ -0,0 +1,62 @@
|
|
+merge bitmpas:
|
|
+[
|
|
+ {
|
|
+ "type": "block-dirty-bitmap-add",
|
|
+ "data": {
|
|
+ "node": "libvirt-4-format",
|
|
+ "name": "c",
|
|
+ "persistent": true,
|
|
+ "disabled": false,
|
|
+ "granularity": 65536
|
|
+ }
|
|
+ },
|
|
+ {
|
|
+ "type": "block-dirty-bitmap-merge",
|
|
+ "data": {
|
|
+ "node": "libvirt-4-format",
|
|
+ "target": "c",
|
|
+ "bitmaps": [
|
|
+ {
|
|
+ "node": "libvirt-3-format",
|
|
+ "name": "c"
|
|
+ }
|
|
+ ]
|
|
+ }
|
|
+ },
|
|
+ {
|
|
+ "type": "block-dirty-bitmap-add",
|
|
+ "data": {
|
|
+ "node": "libvirt-4-format",
|
|
+ "name": "b",
|
|
+ "persistent": true,
|
|
+ "disabled": false,
|
|
+ "granularity": 65536
|
|
+ }
|
|
+ },
|
|
+ {
|
|
+ "type": "block-dirty-bitmap-merge",
|
|
+ "data": {
|
|
+ "node": "libvirt-4-format",
|
|
+ "target": "b",
|
|
+ "bitmaps": [
|
|
+ {
|
|
+ "node": "libvirt-3-format",
|
|
+ "name": "b"
|
|
+ }
|
|
+ ]
|
|
+ }
|
|
+ },
|
|
+ {
|
|
+ "type": "block-dirty-bitmap-merge",
|
|
+ "data": {
|
|
+ "node": "libvirt-4-format",
|
|
+ "target": "a",
|
|
+ "bitmaps": [
|
|
+ {
|
|
+ "node": "libvirt-3-format",
|
|
+ "name": "a"
|
|
+ }
|
|
+ ]
|
|
+ }
|
|
+ }
|
|
+]
|
|
diff --git a/tests/qemublocktestdata/bitmapblockcommit/snapshots-3-5 b/tests/qemublocktestdata/bitmapblockcommit/snapshots-3-5
|
|
new file mode 100644
|
|
index 0000000000..207d82e6b6
|
|
--- /dev/null
|
|
+++ b/tests/qemublocktestdata/bitmapblockcommit/snapshots-3-5
|
|
@@ -0,0 +1,66 @@
|
|
+merge bitmpas:
|
|
+[
|
|
+ {
|
|
+ "type": "block-dirty-bitmap-add",
|
|
+ "data": {
|
|
+ "node": "libvirt-5-format",
|
|
+ "name": "c",
|
|
+ "persistent": true,
|
|
+ "disabled": false,
|
|
+ "granularity": 65536
|
|
+ }
|
|
+ },
|
|
+ {
|
|
+ "type": "block-dirty-bitmap-merge",
|
|
+ "data": {
|
|
+ "node": "libvirt-5-format",
|
|
+ "target": "c",
|
|
+ "bitmaps": [
|
|
+ {
|
|
+ "node": "libvirt-3-format",
|
|
+ "name": "c"
|
|
+ }
|
|
+ ]
|
|
+ }
|
|
+ },
|
|
+ {
|
|
+ "type": "block-dirty-bitmap-add",
|
|
+ "data": {
|
|
+ "node": "libvirt-5-format",
|
|
+ "name": "b",
|
|
+ "persistent": true,
|
|
+ "disabled": false,
|
|
+ "granularity": 65536
|
|
+ }
|
|
+ },
|
|
+ {
|
|
+ "type": "block-dirty-bitmap-merge",
|
|
+ "data": {
|
|
+ "node": "libvirt-5-format",
|
|
+ "target": "b",
|
|
+ "bitmaps": [
|
|
+ {
|
|
+ "node": "libvirt-3-format",
|
|
+ "name": "b"
|
|
+ }
|
|
+ ]
|
|
+ }
|
|
+ },
|
|
+ {
|
|
+ "type": "block-dirty-bitmap-merge",
|
|
+ "data": {
|
|
+ "node": "libvirt-5-format",
|
|
+ "target": "a",
|
|
+ "bitmaps": [
|
|
+ {
|
|
+ "node": "libvirt-3-format",
|
|
+ "name": "a"
|
|
+ },
|
|
+ {
|
|
+ "node": "libvirt-4-format",
|
|
+ "name": "a"
|
|
+ }
|
|
+ ]
|
|
+ }
|
|
+ }
|
|
+]
|
|
diff --git a/tests/qemublocktestdata/bitmapblockcommit/snapshots-4-5 b/tests/qemublocktestdata/bitmapblockcommit/snapshots-4-5
|
|
new file mode 100644
|
|
index 0000000000..4a8e6c5cff
|
|
--- /dev/null
|
|
+++ b/tests/qemublocktestdata/bitmapblockcommit/snapshots-4-5
|
|
@@ -0,0 +1,16 @@
|
|
+merge bitmpas:
|
|
+[
|
|
+ {
|
|
+ "type": "block-dirty-bitmap-merge",
|
|
+ "data": {
|
|
+ "node": "libvirt-5-format",
|
|
+ "target": "a",
|
|
+ "bitmaps": [
|
|
+ {
|
|
+ "node": "libvirt-4-format",
|
|
+ "name": "a"
|
|
+ }
|
|
+ ]
|
|
+ }
|
|
+ }
|
|
+]
|
|
--
|
|
2.27.0
|
|
|