mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
qemublocktest: Add 'snapshots' tests for backup bitmap handling
The 'snapshots' case has multiple layers so we need to make sure that the bitmaps are merged with the appropriate temporary bitmaps formatted from the allocation bitmap for any backing chain layer above. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
8c6e2da25e
commit
b630cf4c0d
@ -1267,6 +1267,10 @@ mymain(void)
|
|||||||
TEST_BACKUP_BITMAP_CALCULATE("basic-intermediate", bitmapSourceChain, "d", "basic");
|
TEST_BACKUP_BITMAP_CALCULATE("basic-intermediate", bitmapSourceChain, "d", "basic");
|
||||||
TEST_BACKUP_BITMAP_CALCULATE("basic-deep", bitmapSourceChain, "a", "basic");
|
TEST_BACKUP_BITMAP_CALCULATE("basic-deep", bitmapSourceChain, "a", "basic");
|
||||||
|
|
||||||
|
TEST_BACKUP_BITMAP_CALCULATE("snapshots-flat", bitmapSourceChain, "current", "snapshots");
|
||||||
|
TEST_BACKUP_BITMAP_CALCULATE("snapshots-intermediate", bitmapSourceChain, "d", "snapshots");
|
||||||
|
TEST_BACKUP_BITMAP_CALCULATE("snapshots-deep", bitmapSourceChain, "a", "snapshots");
|
||||||
|
|
||||||
#define TEST_CHECKPOINT_DELETE(testname, delbmp, named) \
|
#define TEST_CHECKPOINT_DELETE(testname, delbmp, named) \
|
||||||
do { \
|
do { \
|
||||||
checkpointdeletedata.name = testname; \
|
checkpointdeletedata.name = testname; \
|
||||||
|
41
tests/qemublocktestdata/backupmerge/snapshots-deep-out.json
Normal file
41
tests/qemublocktestdata/backupmerge/snapshots-deep-out.json
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"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"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"node": "libvirt-2-format",
|
||||||
|
"name": "a"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"node": "libvirt-3-format",
|
||||||
|
"name": "a"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"node": "libvirt-4-format",
|
||||||
|
"name": "a"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"node": "libvirt-5-format",
|
||||||
|
"name": "a"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
25
tests/qemublocktestdata/backupmerge/snapshots-flat-out.json
Normal file
25
tests/qemublocktestdata/backupmerge/snapshots-flat-out.json
Normal file
@ -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"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
@ -0,0 +1,29 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"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"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"node": "libvirt-2-format",
|
||||||
|
"name": "d"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
Loading…
Reference in New Issue
Block a user