]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemublocktest: Re-introduce testing of checkpoint deletion
authorPeter Krempa <pkrempa@redhat.com>
Mon, 1 Jun 2020 08:41:16 +0000 (10:41 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 22 Jun 2020 14:04:30 +0000 (16:04 +0200)
Exercise the now arguably simpler checkpoint deletion code on the
'basic', 'snapshots', and 'synthetic' test data sets.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
16 files changed:
tests/qemublocktest.c
tests/qemublocktestdata/checkpointdelete/basic-current-out.json [new file with mode: 0644]
tests/qemublocktestdata/checkpointdelete/basic-intermediate1-out.json [new file with mode: 0644]
tests/qemublocktestdata/checkpointdelete/basic-intermediate2-out.json [new file with mode: 0644]
tests/qemublocktestdata/checkpointdelete/basic-intermediate3-out.json [new file with mode: 0644]
tests/qemublocktestdata/checkpointdelete/basic-noparent-out.json [new file with mode: 0644]
tests/qemublocktestdata/checkpointdelete/snapshots-current-out.json [new file with mode: 0644]
tests/qemublocktestdata/checkpointdelete/snapshots-intermediate1-out.json [new file with mode: 0644]
tests/qemublocktestdata/checkpointdelete/snapshots-intermediate2-out.json [new file with mode: 0644]
tests/qemublocktestdata/checkpointdelete/snapshots-intermediate3-out.json [new file with mode: 0644]
tests/qemublocktestdata/checkpointdelete/snapshots-noparent-out.json [new file with mode: 0644]
tests/qemublocktestdata/checkpointdelete/synthetic-current-out.json [new file with mode: 0644]
tests/qemublocktestdata/checkpointdelete/synthetic-intermediate1-out.json [new file with mode: 0644]
tests/qemublocktestdata/checkpointdelete/synthetic-intermediate2-out.json [new file with mode: 0644]
tests/qemublocktestdata/checkpointdelete/synthetic-intermediate3-out.json [new file with mode: 0644]
tests/qemublocktestdata/checkpointdelete/synthetic-noparent-out.json [new file with mode: 0644]

index 82297d0a8bcc081a05b1e3c2943036db7187034b..9e142a88516e8f46aec7cf40929da2be08319d9c 100644 (file)
@@ -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 (file)
index 0000000..6ed1b63
--- /dev/null
@@ -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 (file)
index 0000000..e1dd492
--- /dev/null
@@ -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 (file)
index 0000000..5638532
--- /dev/null
@@ -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 (file)
index 0000000..8c56b0e
--- /dev/null
@@ -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 (file)
index 0000000..e87382f
--- /dev/null
@@ -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 (file)
index 0000000..6ed1b63
--- /dev/null
@@ -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 (file)
index 0000000..1cde091
--- /dev/null
@@ -0,0 +1,26 @@
+[
+  {
+    "type": "block-dirty-bitmap-remove",
+    "data": {
+      "node": "libvirt-1-format",
+      "name": "b"
+    }
+  },
+  {
+    "type": "block-dirty-bitmap-remove",
+    "data": {
+      "node": "libvirt-2-format",
+      "name": "b"
+    }
+  },
+  {
+    "type": "block-dirty-bitmap-remove",
+    "data": {
+      "node": "libvirt-3-format",
+      "name": "b"
+    }
+  }
+]
+reopen nodes:
+libvirt-3-format
+libvirt-2-format
diff --git a/tests/qemublocktestdata/checkpointdelete/snapshots-intermediate2-out.json b/tests/qemublocktestdata/checkpointdelete/snapshots-intermediate2-out.json
new file mode 100644 (file)
index 0000000..6fcd7ee
--- /dev/null
@@ -0,0 +1,26 @@
+[
+  {
+    "type": "block-dirty-bitmap-remove",
+    "data": {
+      "node": "libvirt-1-format",
+      "name": "c"
+    }
+  },
+  {
+    "type": "block-dirty-bitmap-remove",
+    "data": {
+      "node": "libvirt-2-format",
+      "name": "c"
+    }
+  },
+  {
+    "type": "block-dirty-bitmap-remove",
+    "data": {
+      "node": "libvirt-3-format",
+      "name": "c"
+    }
+  }
+]
+reopen nodes:
+libvirt-3-format
+libvirt-2-format
diff --git a/tests/qemublocktestdata/checkpointdelete/snapshots-intermediate3-out.json b/tests/qemublocktestdata/checkpointdelete/snapshots-intermediate3-out.json
new file mode 100644 (file)
index 0000000..2977dc3
--- /dev/null
@@ -0,0 +1,18 @@
+[
+  {
+    "type": "block-dirty-bitmap-remove",
+    "data": {
+      "node": "libvirt-1-format",
+      "name": "d"
+    }
+  },
+  {
+    "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 (file)
index 0000000..e4a6a41
--- /dev/null
@@ -0,0 +1,42 @@
+[
+  {
+    "type": "block-dirty-bitmap-remove",
+    "data": {
+      "node": "libvirt-1-format",
+      "name": "a"
+    }
+  },
+  {
+    "type": "block-dirty-bitmap-remove",
+    "data": {
+      "node": "libvirt-2-format",
+      "name": "a"
+    }
+  },
+  {
+    "type": "block-dirty-bitmap-remove",
+    "data": {
+      "node": "libvirt-3-format",
+      "name": "a"
+    }
+  },
+  {
+    "type": "block-dirty-bitmap-remove",
+    "data": {
+      "node": "libvirt-4-format",
+      "name": "a"
+    }
+  },
+  {
+    "type": "block-dirty-bitmap-remove",
+    "data": {
+      "node": "libvirt-5-format",
+      "name": "a"
+    }
+  }
+]
+reopen nodes:
+libvirt-5-format
+libvirt-4-format
+libvirt-3-format
+libvirt-2-format
diff --git a/tests/qemublocktestdata/checkpointdelete/synthetic-current-out.json b/tests/qemublocktestdata/checkpointdelete/synthetic-current-out.json
new file mode 100644 (file)
index 0000000..6ed1b63
--- /dev/null
@@ -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 (file)
index 0000000..6eb9716
--- /dev/null
@@ -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 (file)
index 0000000..92b849c
--- /dev/null
@@ -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 (file)
index 0000000..466df52
--- /dev/null
@@ -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 (file)
index 0000000..0479815
--- /dev/null
@@ -0,0 +1,11 @@
+[
+  {
+    "type": "block-dirty-bitmap-remove",
+    "data": {
+      "node": "libvirt-5-format",
+      "name": "a"
+    }
+  }
+]
+reopen nodes:
+libvirt-5-format