The 'basic' case is just a single backing store layer containing the
bitmaps so we just copy the bitmaps over to the backup bitmap.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
tests/qemublocktest.c | 4 +++
.../backupmerge/basic-deep-out.json | 25 +++++++++++++++++++
.../backupmerge/basic-flat-out.json | 25 +++++++++++++++++++
.../backupmerge/basic-intermediate-out.json | 25 +++++++++++++++++++
4 files changed, 79 insertions(+)
create mode 100644 tests/qemublocktestdata/backupmerge/basic-deep-out.json
create mode 100644 tests/qemublocktestdata/backupmerge/basic-flat-out.json
create mode 100644 tests/qemublocktestdata/backupmerge/basic-intermediate-out.json
diff --git a/tests/qemublocktest.c b/tests/qemublocktest.c
index 2488aa2200..5cdc4d4be6 100644
--- a/tests/qemublocktest.c
+++ b/tests/qemublocktest.c
@@ -1267,6 +1267,10 @@ mymain(void)
TEST_BACKUP_BITMAP_CALCULATE("empty", bitmapSourceChain, "a",
"empty");
+ TEST_BACKUP_BITMAP_CALCULATE("basic-flat", bitmapSourceChain,
"current", "basic");
+ TEST_BACKUP_BITMAP_CALCULATE("basic-intermediate", bitmapSourceChain,
"d", "basic");
+ TEST_BACKUP_BITMAP_CALCULATE("basic-deep", bitmapSourceChain,
"a", "basic");
+
#define TEST_CHECKPOINT_DELETE(testname, delbmp, named) \
do { \
checkpointdeletedata.name = testname; \
diff --git a/tests/qemublocktestdata/backupmerge/basic-deep-out.json
b/tests/qemublocktestdata/backupmerge/basic-deep-out.json
new file mode 100644
index 0000000000..ff77af789b
--- /dev/null
+++ b/tests/qemublocktestdata/backupmerge/basic-deep-out.json
@@ -0,0 +1,25 @@
+[
+ {
+ "type": "block-dirty-bitmap-add",
+ "data": {
+ "node": "target_node",
+ "name": "target-bitmap-name",
+ "persistent": false,
+ "disabled": true,
+ "granularity": 65536
+ }
+ },
+ {
+ "type": "block-dirty-bitmap-merge",
+ "data": {
+ "node": "target_node",
+ "target": "target-bitmap-name",
+ "bitmaps": [
+ {
+ "node": "libvirt-1-format",
+ "name": "a"
+ }
+ ]
+ }
+ }
+]
diff --git a/tests/qemublocktestdata/backupmerge/basic-flat-out.json
b/tests/qemublocktestdata/backupmerge/basic-flat-out.json
new file mode 100644
index 0000000000..4637bbc377
--- /dev/null
+++ b/tests/qemublocktestdata/backupmerge/basic-flat-out.json
@@ -0,0 +1,25 @@
+[
+ {
+ "type": "block-dirty-bitmap-add",
+ "data": {
+ "node": "target_node",
+ "name": "target-bitmap-name",
+ "persistent": false,
+ "disabled": true,
+ "granularity": 65536
+ }
+ },
+ {
+ "type": "block-dirty-bitmap-merge",
+ "data": {
+ "node": "target_node",
+ "target": "target-bitmap-name",
+ "bitmaps": [
+ {
+ "node": "libvirt-1-format",
+ "name": "current"
+ }
+ ]
+ }
+ }
+]
diff --git a/tests/qemublocktestdata/backupmerge/basic-intermediate-out.json
b/tests/qemublocktestdata/backupmerge/basic-intermediate-out.json
new file mode 100644
index 0000000000..f2f3b3f568
--- /dev/null
+++ b/tests/qemublocktestdata/backupmerge/basic-intermediate-out.json
@@ -0,0 +1,25 @@
+[
+ {
+ "type": "block-dirty-bitmap-add",
+ "data": {
+ "node": "target_node",
+ "name": "target-bitmap-name",
+ "persistent": false,
+ "disabled": true,
+ "granularity": 65536
+ }
+ },
+ {
+ "type": "block-dirty-bitmap-merge",
+ "data": {
+ "node": "target_node",
+ "target": "target-bitmap-name",
+ "bitmaps": [
+ {
+ "node": "libvirt-1-format",
+ "name": "d"
+ }
+ ]
+ }
+ }
+]
--
2.26.2