]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
virstoragetest: Use existing file for testing 'raw' image lookup
authorPeter Krempa <pkrempa@redhat.com>
Wed, 8 Sep 2021 12:01:42 +0000 (14:01 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 9 Sep 2021 13:29:00 +0000 (15:29 +0200)
We've already added a 'raw' file to the example image directory so we
can use that instead of formatting one.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
tests/virstoragetest.c
tests/virstoragetestdata/out/raw-auto
tests/virstoragetestdata/out/raw-raw

index 34aff3e6ddc9a6ab55975824919583de79a00121..dcb5a8a4270ab6223b724d0b3b1352b890f319b3 100644 (file)
@@ -504,8 +504,12 @@ mymain(void)
     TEST_CHAIN("missing", "bogus", VIR_STORAGE_FILE_RAW, EXP_FAIL);
 
     /* Raw image, whether with right format or no specified format */
-    TEST_CHAIN("raw-raw", absraw, VIR_STORAGE_FILE_RAW, EXP_PASS);
-    TEST_CHAIN("raw-auto", absraw, VIR_STORAGE_FILE_AUTO, EXP_PASS);
+    TEST_CHAIN("raw-raw",
+               abs_srcdir "/virstoragetestdata/images/raw",
+               VIR_STORAGE_FILE_RAW, EXP_PASS);
+    TEST_CHAIN("raw-auto",
+               abs_srcdir "/virstoragetestdata/images/raw",
+               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);
index 8d6c525896520b3c5a43ac26c152ff683888f4a0..d98b6e8bf59269306bb03b1c02291122e796f9a5 100644 (file)
@@ -1,4 +1,4 @@
-path:ABS_BUILDDIR/virstoragedata/raw
+path:ABS_SRCDIR/virstoragetestdata/images/raw
 backingStoreRaw: <null>
 capacity: 0
 encryption: 0
index 8d6c525896520b3c5a43ac26c152ff683888f4a0..d98b6e8bf59269306bb03b1c02291122e796f9a5 100644 (file)
@@ -1,4 +1,4 @@
-path:ABS_BUILDDIR/virstoragedata/raw
+path:ABS_SRCDIR/virstoragetestdata/images/raw
 backingStoreRaw: <null>
 capacity: 0
 encryption: 0