tests: qemublock: Add few more test cases for checkpoint deletion

Add all intermediate steps and deletion of the current checkpoint on a
flat (single-image) disk image.

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-08 17:09:25 +01:00
parent 25f7489972
commit 0cf33ab8f1
5 changed files with 99 additions and 0 deletions

View File

@ -1003,6 +1003,10 @@ mymain(void)
} while (0)
TEST_CHECKPOINT_DELETE_MERGE("basic-noparent", "a", NULL);
TEST_CHECKPOINT_DELETE_MERGE("basic-intermediate1", "b", "a");
TEST_CHECKPOINT_DELETE_MERGE("basic-intermediate2", "c", "b");
TEST_CHECKPOINT_DELETE_MERGE("basic-intermediate3", "d", "c");
TEST_CHECKPOINT_DELETE_MERGE("basic-current", "current", "d");
cleanup:
virHashFree(diskxmljsondata.schema);

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-1-format",
"target": "a",
"bitmaps": [
{
"node": "libvirt-1-format",
"name": "b"
}
]
}
},
{
"type": "block-dirty-bitmap-remove",
"data": {
"node": "libvirt-1-format",
"name": "b"
}
}
]

View File

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

View File

@ -0,0 +1,22 @@
[
{
"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"
}
}
]