]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
virstoragetest: Format detected/unprocessed backing store format into output files
authorPeter Krempa <pkrempa@redhat.com>
Fri, 24 Nov 2023 10:22:57 +0000 (11:22 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 27 Nov 2023 09:12:34 +0000 (10:12 +0100)
Compare also the detected format of the backing file
('backingStoreRawFormat' field) into the output data for comparison with
others. Since the ToString function can't convert VIR_STORAGE_FILE_AUTO
use also the numeric value.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
17 files changed:
tests/virstoragetest.c
tests/virstoragetestdata/out/directory-dir
tests/virstoragetestdata/out/directory-none
tests/virstoragetestdata/out/directory-raw
tests/virstoragetestdata/out/qcow2-auto_qcow2-qcow2_raw-raw
tests/virstoragetestdata/out/qcow2-auto_raw-raw-relative
tests/virstoragetestdata/out/qcow2-qcow2_nbd-raw
tests/virstoragetestdata/out/qcow2-qcow2_qcow2-auto
tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_qcow2-auto
tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_raw-auto
tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_raw-raw
tests/virstoragetestdata/out/qcow2-qcow2_raw-raw-relative
tests/virstoragetestdata/out/qcow2-symlinks
tests/virstoragetestdata/out/qed-auto_raw
tests/virstoragetestdata/out/qed-qed_raw
tests/virstoragetestdata/out/raw-auto
tests/virstoragetestdata/out/raw-raw

index c7421c55de82f9df32caed46a02ffcf8271a2924..c28a23e3328cfb169743b29071d1bddec4749f65 100644 (file)
@@ -184,6 +184,7 @@ testStorageChain(const void *args)
         virBufferAsprintf(&buf,
                           "path:%s\n"
                           "backingStoreRaw: %s\n"
+                          "backingStoreRawFormat: %s(%d)\n"
                           "capacity: %lld\n"
                           "encryption: %d\n"
                           "relPath:%s\n"
@@ -193,6 +194,8 @@ testStorageChain(const void *args)
                           "hostname:%s\n\n",
                           strippedPath,
                           strippedBackingStoreRaw,
+                          NULLSTR(virStorageFileFormatTypeToString(elt->backingStoreRawFormat)),
+                          elt->backingStoreRawFormat,
                           elt->capacity,
                           !!elt->encryption,
                           strippedRelPath,
index 298c6cfb4a40d5dd07744573e8221eaec0c3b7d3..c6a2fa36737674704ddbc69e5f80609d98fe9d4f 100644 (file)
@@ -1,5 +1,6 @@
 path:ABS_SRCDIR/virstoragetestdata/images/
 backingStoreRaw: <null>
+backingStoreRawFormat: none(0)
 capacity: 0
 encryption: 0
 relPath:<null>
index 298c6cfb4a40d5dd07744573e8221eaec0c3b7d3..c6a2fa36737674704ddbc69e5f80609d98fe9d4f 100644 (file)
@@ -1,5 +1,6 @@
 path:ABS_SRCDIR/virstoragetestdata/images/
 backingStoreRaw: <null>
+backingStoreRawFormat: none(0)
 capacity: 0
 encryption: 0
 relPath:<null>
index 42589746b8b0fc9d62e95cb301e68dd861a7605f..6e190c97f42a824c02a1e378c8407d9a12ee60cf 100644 (file)
@@ -1,5 +1,6 @@
 path:ABS_SRCDIR/virstoragetestdata/images/
 backingStoreRaw: <null>
+backingStoreRawFormat: none(0)
 capacity: 0
 encryption: 0
 relPath:<null>
index 7c299542a405fd076f47f2d4e5fb07be5092b91c..0540be0c092ea40ea808319553268b4acb2dec22 100644 (file)
@@ -1,5 +1,6 @@
 path:ABS_BUILDDIR/virstoragedata/wrap
 backingStoreRaw: <null>
+backingStoreRawFormat: none(0)
 capacity: 0
 encryption: 0
 relPath:<null>
index 9f8246900d1dec0f17ddc56d7609590b94deaef0..e145cca41738f09c628401fa00bd5b153563a8a6 100644 (file)
@@ -1,5 +1,6 @@
 path:ABS_SRCDIR/virstoragetestdata/images/qcow2_raw-raw-relative.qcow2
 backingStoreRaw: <null>
+backingStoreRawFormat: none(0)
 capacity: 0
 encryption: 0
 relPath:<null>
index 761e65b23497c4c0dc32ed69f91c2cc84a65c5fd..0c2bb0ddc438906c69d66f9322eba015e8d9e82c 100644 (file)
@@ -1,5 +1,6 @@
 path:ABS_SRCDIR/virstoragetestdata/images/qcow2_nbd-raw.qcow2
 backingStoreRaw: nbd+tcp://example.org:6000/blah
+backingStoreRawFormat: raw(1)
 capacity: 1024
 encryption: 0
 relPath:<null>
@@ -10,6 +11,7 @@ hostname:<null>
 
 path:blah
 backingStoreRaw: <null>
+backingStoreRawFormat: none(0)
 capacity: 0
 encryption: 0
 relPath:<null>
index 57f2f511089c5b3f3b966109833fd0b6960828fa..58f1dd6d9e8d583bf2801cbe457239f8fbb1d084 100644 (file)
@@ -1,5 +1,6 @@
 path:ABS_SRCDIR/virstoragetestdata/images/qcow2_qcow2-auto.qcow2
 backingStoreRaw: qcow2
+backingStoreRawFormat: <null>(-1)
 capacity: 1024
 encryption: 0
 relPath:<null>
@@ -10,6 +11,7 @@ hostname:<null>
 
 path:ABS_SRCDIR/virstoragetestdata/images/qcow2
 backingStoreRaw: <null>
+backingStoreRawFormat: none(0)
 capacity: 1024
 encryption: 0
 relPath:qcow2
index 99d3c4c273c259cf73884a38e34a16c7a138211a..81263c4bc0b51978a832c85ce4b4093023f928de 100644 (file)
@@ -1,5 +1,6 @@
 path:ABS_SRCDIR/virstoragetestdata/images/qcow2_qcow2-qcow2_qcow2-auto.qcow2
 backingStoreRaw: qcow2_qcow2-auto.qcow2
+backingStoreRawFormat: qcow2(14)
 capacity: 1024
 encryption: 0
 relPath:<null>
@@ -10,6 +11,7 @@ hostname:<null>
 
 path:ABS_SRCDIR/virstoragetestdata/images/qcow2_qcow2-auto.qcow2
 backingStoreRaw: qcow2
+backingStoreRawFormat: <null>(-1)
 capacity: 1024
 encryption: 0
 relPath:qcow2_qcow2-auto.qcow2
@@ -20,6 +22,7 @@ hostname:<null>
 
 path:ABS_SRCDIR/virstoragetestdata/images/qcow2
 backingStoreRaw: <null>
+backingStoreRawFormat: none(0)
 capacity: 1024
 encryption: 0
 relPath:qcow2
index 9734cf22b920210dac90e0956bf279f3b4cad797..cbb8d6a33fa960a1e3135ba5d8ea7e13e10a8f45 100644 (file)
@@ -1,5 +1,6 @@
 path:ABS_SRCDIR/virstoragetestdata/images/qcow2_qcow2-qcow2_raw-auto.qcow2
 backingStoreRaw: qcow2_raw-auto.qcow2
+backingStoreRawFormat: qcow2(14)
 capacity: 1024
 encryption: 0
 relPath:<null>
@@ -10,6 +11,7 @@ hostname:<null>
 
 path:ABS_SRCDIR/virstoragetestdata/images/qcow2_raw-auto.qcow2
 backingStoreRaw: raw
+backingStoreRawFormat: <null>(-1)
 capacity: 1024
 encryption: 0
 relPath:qcow2_raw-auto.qcow2
@@ -20,6 +22,7 @@ hostname:<null>
 
 path:ABS_SRCDIR/virstoragetestdata/images/raw
 backingStoreRaw: <null>
+backingStoreRawFormat: none(0)
 capacity: 0
 encryption: 0
 relPath:raw
index 0c90e9858d24149b154ea5af2589c14c78d48f31..de110299226034b373247a43279518caa00c06e1 100644 (file)
@@ -1,5 +1,6 @@
 path:ABS_BUILDDIR/virstoragedata/wrap
 backingStoreRaw: ABS_BUILDDIR/virstoragedata/qcow2
+backingStoreRawFormat: qcow2(14)
 capacity: 1024
 encryption: 0
 relPath:<null>
@@ -10,6 +11,7 @@ hostname:<null>
 
 path:ABS_BUILDDIR/virstoragedata/qcow2
 backingStoreRaw: ABS_BUILDDIR/virstoragedata/raw
+backingStoreRawFormat: raw(1)
 capacity: 1024
 encryption: 0
 relPath:<null>
@@ -20,6 +22,7 @@ hostname:<null>
 
 path:ABS_BUILDDIR/virstoragedata/raw
 backingStoreRaw: <null>
+backingStoreRawFormat: none(0)
 capacity: 0
 encryption: 0
 relPath:<null>
index 552353e980734ef99ec37c509695d9c1230e3f12..b4bfd432ad8befbe1602a6e240f0afcc88704aaa 100644 (file)
@@ -1,5 +1,6 @@
 path:ABS_SRCDIR/virstoragetestdata/images/qcow2_raw-raw-relative.qcow2
 backingStoreRaw: raw
+backingStoreRawFormat: raw(1)
 capacity: 1024
 encryption: 0
 relPath:<null>
@@ -10,6 +11,7 @@ hostname:<null>
 
 path:ABS_SRCDIR/virstoragetestdata/images/raw
 backingStoreRaw: <null>
+backingStoreRawFormat: none(0)
 capacity: 0
 encryption: 0
 relPath:raw
index 8e531e4cf81e57ba3ddc92eceb8bf7f8b3ef90d9..f053f95fd78ad33b95a8655c06e8a9268c23b7c5 100644 (file)
@@ -1,5 +1,6 @@
 path:ABS_SRCDIR/virstoragetestdata/images/sub/link2
 backingStoreRaw: ../sub/link1
+backingStoreRawFormat: qcow2(14)
 capacity: 1024
 encryption: 0
 relPath:<null>
@@ -10,6 +11,7 @@ hostname:<null>
 
 path:ABS_SRCDIR/virstoragetestdata/images/sub/../sub/link1
 backingStoreRaw: ../raw
+backingStoreRawFormat: raw(1)
 capacity: 1024
 encryption: 0
 relPath:../sub/link1
@@ -20,6 +22,7 @@ hostname:<null>
 
 path:ABS_SRCDIR/virstoragetestdata/images/sub/../sub/../raw
 backingStoreRaw: <null>
+backingStoreRawFormat: none(0)
 capacity: 0
 encryption: 0
 relPath:../raw
index a75ef8189b5521bd7c7e201b9e9f08a1e78a1d57..260c3fbc7908053b86b9a20b63a2607aa107a6ad 100644 (file)
@@ -1,5 +1,6 @@
 path:ABS_SRCDIR/virstoragetestdata/images/qed_raw-raw-relative
 backingStoreRaw: <null>
+backingStoreRawFormat: none(0)
 capacity: 0
 encryption: 0
 relPath:<null>
index 18a5091e6fae88689065199a0341593d6de770aa..a13d407a5f0668c5959007e7f026b3e09ddcce4b 100644 (file)
@@ -1,5 +1,6 @@
 path:ABS_SRCDIR/virstoragetestdata/images/qed_raw-raw-relative
 backingStoreRaw: raw
+backingStoreRawFormat: raw(1)
 capacity: 1024
 encryption: 0
 relPath:<null>
@@ -10,6 +11,7 @@ hostname:<null>
 
 path:ABS_SRCDIR/virstoragetestdata/images/raw
 backingStoreRaw: <null>
+backingStoreRawFormat: none(0)
 capacity: 0
 encryption: 0
 relPath:raw
index 90a9dfcedaa103853f4df4e3e47ccb014d8c44ed..70ec22f309d0de1f3e518d378af2b38e6734a0c8 100644 (file)
@@ -1,5 +1,6 @@
 path:ABS_SRCDIR/virstoragetestdata/images/raw
 backingStoreRaw: <null>
+backingStoreRawFormat: none(0)
 capacity: 0
 encryption: 0
 relPath:<null>
index 90a9dfcedaa103853f4df4e3e47ccb014d8c44ed..70ec22f309d0de1f3e518d378af2b38e6734a0c8 100644 (file)
@@ -1,5 +1,6 @@
 path:ABS_SRCDIR/virstoragetestdata/images/raw
 backingStoreRaw: <null>
+backingStoreRawFormat: none(0)
 capacity: 0
 encryption: 0
 relPath:<null>