1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-01-23 02:04:16 +03:00

tests: qemublock: Add checkpoint deletion test for deep backing chain

Add test cases for merging various pairs of bitmaps when snapshots were
created together with checkpoints.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa 2020-01-09 15:10:43 +01:00
parent 30bc426071
commit 3c1c35bada
6 changed files with 198 additions and 0 deletions

View File

@ -1019,6 +1019,12 @@ mymain(void)
TEST_CHECKPOINT_DELETE_MERGE("basic-intermediate3", "d", "c", "basic");
TEST_CHECKPOINT_DELETE_MERGE("basic-current", "current", "d", "basic");
TEST_CHECKPOINT_DELETE_MERGE("snapshots-noparent", "a", NULL, "snapshots");
TEST_CHECKPOINT_DELETE_MERGE("snapshots-intermediate1", "b", "a", "snapshots");
TEST_CHECKPOINT_DELETE_MERGE("snapshots-intermediate2", "c", "b", "snapshots");
TEST_CHECKPOINT_DELETE_MERGE("snapshots-intermediate3", "d", "c", "snapshots");
TEST_CHECKPOINT_DELETE_MERGE("snapshots-current", "current", "d", "snapshots");
cleanup:
virHashFree(diskxmljsondata.schema);
qemuTestDriverFree(&driver);

View File

@ -0,0 +1,29 @@
[
{
"type": "block-dirty-bitmap-enable",
"data": {
"node": "libvirt-1-format",
"name": "d"
}
},
{
"type": "block-dirty-bitmap-merge",
"data": {
"node": "libvirt-1-format",
"target": "d",
"bitmaps": [
{
"node": "libvirt-1-format",
"name": "current"
}
]
}
},
{
"type": "block-dirty-bitmap-remove",
"data": {
"node": "libvirt-1-format",
"name": "current"
}
}
]

View File

@ -0,0 +1,22 @@
[
{
"type": "block-dirty-bitmap-merge",
"data": {
"node": "libvirt-3-format",
"target": "a",
"bitmaps": [
{
"node": "libvirt-3-format",
"name": "b"
}
]
}
},
{
"type": "block-dirty-bitmap-remove",
"data": {
"node": "libvirt-3-format",
"name": "b"
}
}
]

View File

@ -0,0 +1,59 @@
[
{
"type": "block-dirty-bitmap-add",
"data": {
"node": "libvirt-2-format",
"name": "b",
"persistent": true,
"disabled": true,
"granularity": 65536
}
},
{
"type": "block-dirty-bitmap-merge",
"data": {
"node": "libvirt-2-format",
"target": "b",
"bitmaps": [
{
"node": "libvirt-2-format",
"name": "c"
}
]
}
},
{
"type": "block-dirty-bitmap-remove",
"data": {
"node": "libvirt-2-format",
"name": "c"
}
},
{
"type": "block-dirty-bitmap-enable",
"data": {
"node": "libvirt-3-format",
"name": "b"
}
},
{
"type": "block-dirty-bitmap-merge",
"data": {
"node": "libvirt-3-format",
"target": "b",
"bitmaps": [
{
"node": "libvirt-3-format",
"name": "c"
}
]
}
},
{
"type": "block-dirty-bitmap-remove",
"data": {
"node": "libvirt-3-format",
"name": "c"
}
}
]

View File

@ -0,0 +1,59 @@
[
{
"type": "block-dirty-bitmap-add",
"data": {
"node": "libvirt-1-format",
"name": "c",
"persistent": true,
"disabled": true,
"granularity": 65536
}
},
{
"type": "block-dirty-bitmap-merge",
"data": {
"node": "libvirt-1-format",
"target": "c",
"bitmaps": [
{
"node": "libvirt-1-format",
"name": "d"
}
]
}
},
{
"type": "block-dirty-bitmap-remove",
"data": {
"node": "libvirt-1-format",
"name": "d"
}
},
{
"type": "block-dirty-bitmap-enable",
"data": {
"node": "libvirt-2-format",
"name": "c"
}
},
{
"type": "block-dirty-bitmap-merge",
"data": {
"node": "libvirt-2-format",
"target": "c",
"bitmaps": [
{
"node": "libvirt-2-format",
"name": "d"
}
]
}
},
{
"type": "block-dirty-bitmap-remove",
"data": {
"node": "libvirt-2-format",
"name": "d"
}
}
]

View File

@ -0,0 +1,23 @@
[
{
"type": "block-dirty-bitmap-remove",
"data": {
"node": "libvirt-3-format",
"name": "a"
}
},
{
"type": "block-dirty-bitmap-remove",
"data": {
"node": "libvirt-4-format",
"name": "a"
}
},
{
"type": "block-dirty-bitmap-remove",
"data": {
"node": "libvirt-5-format",
"name": "a"
}
}
]