提交 b5eaabfb 编写于 作者: P Peter Krempa

qemublocktest: Add 'snapshots' tests for block commit bitmap handling

Simulate commit between all the combinations of layers in the
'snapshots' case to see whether the code merges the correct bitmaps with
the correct depth of temporary bitmaps.
Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
Reviewed-by: NEric Blake <eblake@redhat.com>
上级 79bc7c18
......@@ -1362,6 +1362,20 @@ mymain(void)
TEST_BITMAP_BLOCKCOMMIT("basic-1-3", 1, 3, "basic");
TEST_BITMAP_BLOCKCOMMIT("basic-2-3", 2, 3, "basic");
TEST_BITMAP_BLOCKCOMMIT("snapshots-1-2", 1, 2, "snapshots");
TEST_BITMAP_BLOCKCOMMIT("snapshots-1-3", 1, 3, "snapshots");
TEST_BITMAP_BLOCKCOMMIT("snapshots-1-4", 1, 4, "snapshots");
TEST_BITMAP_BLOCKCOMMIT("snapshots-1-5", 1, 5, "snapshots");
TEST_BITMAP_BLOCKCOMMIT("snapshots-2-3", 2, 3, "snapshots");
TEST_BITMAP_BLOCKCOMMIT("snapshots-2-4", 2, 4, "snapshots");
TEST_BITMAP_BLOCKCOMMIT("snapshots-2-5", 2, 5, "snapshots");
TEST_BITMAP_BLOCKCOMMIT("snapshots-3-4", 3, 4, "snapshots");
TEST_BITMAP_BLOCKCOMMIT("snapshots-3-5", 3, 5, "snapshots");
TEST_BITMAP_BLOCKCOMMIT("snapshots-4-5", 4, 5, "snapshots");
cleanup:
qemuTestDriverFree(&driver);
VIR_FREE(capslatest_x86_64);
......
merge bitmpas:
[
{
"type": "block-dirty-bitmap-add",
"data": {
"node": "libvirt-2-format",
"name": "current",
"persistent": true,
"disabled": false,
"granularity": 65536
}
},
{
"type": "block-dirty-bitmap-merge",
"data": {
"node": "libvirt-2-format",
"target": "current",
"bitmaps": [
{
"node": "libvirt-1-format",
"name": "current"
},
{
"node": "libvirt-2-format",
"name": "libvirt-tmp-activewrite"
}
]
}
},
{
"type": "block-dirty-bitmap-merge",
"data": {
"node": "libvirt-2-format",
"target": "c",
"bitmaps": [
{
"node": "libvirt-1-format",
"name": "c"
},
{
"node": "libvirt-2-format",
"name": "libvirt-tmp-activewrite"
}
]
}
},
{
"type": "block-dirty-bitmap-merge",
"data": {
"node": "libvirt-2-format",
"target": "b",
"bitmaps": [
{
"node": "libvirt-1-format",
"name": "b"
},
{
"node": "libvirt-2-format",
"name": "libvirt-tmp-activewrite"
}
]
}
},
{
"type": "block-dirty-bitmap-merge",
"data": {
"node": "libvirt-2-format",
"target": "a",
"bitmaps": [
{
"node": "libvirt-1-format",
"name": "a"
},
{
"node": "libvirt-2-format",
"name": "libvirt-tmp-activewrite"
}
]
}
},
{
"type": "block-dirty-bitmap-merge",
"data": {
"node": "libvirt-2-format",
"target": "d",
"bitmaps": [
{
"node": "libvirt-1-format",
"name": "d"
},
{
"node": "libvirt-2-format",
"name": "libvirt-tmp-activewrite"
}
]
}
},
{
"type": "block-dirty-bitmap-remove",
"data": {
"node": "libvirt-2-format",
"name": "libvirt-tmp-activewrite"
}
}
]
merge bitmpas:
[
{
"type": "block-dirty-bitmap-add",
"data": {
"node": "libvirt-3-format",
"name": "current",
"persistent": true,
"disabled": false,
"granularity": 65536
}
},
{
"type": "block-dirty-bitmap-merge",
"data": {
"node": "libvirt-3-format",
"target": "current",
"bitmaps": [
{
"node": "libvirt-1-format",
"name": "current"
},
{
"node": "libvirt-3-format",
"name": "libvirt-tmp-activewrite"
}
]
}
},
{
"type": "block-dirty-bitmap-merge",
"data": {
"node": "libvirt-3-format",
"target": "c",
"bitmaps": [
{
"node": "libvirt-1-format",
"name": "c"
},
{
"node": "libvirt-2-format",
"name": "c"
},
{
"node": "libvirt-3-format",
"name": "libvirt-tmp-activewrite"
}
]
}
},
{
"type": "block-dirty-bitmap-merge",
"data": {
"node": "libvirt-3-format",
"target": "b",
"bitmaps": [
{
"node": "libvirt-1-format",
"name": "b"
},
{
"node": "libvirt-2-format",
"name": "b"
},
{
"node": "libvirt-3-format",
"name": "libvirt-tmp-activewrite"
}
]
}
},
{
"type": "block-dirty-bitmap-merge",
"data": {
"node": "libvirt-3-format",
"target": "a",
"bitmaps": [
{
"node": "libvirt-1-format",
"name": "a"
},
{
"node": "libvirt-2-format",
"name": "a"
},
{
"node": "libvirt-3-format",
"name": "libvirt-tmp-activewrite"
}
]
}
},
{
"type": "block-dirty-bitmap-add",
"data": {
"node": "libvirt-3-format",
"name": "d",
"persistent": true,
"disabled": false,
"granularity": 65536
}
},
{
"type": "block-dirty-bitmap-merge",
"data": {
"node": "libvirt-3-format",
"target": "d",
"bitmaps": [
{
"node": "libvirt-1-format",
"name": "d"
},
{
"node": "libvirt-2-format",
"name": "d"
},
{
"node": "libvirt-3-format",
"name": "libvirt-tmp-activewrite"
}
]
}
},
{
"type": "block-dirty-bitmap-remove",
"data": {
"node": "libvirt-3-format",
"name": "libvirt-tmp-activewrite"
}
}
]
merge bitmpas:
[
{
"type": "block-dirty-bitmap-add",
"data": {
"node": "libvirt-4-format",
"name": "current",
"persistent": true,
"disabled": false,
"granularity": 65536
}
},
{
"type": "block-dirty-bitmap-merge",
"data": {
"node": "libvirt-4-format",
"target": "current",
"bitmaps": [
{
"node": "libvirt-1-format",
"name": "current"
},
{
"node": "libvirt-4-format",
"name": "libvirt-tmp-activewrite"
}
]
}
},
{
"type": "block-dirty-bitmap-add",
"data": {
"node": "libvirt-4-format",
"name": "c",
"persistent": true,
"disabled": false,
"granularity": 65536
}
},
{
"type": "block-dirty-bitmap-merge",
"data": {
"node": "libvirt-4-format",
"target": "c",
"bitmaps": [
{
"node": "libvirt-1-format",
"name": "c"
},
{
"node": "libvirt-2-format",
"name": "c"
},
{
"node": "libvirt-3-format",
"name": "c"
},
{
"node": "libvirt-4-format",
"name": "libvirt-tmp-activewrite"
}
]
}
},
{
"type": "block-dirty-bitmap-add",
"data": {
"node": "libvirt-4-format",
"name": "b",
"persistent": true,
"disabled": false,
"granularity": 65536
}
},
{
"type": "block-dirty-bitmap-merge",
"data": {
"node": "libvirt-4-format",
"target": "b",
"bitmaps": [
{
"node": "libvirt-1-format",
"name": "b"
},
{
"node": "libvirt-2-format",
"name": "b"
},
{
"node": "libvirt-3-format",
"name": "b"
},
{
"node": "libvirt-4-format",
"name": "libvirt-tmp-activewrite"
}
]
}
},
{
"type": "block-dirty-bitmap-merge",
"data": {
"node": "libvirt-4-format",
"target": "a",
"bitmaps": [
{
"node": "libvirt-1-format",
"name": "a"
},
{
"node": "libvirt-2-format",
"name": "a"
},
{
"node": "libvirt-3-format",
"name": "a"
},
{
"node": "libvirt-4-format",
"name": "libvirt-tmp-activewrite"
}
]
}
},
{
"type": "block-dirty-bitmap-add",
"data": {
"node": "libvirt-4-format",
"name": "d",
"persistent": true,
"disabled": false,
"granularity": 65536
}
},
{
"type": "block-dirty-bitmap-merge",
"data": {
"node": "libvirt-4-format",
"target": "d",
"bitmaps": [
{
"node": "libvirt-1-format",
"name": "d"
},
{
"node": "libvirt-2-format",
"name": "d"
},
{
"node": "libvirt-4-format",
"name": "libvirt-tmp-activewrite"
}
]
}
},
{
"type": "block-dirty-bitmap-remove",
"data": {
"node": "libvirt-4-format",
"name": "libvirt-tmp-activewrite"
}
}
]
merge bitmpas:
[
{
"type": "block-dirty-bitmap-add",
"data": {
"node": "libvirt-5-format",
"name": "current",
"persistent": true,
"disabled": false,
"granularity": 65536
}
},
{
"type": "block-dirty-bitmap-merge",
"data": {
"node": "libvirt-5-format",
"target": "current",
"bitmaps": [
{
"node": "libvirt-1-format",
"name": "current"
},
{
"node": "libvirt-5-format",
"name": "libvirt-tmp-activewrite"
}
]
}
},
{
"type": "block-dirty-bitmap-add",
"data": {
"node": "libvirt-5-format",
"name": "c",
"persistent": true,
"disabled": false,
"granularity": 65536
}
},
{
"type": "block-dirty-bitmap-merge",
"data": {
"node": "libvirt-5-format",
"target": "c",
"bitmaps": [
{
"node": "libvirt-1-format",
"name": "c"
},
{
"node": "libvirt-2-format",
"name": "c"
},
{
"node": "libvirt-3-format",
"name": "c"
},
{
"node": "libvirt-5-format",
"name": "libvirt-tmp-activewrite"
}
]
}
},
{
"type": "block-dirty-bitmap-add",
"data": {
"node": "libvirt-5-format",
"name": "b",
"persistent": true,
"disabled": false,
"granularity": 65536
}
},
{
"type": "block-dirty-bitmap-merge",
"data": {
"node": "libvirt-5-format",
"target": "b",
"bitmaps": [
{
"node": "libvirt-1-format",
"name": "b"
},
{
"node": "libvirt-2-format",
"name": "b"
},
{
"node": "libvirt-3-format",
"name": "b"
},
{
"node": "libvirt-5-format",
"name": "libvirt-tmp-activewrite"
}
]
}
},
{
"type": "block-dirty-bitmap-merge",
"data": {
"node": "libvirt-5-format",
"target": "a",
"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": "libvirt-tmp-activewrite"
}
]
}
},
{
"type": "block-dirty-bitmap-add",
"data": {
"node": "libvirt-5-format",
"name": "d",
"persistent": true,
"disabled": false,
"granularity": 65536
}
},
{
"type": "block-dirty-bitmap-merge",
"data": {
"node": "libvirt-5-format",
"target": "d",
"bitmaps": [
{
"node": "libvirt-1-format",
"name": "d"
},
{
"node": "libvirt-2-format",
"name": "d"
},
{
"node": "libvirt-5-format",
"name": "libvirt-tmp-activewrite"
}
]
}
},
{
"type": "block-dirty-bitmap-remove",
"data": {
"node": "libvirt-5-format",
"name": "libvirt-tmp-activewrite"
}
}
]
merge bitmpas:
[
{
"type": "block-dirty-bitmap-add",
"data": {
"node": "libvirt-3-format",
"name": "d",
"persistent": true,
"disabled": false,
"granularity": 65536
}
},
{
"type": "block-dirty-bitmap-merge",
"data": {
"node": "libvirt-3-format",
"target": "d",
"bitmaps": [
{
"node": "libvirt-2-format",
"name": "d"
}
]
}
},
{
"type": "block-dirty-bitmap-merge",
"data": {
"node": "libvirt-3-format",
"target": "a",
"bitmaps": [
{
"node": "libvirt-2-format",
"name": "a"
}
]
}
},
{
"type": "block-dirty-bitmap-merge",
"data": {
"node": "libvirt-3-format",
"target": "b",
"bitmaps": [
{
"node": "libvirt-2-format",
"name": "b"
}
]
}
},
{
"type": "block-dirty-bitmap-merge",
"data": {
"node": "libvirt-3-format",
"target": "c",
"bitmaps": [
{
"node": "libvirt-2-format",
"name": "c"
}
]
}
}
]
merge bitmpas:
[
{
"type": "block-dirty-bitmap-add",
"data": {
"node": "libvirt-4-format",
"name": "d",
"persistent": true,
"disabled": false,
"granularity": 65536
}
},
{
"type": "block-dirty-bitmap-merge",
"data": {
"node": "libvirt-4-format",
"target": "d",
"bitmaps": [
{
"node": "libvirt-2-format",
"name": "d"
}
]
}
},
{
"type": "block-dirty-bitmap-merge",
"data": {
"node": "libvirt-4-format",
"target": "a",
"bitmaps": [
{
"node": "libvirt-2-format",
"name": "a"
},
{
"node": "libvirt-3-format",
"name": "a"
}
]
}
},
{
"type": "block-dirty-bitmap-add",
"data": {
"node": "libvirt-4-format",
"name": "b",
"persistent": true,
"disabled": false,
"granularity": 65536
}
},
{
"type": "block-dirty-bitmap-merge",
"data": {
"node": "libvirt-4-format",
"target": "b",
"bitmaps": [
{
"node": "libvirt-2-format",
"name": "b"
},
{
"node": "libvirt-3-format",
"name": "b"
}
]
}
},
{
"type": "block-dirty-bitmap-add",
"data": {
"node": "libvirt-4-format",
"name": "c",
"persistent": true,
"disabled": false,
"granularity": 65536
}
},
{
"type": "block-dirty-bitmap-merge",
"data": {
"node": "libvirt-4-format",
"target": "c",
"bitmaps": [
{
"node": "libvirt-2-format",
"name": "c"
},
{
"node": "libvirt-3-format",
"name": "c"
}
]
}
}
]
merge bitmpas:
[
{
"type": "block-dirty-bitmap-add",
"data": {
"node": "libvirt-5-format",
"name": "d",
"persistent": true,
"disabled": false,
"granularity": 65536
}
},
{
"type": "block-dirty-bitmap-merge",
"data": {
"node": "libvirt-5-format",
"target": "d",
"bitmaps": [
{
"node": "libvirt-2-format",
"name": "d"
}
]
}
},
{
"type": "block-dirty-bitmap-merge",
"data": {
"node": "libvirt-5-format",
"target": "a",
"bitmaps": [
{
"node": "libvirt-2-format",
"name": "a"
},
{
"node": "libvirt-3-format",
"name": "a"
},
{
"node": "libvirt-4-format",
"name": "a"
}
]
}
},
{
"type": "block-dirty-bitmap-add",
"data": {
"node": "libvirt-5-format",
"name": "b",
"persistent": true,
"disabled": false,
"granularity": 65536
}
},
{
"type": "block-dirty-bitmap-merge",
"data": {
"node": "libvirt-5-format",
"target": "b",
"bitmaps": [
{
"node": "libvirt-2-format",
"name": "b"
},
{
"node": "libvirt-3-format",
"name": "b"
}
]
}
},
{
"type": "block-dirty-bitmap-add",
"data": {
"node": "libvirt-5-format",
"name": "c",
"persistent": true,
"disabled": false,
"granularity": 65536
}
},
{
"type": "block-dirty-bitmap-merge",
"data": {
"node": "libvirt-5-format",
"target": "c",
"bitmaps": [
{
"node": "libvirt-2-format",
"name": "c"
},
{
"node": "libvirt-3-format",
"name": "c"
}
]
}
}
]
merge bitmpas:
[
{
"type": "block-dirty-bitmap-add",
"data": {
"node": "libvirt-4-format",
"name": "c",
"persistent": true,
"disabled": false,
"granularity": 65536
}
},
{
"type": "block-dirty-bitmap-merge",
"data": {
"node": "libvirt-4-format",
"target": "c",
"bitmaps": [
{
"node": "libvirt-3-format",
"name": "c"
}
]
}
},
{
"type": "block-dirty-bitmap-add",
"data": {
"node": "libvirt-4-format",
"name": "b",
"persistent": true,
"disabled": false,
"granularity": 65536
}
},
{
"type": "block-dirty-bitmap-merge",
"data": {
"node": "libvirt-4-format",
"target": "b",
"bitmaps": [
{
"node": "libvirt-3-format",
"name": "b"
}
]
}
},
{
"type": "block-dirty-bitmap-merge",
"data": {
"node": "libvirt-4-format",
"target": "a",
"bitmaps": [
{
"node": "libvirt-3-format",
"name": "a"
}
]
}
}
]
merge bitmpas:
[
{
"type": "block-dirty-bitmap-add",
"data": {
"node": "libvirt-5-format",
"name": "c",
"persistent": true,
"disabled": false,
"granularity": 65536
}
},
{
"type": "block-dirty-bitmap-merge",
"data": {
"node": "libvirt-5-format",
"target": "c",
"bitmaps": [
{
"node": "libvirt-3-format",
"name": "c"
}
]
}
},
{
"type": "block-dirty-bitmap-add",
"data": {
"node": "libvirt-5-format",
"name": "b",
"persistent": true,
"disabled": false,
"granularity": 65536
}
},
{
"type": "block-dirty-bitmap-merge",
"data": {
"node": "libvirt-5-format",
"target": "b",
"bitmaps": [
{
"node": "libvirt-3-format",
"name": "b"
}
]
}
},
{
"type": "block-dirty-bitmap-merge",
"data": {
"node": "libvirt-5-format",
"target": "a",
"bitmaps": [
{
"node": "libvirt-3-format",
"name": "a"
},
{
"node": "libvirt-4-format",
"name": "a"
}
]
}
}
]
merge bitmpas:
[
{
"type": "block-dirty-bitmap-merge",
"data": {
"node": "libvirt-5-format",
"target": "a",
"bitmaps": [
{
"node": "libvirt-4-format",
"name": "a"
}
]
}
}
]
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册