[PATCH 14/24] virstoragetest: Use preformatted qcow2 image for testing relative paths

Peter Krempa pkrempa at redhat.com
Thu Sep 9 08:49:14 UTC 2021


More preparation for eliminating image rewriting.

Signed-off-by: Peter Krempa <pkrempa at redhat.com>
---
 tests/virstoragetest.c                         |   8 ++++++--
 .../images/qcow2_raw-raw-relative.qcow2        | Bin 0 -> 196616 bytes
 .../out/qcow2-auto_raw-raw-relative            |   2 +-
 .../out/qcow2-qcow2_raw-raw-relative           |   4 ++--
 4 files changed, 9 insertions(+), 5 deletions(-)
 create mode 100644 tests/virstoragetestdata/images/qcow2_raw-raw-relative.qcow2

diff --git a/tests/virstoragetest.c b/tests/virstoragetest.c
index 15296cc14f..9af8795492 100644
--- a/tests/virstoragetest.c
+++ b/tests/virstoragetest.c
@@ -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
index 0000000000000000000000000000000000000000..492d9bca1902564ba0128fee27122f5beb0e9e32
GIT binary patch
literal 196616
zcmeIuyAi at L3;<B&GeG8G5bh}109K&Mv0}zx4H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5-N0t5&UAV7cs
z0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZ
WfB*pk1PBlyK!5-N0t5*3C-4E}a0f>K

literal 0
HcmV?d00001

diff --git a/tests/virstoragetestdata/out/qcow2-auto_raw-raw-relative b/tests/virstoragetestdata/out/qcow2-auto_raw-raw-relative
index 4a01b24589..f9afc138f0 100644
--- a/tests/virstoragetestdata/out/qcow2-auto_raw-raw-relative
+++ b/tests/virstoragetestdata/out/qcow2-auto_raw-raw-relative
@@ -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
diff --git a/tests/virstoragetestdata/out/qcow2-qcow2_raw-raw-relative b/tests/virstoragetestdata/out/qcow2-qcow2_raw-raw-relative
index a1fb142e98..6e3f7ab339 100644
--- a/tests/virstoragetestdata/out/qcow2-qcow2_raw-raw-relative
+++ b/tests/virstoragetestdata/out/qcow2-qcow2_raw-raw-relative
@@ -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
-- 
2.31.1




More information about the libvir-list mailing list