|
|
a41c76 |
From 06865f5dd0f1616a7f3ac8bc8edd259b362718ce Mon Sep 17 00:00:00 2001
|
|
|
a41c76 |
Message-Id: <06865f5dd0f1616a7f3ac8bc8edd259b362718ce@dist-git>
|
|
|
a41c76 |
From: Peter Krempa <pkrempa@redhat.com>
|
|
|
a41c76 |
Date: Tue, 4 Feb 2020 15:08:10 +0100
|
|
|
a41c76 |
Subject: [PATCH] tests: qemublock: Add few more test cases for checkpoint
|
|
|
a41c76 |
deletion
|
|
|
a41c76 |
MIME-Version: 1.0
|
|
|
a41c76 |
Content-Type: text/plain; charset=UTF-8
|
|
|
a41c76 |
Content-Transfer-Encoding: 8bit
|
|
|
a41c76 |
|
|
|
a41c76 |
Add all intermediate steps and deletion of the current checkpoint on a
|
|
|
a41c76 |
flat (single-image) disk image.
|
|
|
a41c76 |
|
|
|
a41c76 |
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
|
|
|
a41c76 |
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
|
|
a41c76 |
(cherry picked from commit 0cf33ab8f178846c0b961fbc4cc6a4e92d351310)a
|
|
|
a41c76 |
|
|
|
a41c76 |
https://bugzilla.redhat.com/show_bug.cgi?id=1207659
|
|
|
a41c76 |
Message-Id: <4b1466cba585cb4125ffda7fd2af4ab01d714f79.1580824112.git.pkrempa@redhat.com>
|
|
|
a41c76 |
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
|
|
a41c76 |
---
|
|
|
a41c76 |
tests/qemublocktest.c | 4 +++
|
|
|
a41c76 |
.../checkpointdelete/basic-current-out.json | 29 +++++++++++++++++++
|
|
|
a41c76 |
.../basic-intermediate1-out.json | 22 ++++++++++++++
|
|
|
a41c76 |
.../basic-intermediate2-out.json | 22 ++++++++++++++
|
|
|
a41c76 |
.../basic-intermediate3-out.json | 22 ++++++++++++++
|
|
|
a41c76 |
5 files changed, 99 insertions(+)
|
|
|
a41c76 |
create mode 100644 tests/qemublocktestdata/checkpointdelete/basic-current-out.json
|
|
|
a41c76 |
create mode 100644 tests/qemublocktestdata/checkpointdelete/basic-intermediate1-out.json
|
|
|
a41c76 |
create mode 100644 tests/qemublocktestdata/checkpointdelete/basic-intermediate2-out.json
|
|
|
a41c76 |
create mode 100644 tests/qemublocktestdata/checkpointdelete/basic-intermediate3-out.json
|
|
|
a41c76 |
|
|
|
a41c76 |
diff --git a/tests/qemublocktest.c b/tests/qemublocktest.c
|
|
|
a41c76 |
index 80355d1340..f48e4ce4b2 100644
|
|
|
a41c76 |
--- a/tests/qemublocktest.c
|
|
|
a41c76 |
+++ b/tests/qemublocktest.c
|
|
|
a41c76 |
@@ -999,6 +999,10 @@ mymain(void)
|
|
|
a41c76 |
} while (0)
|
|
|
a41c76 |
|
|
|
a41c76 |
TEST_CHECKPOINT_DELETE_MERGE("basic-noparent", "a", NULL);
|
|
|
a41c76 |
+ TEST_CHECKPOINT_DELETE_MERGE("basic-intermediate1", "b", "a");
|
|
|
a41c76 |
+ TEST_CHECKPOINT_DELETE_MERGE("basic-intermediate2", "c", "b");
|
|
|
a41c76 |
+ TEST_CHECKPOINT_DELETE_MERGE("basic-intermediate3", "d", "c");
|
|
|
a41c76 |
+ TEST_CHECKPOINT_DELETE_MERGE("basic-current", "current", "d");
|
|
|
a41c76 |
|
|
|
a41c76 |
cleanup:
|
|
|
a41c76 |
virHashFree(diskxmljsondata.schema);
|
|
|
a41c76 |
diff --git a/tests/qemublocktestdata/checkpointdelete/basic-current-out.json b/tests/qemublocktestdata/checkpointdelete/basic-current-out.json
|
|
|
a41c76 |
new file mode 100644
|
|
|
a41c76 |
index 0000000000..1b607567e8
|
|
|
a41c76 |
--- /dev/null
|
|
|
a41c76 |
+++ b/tests/qemublocktestdata/checkpointdelete/basic-current-out.json
|
|
|
a41c76 |
@@ -0,0 +1,29 @@
|
|
|
a41c76 |
+[
|
|
|
a41c76 |
+ {
|
|
|
a41c76 |
+ "type": "block-dirty-bitmap-enable",
|
|
|
a41c76 |
+ "data": {
|
|
|
a41c76 |
+ "node": "libvirt-1-format",
|
|
|
a41c76 |
+ "name": "d"
|
|
|
a41c76 |
+ }
|
|
|
a41c76 |
+ },
|
|
|
a41c76 |
+ {
|
|
|
a41c76 |
+ "type": "block-dirty-bitmap-merge",
|
|
|
a41c76 |
+ "data": {
|
|
|
a41c76 |
+ "node": "libvirt-1-format",
|
|
|
a41c76 |
+ "target": "d",
|
|
|
a41c76 |
+ "bitmaps": [
|
|
|
a41c76 |
+ {
|
|
|
a41c76 |
+ "node": "libvirt-1-format",
|
|
|
a41c76 |
+ "name": "current"
|
|
|
a41c76 |
+ }
|
|
|
a41c76 |
+ ]
|
|
|
a41c76 |
+ }
|
|
|
a41c76 |
+ },
|
|
|
a41c76 |
+ {
|
|
|
a41c76 |
+ "type": "block-dirty-bitmap-remove",
|
|
|
a41c76 |
+ "data": {
|
|
|
a41c76 |
+ "node": "libvirt-1-format",
|
|
|
a41c76 |
+ "name": "current"
|
|
|
a41c76 |
+ }
|
|
|
a41c76 |
+ }
|
|
|
a41c76 |
+]
|
|
|
a41c76 |
diff --git a/tests/qemublocktestdata/checkpointdelete/basic-intermediate1-out.json b/tests/qemublocktestdata/checkpointdelete/basic-intermediate1-out.json
|
|
|
a41c76 |
new file mode 100644
|
|
|
a41c76 |
index 0000000000..eccb7ed15f
|
|
|
a41c76 |
--- /dev/null
|
|
|
a41c76 |
+++ b/tests/qemublocktestdata/checkpointdelete/basic-intermediate1-out.json
|
|
|
a41c76 |
@@ -0,0 +1,22 @@
|
|
|
a41c76 |
+[
|
|
|
a41c76 |
+ {
|
|
|
a41c76 |
+ "type": "block-dirty-bitmap-merge",
|
|
|
a41c76 |
+ "data": {
|
|
|
a41c76 |
+ "node": "libvirt-1-format",
|
|
|
a41c76 |
+ "target": "a",
|
|
|
a41c76 |
+ "bitmaps": [
|
|
|
a41c76 |
+ {
|
|
|
a41c76 |
+ "node": "libvirt-1-format",
|
|
|
a41c76 |
+ "name": "b"
|
|
|
a41c76 |
+ }
|
|
|
a41c76 |
+ ]
|
|
|
a41c76 |
+ }
|
|
|
a41c76 |
+ },
|
|
|
a41c76 |
+ {
|
|
|
a41c76 |
+ "type": "block-dirty-bitmap-remove",
|
|
|
a41c76 |
+ "data": {
|
|
|
a41c76 |
+ "node": "libvirt-1-format",
|
|
|
a41c76 |
+ "name": "b"
|
|
|
a41c76 |
+ }
|
|
|
a41c76 |
+ }
|
|
|
a41c76 |
+]
|
|
|
a41c76 |
diff --git a/tests/qemublocktestdata/checkpointdelete/basic-intermediate2-out.json b/tests/qemublocktestdata/checkpointdelete/basic-intermediate2-out.json
|
|
|
a41c76 |
new file mode 100644
|
|
|
a41c76 |
index 0000000000..de40e4b5b0
|
|
|
a41c76 |
--- /dev/null
|
|
|
a41c76 |
+++ b/tests/qemublocktestdata/checkpointdelete/basic-intermediate2-out.json
|
|
|
a41c76 |
@@ -0,0 +1,22 @@
|
|
|
a41c76 |
+[
|
|
|
a41c76 |
+ {
|
|
|
a41c76 |
+ "type": "block-dirty-bitmap-merge",
|
|
|
a41c76 |
+ "data": {
|
|
|
a41c76 |
+ "node": "libvirt-1-format",
|
|
|
a41c76 |
+ "target": "b",
|
|
|
a41c76 |
+ "bitmaps": [
|
|
|
a41c76 |
+ {
|
|
|
a41c76 |
+ "node": "libvirt-1-format",
|
|
|
a41c76 |
+ "name": "c"
|
|
|
a41c76 |
+ }
|
|
|
a41c76 |
+ ]
|
|
|
a41c76 |
+ }
|
|
|
a41c76 |
+ },
|
|
|
a41c76 |
+ {
|
|
|
a41c76 |
+ "type": "block-dirty-bitmap-remove",
|
|
|
a41c76 |
+ "data": {
|
|
|
a41c76 |
+ "node": "libvirt-1-format",
|
|
|
a41c76 |
+ "name": "c"
|
|
|
a41c76 |
+ }
|
|
|
a41c76 |
+ }
|
|
|
a41c76 |
+]
|
|
|
a41c76 |
diff --git a/tests/qemublocktestdata/checkpointdelete/basic-intermediate3-out.json b/tests/qemublocktestdata/checkpointdelete/basic-intermediate3-out.json
|
|
|
a41c76 |
new file mode 100644
|
|
|
a41c76 |
index 0000000000..b5d85f43f0
|
|
|
a41c76 |
--- /dev/null
|
|
|
a41c76 |
+++ b/tests/qemublocktestdata/checkpointdelete/basic-intermediate3-out.json
|
|
|
a41c76 |
@@ -0,0 +1,22 @@
|
|
|
a41c76 |
+[
|
|
|
a41c76 |
+ {
|
|
|
a41c76 |
+ "type": "block-dirty-bitmap-merge",
|
|
|
a41c76 |
+ "data": {
|
|
|
a41c76 |
+ "node": "libvirt-1-format",
|
|
|
a41c76 |
+ "target": "c",
|
|
|
a41c76 |
+ "bitmaps": [
|
|
|
a41c76 |
+ {
|
|
|
a41c76 |
+ "node": "libvirt-1-format",
|
|
|
a41c76 |
+ "name": "d"
|
|
|
a41c76 |
+ }
|
|
|
a41c76 |
+ ]
|
|
|
a41c76 |
+ }
|
|
|
a41c76 |
+ },
|
|
|
a41c76 |
+ {
|
|
|
a41c76 |
+ "type": "block-dirty-bitmap-remove",
|
|
|
a41c76 |
+ "data": {
|
|
|
a41c76 |
+ "node": "libvirt-1-format",
|
|
|
a41c76 |
+ "name": "d"
|
|
|
a41c76 |
+ }
|
|
|
a41c76 |
+ }
|
|
|
a41c76 |
+]
|
|
|
a41c76 |
--
|
|
|
a41c76 |
2.25.0
|
|
|
a41c76 |
|