mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-01 17:35:17 +00:00
qemublocktest: Add 'empty' case for checkpoint deletion
Use the new test data for checkpoint deletion testing. This test also requires modification of the internals to allow checking for test failure. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
218d00f443
commit
88f175d887
@ -851,14 +851,13 @@ testQemuCheckpointDeleteMerge(const void *opaque)
|
|||||||
data->parentbitmap,
|
data->parentbitmap,
|
||||||
actions,
|
actions,
|
||||||
"testdisk",
|
"testdisk",
|
||||||
&reopenimages) < 0) {
|
&reopenimages) >= 0) {
|
||||||
VIR_TEST_VERBOSE("failed to generate checkpoint delete transaction\n");
|
if (virJSONValueToBuffer(actions, &buf, true) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
} else {
|
||||||
|
virBufferAddLit(&buf, "NULL\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (virJSONValueToBuffer(actions, &buf, true) < 0)
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
if (reopenimages) {
|
if (reopenimages) {
|
||||||
virBufferAddLit(&buf, "reopen nodes:\n");
|
virBufferAddLit(&buf, "reopen nodes:\n");
|
||||||
|
|
||||||
@ -1333,6 +1332,8 @@ mymain(void)
|
|||||||
ret = -1; \
|
ret = -1; \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
|
TEST_CHECKPOINT_DELETE_MERGE("empty", "a", NULL, "empty");
|
||||||
|
|
||||||
TEST_CHECKPOINT_DELETE_MERGE("basic-noparent", "a", NULL, "basic");
|
TEST_CHECKPOINT_DELETE_MERGE("basic-noparent", "a", NULL, "basic");
|
||||||
TEST_CHECKPOINT_DELETE_MERGE("basic-intermediate1", "b", "a", "basic");
|
TEST_CHECKPOINT_DELETE_MERGE("basic-intermediate1", "b", "a", "basic");
|
||||||
TEST_CHECKPOINT_DELETE_MERGE("basic-intermediate2", "c", "b", "basic");
|
TEST_CHECKPOINT_DELETE_MERGE("basic-intermediate2", "c", "b", "basic");
|
||||||
|
1
tests/qemublocktestdata/checkpointdelete/empty-out.json
Normal file
1
tests/qemublocktestdata/checkpointdelete/empty-out.json
Normal file
@ -0,0 +1 @@
|
|||||||
|
NULL
|
Loading…
x
Reference in New Issue
Block a user