]> xenbits.xensource.com Git - libvirt.git/commitdiff
tests: qemublock: Add tests for cross-snapshot incremental backups
authorPeter Krempa <pkrempa@redhat.com>
Thu, 12 Dec 2019 15:03:22 +0000 (16:03 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Fri, 13 Dec 2019 12:22:55 +0000 (13:22 +0100)
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
tests/qemublocktest.c
tests/qemublocktestdata/backupmerge/snapshot-deep-out.json [new file with mode: 0644]
tests/qemublocktestdata/backupmerge/snapshot-flat-out.json [new file with mode: 0644]
tests/qemublocktestdata/backupmerge/snapshot-intermediate-out.json [new file with mode: 0644]

index 1c8977637c0744a2aab1b70d9556fdb43e124543..078067d1a52bf2443986feb77f1b7d8ca6850c6c 100644 (file)
@@ -939,6 +939,10 @@ mymain(void)
     TEST_BACKUP_BITMAP_CALCULATE("basic-intermediate", bitmapSourceChain, "d", "basic");
     TEST_BACKUP_BITMAP_CALCULATE("basic-deep", bitmapSourceChain, "a", "basic");
 
+    TEST_BACKUP_BITMAP_CALCULATE("snapshot-flat", bitmapSourceChain, "current", "snapshots");
+    TEST_BACKUP_BITMAP_CALCULATE("snapshot-intermediate", bitmapSourceChain, "d", "snapshots");
+    TEST_BACKUP_BITMAP_CALCULATE("snapshot-deep", bitmapSourceChain, "a", "snapshots");
+
  cleanup:
     virHashFree(diskxmljsondata.schema);
     qemuTestDriverFree(&driver);
diff --git a/tests/qemublocktestdata/backupmerge/snapshot-deep-out.json b/tests/qemublocktestdata/backupmerge/snapshot-deep-out.json
new file mode 100644 (file)
index 0000000..526fc8d
--- /dev/null
@@ -0,0 +1,38 @@
+[
+  {
+    "node": "libvirt-1-format",
+    "name": "current"
+  },
+  {
+    "node": "libvirt-1-format",
+    "name": "d"
+  },
+  {
+    "node": "libvirt-2-format",
+    "name": "d"
+  },
+  {
+    "node": "libvirt-2-format",
+    "name": "c"
+  },
+  {
+    "node": "libvirt-3-format",
+    "name": "c"
+  },
+  {
+    "node": "libvirt-3-format",
+    "name": "b"
+  },
+  {
+    "node": "libvirt-3-format",
+    "name": "a"
+  },
+  {
+    "node": "libvirt-4-format",
+    "name": "a"
+  },
+  {
+    "node": "libvirt-5-format",
+    "name": "a"
+  }
+]
diff --git a/tests/qemublocktestdata/backupmerge/snapshot-flat-out.json b/tests/qemublocktestdata/backupmerge/snapshot-flat-out.json
new file mode 100644 (file)
index 0000000..b89252e
--- /dev/null
@@ -0,0 +1,6 @@
+[
+  {
+    "node": "libvirt-1-format",
+    "name": "current"
+  }
+]
diff --git a/tests/qemublocktestdata/backupmerge/snapshot-intermediate-out.json b/tests/qemublocktestdata/backupmerge/snapshot-intermediate-out.json
new file mode 100644 (file)
index 0000000..537d776
--- /dev/null
@@ -0,0 +1,14 @@
+[
+  {
+    "node": "libvirt-1-format",
+    "name": "current"
+  },
+  {
+    "node": "libvirt-1-format",
+    "name": "d"
+  },
+  {
+    "node": "libvirt-2-format",
+    "name": "d"
+  }
+]