提交 065e548e 编写于 作者: P Peter Krempa

tests: qemublock: Add checkpoint deletion tests for some special cases

Use the synthetic test data to verify that the algorithm correctly picks
bitmaps to merge when the bitmap is changed along with the image itself.
Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
上级 3c1c35ba
......@@ -1025,6 +1025,13 @@ mymain(void)
TEST_CHECKPOINT_DELETE_MERGE("snapshots-intermediate3", "d", "c", "snapshots");
TEST_CHECKPOINT_DELETE_MERGE("snapshots-current", "current", "d", "snapshots");
TEST_CHECKPOINT_DELETE_MERGE("snapshots-synthetic-checkpoint-noparent", "a", NULL, "snapshots-synthetic-checkpoint");
TEST_CHECKPOINT_DELETE_MERGE("snapshots-synthetic-checkpoint-intermediate1", "b", "a", "snapshots-synthetic-checkpoint");
TEST_CHECKPOINT_DELETE_MERGE("snapshots-synthetic-checkpoint-intermediate2", "c", "b", "snapshots-synthetic-checkpoint");
TEST_CHECKPOINT_DELETE_MERGE("snapshots-synthetic-checkpoint-intermediate3", "d", "c", "snapshots-synthetic-checkpoint");
TEST_CHECKPOINT_DELETE_MERGE("snapshots-synthetic-checkpoint-current", "current", "d", "snapshots-synthetic-checkpoint");
cleanup:
virHashFree(diskxmljsondata.schema);
qemuTestDriverFree(&driver);
......
[
{
"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"
}
}
]
[
{
"type": "block-dirty-bitmap-enable",
"data": {
"node": "libvirt-3-format",
"name": "a"
}
},
{
"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"
}
}
]
[
{
"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-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"
}
}
]
[
{
"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"
}
}
]
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册