virstoragetest: Format detected/unprocessed backing store format into output files

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>
This commit is contained in:
Peter Krempa 2023-11-24 11:22:57 +01:00
parent bc54376f09
commit 7e158006b6
17 changed files with 31 additions and 0 deletions

View 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,

View File

@ -1,5 +1,6 @@
path:ABS_SRCDIR/virstoragetestdata/images/
backingStoreRaw: <null>
backingStoreRawFormat: none(0)
capacity: 0
encryption: 0
relPath:<null>

View File

@ -1,5 +1,6 @@
path:ABS_SRCDIR/virstoragetestdata/images/
backingStoreRaw: <null>
backingStoreRawFormat: none(0)
capacity: 0
encryption: 0
relPath:<null>

View File

@ -1,5 +1,6 @@
path:ABS_SRCDIR/virstoragetestdata/images/
backingStoreRaw: <null>
backingStoreRawFormat: none(0)
capacity: 0
encryption: 0
relPath:<null>

View File

@ -1,5 +1,6 @@
path:ABS_BUILDDIR/virstoragedata/wrap
backingStoreRaw: <null>
backingStoreRawFormat: none(0)
capacity: 0
encryption: 0
relPath:<null>

View 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>

View 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>

View 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

View 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

View 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

View 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>

View 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

View 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

View 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>

View 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

View File

@ -1,5 +1,6 @@
path:ABS_SRCDIR/virstoragetestdata/images/raw
backingStoreRaw: <null>
backingStoreRawFormat: none(0)
capacity: 0
encryption: 0
relPath:<null>

View File

@ -1,5 +1,6 @@
path:ABS_SRCDIR/virstoragetestdata/images/raw
backingStoreRaw: <null>
backingStoreRawFormat: none(0)
capacity: 0
encryption: 0
relPath:<null>