diff --git a/tests/qemublocktest.c b/tests/qemublocktest.c index 1c8977637c0744a2aab1b70d9556fdb43e124543..078067d1a52bf2443986feb77f1b7d8ca6850c6c 100644 --- a/tests/qemublocktest.c +++ b/tests/qemublocktest.c @@ -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 index 0000000000000000000000000000000000000000..526fc8d55b766d48f5a1a9780b2ed3e0998df138 --- /dev/null +++ b/tests/qemublocktestdata/backupmerge/snapshot-deep-out.json @@ -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 index 0000000000000000000000000000000000000000..b89252e284691abfb185f7a55d4f182aa2f8ab8b --- /dev/null +++ b/tests/qemublocktestdata/backupmerge/snapshot-flat-out.json @@ -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 index 0000000000000000000000000000000000000000..537d776ec6dec9e05d698adfd38e677f34031766 --- /dev/null +++ b/tests/qemublocktestdata/backupmerge/snapshot-intermediate-out.json @@ -0,0 +1,14 @@ +[ + { + "node": "libvirt-1-format", + "name": "current" + }, + { + "node": "libvirt-1-format", + "name": "d" + }, + { + "node": "libvirt-2-format", + "name": "d" + } +]