]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
virstoragetest: Use preformatted qcow2 image for testing relative paths
authorPeter Krempa <pkrempa@redhat.com>
Wed, 8 Sep 2021 12:08:47 +0000 (14:08 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 9 Sep 2021 13:29:00 +0000 (15:29 +0200)
More preparation for eliminating image rewriting.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
tests/virstoragetest.c
tests/virstoragetestdata/images/qcow2_raw-raw-relative.qcow2 [new file with mode: 0644]
tests/virstoragetestdata/out/qcow2-auto_raw-raw-relative
tests/virstoragetestdata/out/qcow2-qcow2_raw-raw-relative

index 15296cc14f3d5eecd03feb4c4aa27a5c1ca5647e..9af87954926ac4d36165ad6695c33de91465ef0e 100644 (file)
@@ -498,8 +498,12 @@ mymain(void)
                VIR_STORAGE_FILE_AUTO, EXP_PASS);
 
     /* Qcow2 file with relative raw backing, format provided */
-    TEST_CHAIN("qcow2-qcow2_raw-raw-relative", absqcow2, VIR_STORAGE_FILE_QCOW2, EXP_PASS);
-    TEST_CHAIN("qcow2-auto_raw-raw-relative", absqcow2, VIR_STORAGE_FILE_AUTO, EXP_PASS);
+    TEST_CHAIN("qcow2-qcow2_raw-raw-relative",
+               abs_srcdir "/virstoragetestdata/images/qcow2_raw-raw-relative.qcow2",
+               VIR_STORAGE_FILE_QCOW2, EXP_PASS);
+    TEST_CHAIN("qcow2-auto_raw-raw-relative",
+               abs_srcdir "/virstoragetestdata/images/qcow2_raw-raw-relative.qcow2",
+               VIR_STORAGE_FILE_AUTO, EXP_PASS);
 
     /* Rewrite qcow2 file to use absolute backing name */
     virCommandFree(cmd);
diff --git a/tests/virstoragetestdata/images/qcow2_raw-raw-relative.qcow2 b/tests/virstoragetestdata/images/qcow2_raw-raw-relative.qcow2
new file mode 100644 (file)
index 0000000..492d9bc
Binary files /dev/null and b/tests/virstoragetestdata/images/qcow2_raw-raw-relative.qcow2 differ
index 4a01b245899a3790ceda8898a0ca148f7930ab17..f9afc138f0a4b1dc939d02bcaae3b772a151d571 100644 (file)
@@ -1,4 +1,4 @@
-path:ABS_BUILDDIR/virstoragedata/qcow2
+path:ABS_SRCDIR/virstoragetestdata/images/qcow2_raw-raw-relative.qcow2
 backingStoreRaw: <null>
 capacity: 0
 encryption: 0
index a1fb142e98aacf8c54cf0cb1c7c9714615d106b4..6e3f7ab3392e1ca1ef57b94f4d75a777fe0fecb4 100644 (file)
@@ -1,4 +1,4 @@
-path:ABS_BUILDDIR/virstoragedata/qcow2
+path:ABS_SRCDIR/virstoragetestdata/images/qcow2_raw-raw-relative.qcow2
 backingStoreRaw: raw
 capacity: 1024
 encryption: 0
@@ -8,7 +8,7 @@ format:14
 protocol:none
 hostname:<null>
 
-path:ABS_BUILDDIR/virstoragedata/raw
+path:ABS_SRCDIR/virstoragetestdata/images/raw
 backingStoreRaw: <null>
 capacity: 0
 encryption: 0