Exercise the now arguably simpler checkpoint deletion code on the 'basic', 'snapshots', and 'synthetic' test data sets. Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx> --- tests/qemublocktest.c | 18 ++++++++++++++++++ .../checkpointdelete/basic-current-out.json | 9 +++++++++ .../basic-intermediate1-out.json | 9 +++++++++ .../basic-intermediate2-out.json | 9 +++++++++ .../basic-intermediate3-out.json | 9 +++++++++ .../checkpointdelete/basic-noparent-out.json | 9 +++++++++ .../snapshots-current-out.json | 9 +++++++++ .../snapshots-intermediate1-out.json | 11 +++++++++++ .../snapshots-intermediate2-out.json | 11 +++++++++++ .../snapshots-intermediate3-out.json | 11 +++++++++++ .../snapshots-noparent-out.json | 11 +++++++++++ .../synthetic-current-out.json | 9 +++++++++ .../synthetic-intermediate1-out.json | 11 +++++++++++ .../synthetic-intermediate2-out.json | 11 +++++++++++ .../synthetic-intermediate3-out.json | 19 +++++++++++++++++++ .../synthetic-noparent-out.json | 11 +++++++++++ 16 files changed, 177 insertions(+) create mode 100644 tests/qemublocktestdata/checkpointdelete/basic-current-out.json create mode 100644 tests/qemublocktestdata/checkpointdelete/basic-intermediate1-out.json create mode 100644 tests/qemublocktestdata/checkpointdelete/basic-intermediate2-out.json create mode 100644 tests/qemublocktestdata/checkpointdelete/basic-intermediate3-out.json create mode 100644 tests/qemublocktestdata/checkpointdelete/basic-noparent-out.json create mode 100644 tests/qemublocktestdata/checkpointdelete/snapshots-current-out.json create mode 100644 tests/qemublocktestdata/checkpointdelete/snapshots-intermediate1-out.json create mode 100644 tests/qemublocktestdata/checkpointdelete/snapshots-intermediate2-out.json create mode 100644 tests/qemublocktestdata/checkpointdelete/snapshots-intermediate3-out.json create mode 100644 tests/qemublocktestdata/checkpointdelete/snapshots-noparent-out.json create mode 100644 tests/qemublocktestdata/checkpointdelete/synthetic-current-out.json create mode 100644 tests/qemublocktestdata/checkpointdelete/synthetic-intermediate1-out.json create mode 100644 tests/qemublocktestdata/checkpointdelete/synthetic-intermediate2-out.json create mode 100644 tests/qemublocktestdata/checkpointdelete/synthetic-intermediate3-out.json create mode 100644 tests/qemublocktestdata/checkpointdelete/synthetic-noparent-out.json diff --git a/tests/qemublocktest.c b/tests/qemublocktest.c index f7773f4a51..c10eabb6a0 100644 --- a/tests/qemublocktest.c +++ b/tests/qemublocktest.c @@ -1330,6 +1330,24 @@ mymain(void) TEST_CHECKPOINT_DELETE("empty", "a", "empty"); + TEST_CHECKPOINT_DELETE("basic-noparent", "a", "basic"); + TEST_CHECKPOINT_DELETE("basic-intermediate1", "b", "basic"); + TEST_CHECKPOINT_DELETE("basic-intermediate2", "c", "basic"); + TEST_CHECKPOINT_DELETE("basic-intermediate3", "d", "basic"); + TEST_CHECKPOINT_DELETE("basic-current", "current", "basic"); + + TEST_CHECKPOINT_DELETE("snapshots-noparent", "a", "snapshots"); + TEST_CHECKPOINT_DELETE("snapshots-intermediate1", "b", "snapshots"); + TEST_CHECKPOINT_DELETE("snapshots-intermediate2", "c", "snapshots"); + TEST_CHECKPOINT_DELETE("snapshots-intermediate3", "d", "snapshots"); + TEST_CHECKPOINT_DELETE("snapshots-current", "current", "snapshots"); + + TEST_CHECKPOINT_DELETE("synthetic-noparent", "a", "synthetic"); + TEST_CHECKPOINT_DELETE("synthetic-intermediate1", "b", "synthetic"); + TEST_CHECKPOINT_DELETE("synthetic-intermediate2", "c", "synthetic"); + TEST_CHECKPOINT_DELETE("synthetic-intermediate3", "d", "synthetic"); + TEST_CHECKPOINT_DELETE("synthetic-current", "current", "synthetic"); + #define TEST_BITMAP_VALIDATE(testname, bitmap, rc) \ do { \ blockbitmapvalidatedata.name = testname; \ diff --git a/tests/qemublocktestdata/checkpointdelete/basic-current-out.json b/tests/qemublocktestdata/checkpointdelete/basic-current-out.json new file mode 100644 index 0000000000..6ed1b63b66 --- /dev/null +++ b/tests/qemublocktestdata/checkpointdelete/basic-current-out.json @@ -0,0 +1,9 @@ +[ + { + "type": "block-dirty-bitmap-remove", + "data": { + "node": "libvirt-1-format", + "name": "current" + } + } +] diff --git a/tests/qemublocktestdata/checkpointdelete/basic-intermediate1-out.json b/tests/qemublocktestdata/checkpointdelete/basic-intermediate1-out.json new file mode 100644 index 0000000000..e1dd4920cd --- /dev/null +++ b/tests/qemublocktestdata/checkpointdelete/basic-intermediate1-out.json @@ -0,0 +1,9 @@ +[ + { + "type": "block-dirty-bitmap-remove", + "data": { + "node": "libvirt-1-format", + "name": "b" + } + } +] diff --git a/tests/qemublocktestdata/checkpointdelete/basic-intermediate2-out.json b/tests/qemublocktestdata/checkpointdelete/basic-intermediate2-out.json new file mode 100644 index 0000000000..5638532d35 --- /dev/null +++ b/tests/qemublocktestdata/checkpointdelete/basic-intermediate2-out.json @@ -0,0 +1,9 @@ +[ + { + "type": "block-dirty-bitmap-remove", + "data": { + "node": "libvirt-1-format", + "name": "c" + } + } +] diff --git a/tests/qemublocktestdata/checkpointdelete/basic-intermediate3-out.json b/tests/qemublocktestdata/checkpointdelete/basic-intermediate3-out.json new file mode 100644 index 0000000000..8c56b0e689 --- /dev/null +++ b/tests/qemublocktestdata/checkpointdelete/basic-intermediate3-out.json @@ -0,0 +1,9 @@ +[ + { + "type": "block-dirty-bitmap-remove", + "data": { + "node": "libvirt-1-format", + "name": "d" + } + } +] diff --git a/tests/qemublocktestdata/checkpointdelete/basic-noparent-out.json b/tests/qemublocktestdata/checkpointdelete/basic-noparent-out.json new file mode 100644 index 0000000000..e87382fdb4 --- /dev/null +++ b/tests/qemublocktestdata/checkpointdelete/basic-noparent-out.json @@ -0,0 +1,9 @@ +[ + { + "type": "block-dirty-bitmap-remove", + "data": { + "node": "libvirt-1-format", + "name": "a" + } + } +] diff --git a/tests/qemublocktestdata/checkpointdelete/snapshots-current-out.json b/tests/qemublocktestdata/checkpointdelete/snapshots-current-out.json new file mode 100644 index 0000000000..6ed1b63b66 --- /dev/null +++ b/tests/qemublocktestdata/checkpointdelete/snapshots-current-out.json @@ -0,0 +1,9 @@ +[ + { + "type": "block-dirty-bitmap-remove", + "data": { + "node": "libvirt-1-format", + "name": "current" + } + } +] diff --git a/tests/qemublocktestdata/checkpointdelete/snapshots-intermediate1-out.json b/tests/qemublocktestdata/checkpointdelete/snapshots-intermediate1-out.json new file mode 100644 index 0000000000..6eb9716aaa --- /dev/null +++ b/tests/qemublocktestdata/checkpointdelete/snapshots-intermediate1-out.json @@ -0,0 +1,11 @@ +[ + { + "type": "block-dirty-bitmap-remove", + "data": { + "node": "libvirt-3-format", + "name": "b" + } + } +] +reopen nodes: +libvirt-3-format diff --git a/tests/qemublocktestdata/checkpointdelete/snapshots-intermediate2-out.json b/tests/qemublocktestdata/checkpointdelete/snapshots-intermediate2-out.json new file mode 100644 index 0000000000..92b849cfc9 --- /dev/null +++ b/tests/qemublocktestdata/checkpointdelete/snapshots-intermediate2-out.json @@ -0,0 +1,11 @@ +[ + { + "type": "block-dirty-bitmap-remove", + "data": { + "node": "libvirt-3-format", + "name": "c" + } + } +] +reopen nodes: +libvirt-3-format diff --git a/tests/qemublocktestdata/checkpointdelete/snapshots-intermediate3-out.json b/tests/qemublocktestdata/checkpointdelete/snapshots-intermediate3-out.json new file mode 100644 index 0000000000..1e8e79b1f6 --- /dev/null +++ b/tests/qemublocktestdata/checkpointdelete/snapshots-intermediate3-out.json @@ -0,0 +1,11 @@ +[ + { + "type": "block-dirty-bitmap-remove", + "data": { + "node": "libvirt-2-format", + "name": "d" + } + } +] +reopen nodes: +libvirt-2-format diff --git a/tests/qemublocktestdata/checkpointdelete/snapshots-noparent-out.json b/tests/qemublocktestdata/checkpointdelete/snapshots-noparent-out.json new file mode 100644 index 0000000000..0479815f36 --- /dev/null +++ b/tests/qemublocktestdata/checkpointdelete/snapshots-noparent-out.json @@ -0,0 +1,11 @@ +[ + { + "type": "block-dirty-bitmap-remove", + "data": { + "node": "libvirt-5-format", + "name": "a" + } + } +] +reopen nodes: +libvirt-5-format diff --git a/tests/qemublocktestdata/checkpointdelete/synthetic-current-out.json b/tests/qemublocktestdata/checkpointdelete/synthetic-current-out.json new file mode 100644 index 0000000000..6ed1b63b66 --- /dev/null +++ b/tests/qemublocktestdata/checkpointdelete/synthetic-current-out.json @@ -0,0 +1,9 @@ +[ + { + "type": "block-dirty-bitmap-remove", + "data": { + "node": "libvirt-1-format", + "name": "current" + } + } +] diff --git a/tests/qemublocktestdata/checkpointdelete/synthetic-intermediate1-out.json b/tests/qemublocktestdata/checkpointdelete/synthetic-intermediate1-out.json new file mode 100644 index 0000000000..6eb9716aaa --- /dev/null +++ b/tests/qemublocktestdata/checkpointdelete/synthetic-intermediate1-out.json @@ -0,0 +1,11 @@ +[ + { + "type": "block-dirty-bitmap-remove", + "data": { + "node": "libvirt-3-format", + "name": "b" + } + } +] +reopen nodes: +libvirt-3-format diff --git a/tests/qemublocktestdata/checkpointdelete/synthetic-intermediate2-out.json b/tests/qemublocktestdata/checkpointdelete/synthetic-intermediate2-out.json new file mode 100644 index 0000000000..92b849cfc9 --- /dev/null +++ b/tests/qemublocktestdata/checkpointdelete/synthetic-intermediate2-out.json @@ -0,0 +1,11 @@ +[ + { + "type": "block-dirty-bitmap-remove", + "data": { + "node": "libvirt-3-format", + "name": "c" + } + } +] +reopen nodes: +libvirt-3-format diff --git a/tests/qemublocktestdata/checkpointdelete/synthetic-intermediate3-out.json b/tests/qemublocktestdata/checkpointdelete/synthetic-intermediate3-out.json new file mode 100644 index 0000000000..466df52007 --- /dev/null +++ b/tests/qemublocktestdata/checkpointdelete/synthetic-intermediate3-out.json @@ -0,0 +1,19 @@ +[ + { + "type": "block-dirty-bitmap-remove", + "data": { + "node": "libvirt-2-format", + "name": "d" + } + }, + { + "type": "block-dirty-bitmap-remove", + "data": { + "node": "libvirt-3-format", + "name": "d" + } + } +] +reopen nodes: +libvirt-3-format +libvirt-2-format diff --git a/tests/qemublocktestdata/checkpointdelete/synthetic-noparent-out.json b/tests/qemublocktestdata/checkpointdelete/synthetic-noparent-out.json new file mode 100644 index 0000000000..0479815f36 --- /dev/null +++ b/tests/qemublocktestdata/checkpointdelete/synthetic-noparent-out.json @@ -0,0 +1,11 @@ +[ + { + "type": "block-dirty-bitmap-remove", + "data": { + "node": "libvirt-5-format", + "name": "a" + } + } +] +reopen nodes: +libvirt-5-format -- 2.26.2