]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
virstoragetest: Unify testing of QCOW2 images with absolute backing
authorPeter Krempa <pkrempa@redhat.com>
Wed, 8 Sep 2021 14:44:13 +0000 (16:44 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 9 Sep 2021 13:29:00 +0000 (15:29 +0200)
We have 3 test cases for this currently:

1) "qcow2->raw"
 1.1) VIR_STORAGE_FILE_QCOW2 as top level format
 1.2) VIR_STORAGE_FILE_AUTO as top level format
2) "wrap->qcow2->raw" whith just VIR_STORAGE_FILE_QCOW2

This patch adds also testing of VIR_STORAGE_FILE_AUTO for case 2) and
removes both 1) subcases as they are being actually tested as part of
2).

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
tests/virstoragetest.c
tests/virstoragetestdata/out/qcow2-auto_qcow2-qcow2_raw-raw [moved from tests/virstoragetestdata/out/qcow2-auto_raw-raw with 74% similarity]
tests/virstoragetestdata/out/qcow2-qcow2_raw-raw [deleted file]

index 9af87954926ac4d36165ad6695c33de91465ef0e..475ff23ce08b9dd6388c1288d0a58683ce3e73f1 100644 (file)
@@ -512,12 +512,9 @@ mymain(void)
     if (virCommandRun(cmd, NULL) < 0)
         ret = -1;
 
-    /* Qcow2 file with raw as absolute backing, backing format provided */
-    TEST_CHAIN("qcow2-qcow2_raw-raw", absqcow2, VIR_STORAGE_FILE_QCOW2, EXP_PASS);
-    TEST_CHAIN("qcow2-auto_raw-raw", absqcow2, VIR_STORAGE_FILE_AUTO, EXP_PASS);
-
-    /* qcow2 with a longer backing chain */
+    /* qcow2 chain with absolute backing formatted with a real qemu-img */
     TEST_CHAIN("qcow2-qcow2_qcow2-qcow2_raw-raw", abswrap, VIR_STORAGE_FILE_QCOW2, EXP_PASS);
+    TEST_CHAIN("qcow2-auto_qcow2-qcow2_raw-raw", abswrap, VIR_STORAGE_FILE_AUTO, EXP_PASS);
 
     /* Qcow2 file with missing backing file but specified type */
     TEST_CHAIN("qcow2-qcow2_missing",
similarity index 74%
rename from tests/virstoragetestdata/out/qcow2-auto_raw-raw
rename to tests/virstoragetestdata/out/qcow2-auto_qcow2-qcow2_raw-raw
index 4a01b245899a3790ceda8898a0ca148f7930ab17..2ea087592e4ffe88ee1767236d8ef8cbc607cb5e 100644 (file)
@@ -1,4 +1,4 @@
-path:ABS_BUILDDIR/virstoragedata/qcow2
+path:ABS_BUILDDIR/virstoragedata/wrap
 backingStoreRaw: <null>
 capacity: 0
 encryption: 0
diff --git a/tests/virstoragetestdata/out/qcow2-qcow2_raw-raw b/tests/virstoragetestdata/out/qcow2-qcow2_raw-raw
deleted file mode 100644 (file)
index 57ce62a..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-path:ABS_BUILDDIR/virstoragedata/qcow2
-backingStoreRaw: ABS_BUILDDIR/virstoragedata/raw
-capacity: 1024
-encryption: 0
-relPath:<null>
-type:1
-format:14
-protocol:none
-hostname:<null>
-
-path:ABS_BUILDDIR/virstoragedata/raw
-backingStoreRaw: <null>
-capacity: 0
-encryption: 0
-relPath:<null>
-type:1
-format:1
-protocol:none
-hostname:<null>