On 3/11/20 7:55 AM, Peter Krempa wrote:
Test handling of more complex cases of merging bitmaps accross
across
snapshots. Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx> --- tests/qemublocktest.c | 15 ++ .../bitmapblockcommit/snapshots-1-2 | 49 +++++++ .../bitmapblockcommit/snapshots-1-3 | 76 ++++++++++ .../bitmapblockcommit/snapshots-1-4 | 126 +++++++++++++++++ .../bitmapblockcommit/snapshots-1-5 | 130 ++++++++++++++++++ .../bitmapblockcommit/snapshots-2-3 | 49 +++++++ .../bitmapblockcommit/snapshots-2-4 | 99 +++++++++++++ .../bitmapblockcommit/snapshots-2-5 | 103 ++++++++++++++ .../bitmapblockcommit/snapshots-3-4 | 72 ++++++++++ .../bitmapblockcommit/snapshots-3-5 | 76 ++++++++++ .../bitmapblockcommit/snapshots-4-4 | 11 ++
Is this merging a snapshot to itself?
.../bitmapblockcommit/snapshots-4-5 | 33 +++++
Otherwise this looks like you are covering every pair possible.
+++ b/tests/qemublocktest.c @@ -1291,6 +1291,21 @@ 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");
Hmm - you don't even have "snapshots-4-4" as a stem here. Did you add an accidental file?
diff --git a/tests/qemublocktestdata/bitmapblockcommit/snapshots-4-4 b/tests/qemublocktestdata/bitmapblockcommit/snapshots-4-4 new file mode 100644 index 0000000000..a445fd7c49 --- /dev/null +++ b/tests/qemublocktestdata/bitmapblockcommit/snapshots-4-4 @@ -0,0 +1,11 @@ +pre job bitmap disable: +[ + { + "type": "block-dirty-bitmap-disable", + "data": { + "node": "libvirt-5-format", + "name": "a" + } + } +] +merge bitmpas: diff --git a/tests/qemublocktestdata/bitmapblockcommit/snapshots-4-5 b/tests/qemublocktestdata/bitmapblockcommit/snapshots-4-5
Otherwise, makes sense. Reviewed-by: Eric Blake <eblake@xxxxxxxxxx> -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org