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, virBufferAsprintf(&buf,
"path:%s\n" "path:%s\n"
"backingStoreRaw: %s\n" "backingStoreRaw: %s\n"
"backingStoreRawFormat: %s(%d)\n"
"capacity: %lld\n" "capacity: %lld\n"
"encryption: %d\n" "encryption: %d\n"
"relPath:%s\n" "relPath:%s\n"
@ -193,6 +194,8 @@ testStorageChain(const void *args)
"hostname:%s\n\n", "hostname:%s\n\n",
strippedPath, strippedPath,
strippedBackingStoreRaw, strippedBackingStoreRaw,
NULLSTR(virStorageFileFormatTypeToString(elt->backingStoreRawFormat)),
elt->backingStoreRawFormat,
elt->capacity, elt->capacity,
!!elt->encryption, !!elt->encryption,
strippedRelPath, strippedRelPath,

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,5 +1,6 @@
path:ABS_SRCDIR/virstoragetestdata/images/qcow2_nbd-raw.qcow2 path:ABS_SRCDIR/virstoragetestdata/images/qcow2_nbd-raw.qcow2
backingStoreRaw: nbd+tcp://example.org:6000/blah backingStoreRaw: nbd+tcp://example.org:6000/blah
backingStoreRawFormat: raw(1)
capacity: 1024 capacity: 1024
encryption: 0 encryption: 0
relPath:<null> relPath:<null>
@ -10,6 +11,7 @@ hostname:<null>
path:blah path:blah
backingStoreRaw: <null> backingStoreRaw: <null>
backingStoreRawFormat: none(0)
capacity: 0 capacity: 0
encryption: 0 encryption: 0
relPath:<null> relPath:<null>

View File

@ -1,5 +1,6 @@
path:ABS_SRCDIR/virstoragetestdata/images/qcow2_qcow2-auto.qcow2 path:ABS_SRCDIR/virstoragetestdata/images/qcow2_qcow2-auto.qcow2
backingStoreRaw: qcow2 backingStoreRaw: qcow2
backingStoreRawFormat: <null>(-1)
capacity: 1024 capacity: 1024
encryption: 0 encryption: 0
relPath:<null> relPath:<null>
@ -10,6 +11,7 @@ hostname:<null>
path:ABS_SRCDIR/virstoragetestdata/images/qcow2 path:ABS_SRCDIR/virstoragetestdata/images/qcow2
backingStoreRaw: <null> backingStoreRaw: <null>
backingStoreRawFormat: none(0)
capacity: 1024 capacity: 1024
encryption: 0 encryption: 0
relPath:qcow2 relPath:qcow2

View File

@ -1,5 +1,6 @@
path:ABS_SRCDIR/virstoragetestdata/images/qcow2_qcow2-qcow2_qcow2-auto.qcow2 path:ABS_SRCDIR/virstoragetestdata/images/qcow2_qcow2-qcow2_qcow2-auto.qcow2
backingStoreRaw: qcow2_qcow2-auto.qcow2 backingStoreRaw: qcow2_qcow2-auto.qcow2
backingStoreRawFormat: qcow2(14)
capacity: 1024 capacity: 1024
encryption: 0 encryption: 0
relPath:<null> relPath:<null>
@ -10,6 +11,7 @@ hostname:<null>
path:ABS_SRCDIR/virstoragetestdata/images/qcow2_qcow2-auto.qcow2 path:ABS_SRCDIR/virstoragetestdata/images/qcow2_qcow2-auto.qcow2
backingStoreRaw: qcow2 backingStoreRaw: qcow2
backingStoreRawFormat: <null>(-1)
capacity: 1024 capacity: 1024
encryption: 0 encryption: 0
relPath:qcow2_qcow2-auto.qcow2 relPath:qcow2_qcow2-auto.qcow2
@ -20,6 +22,7 @@ hostname:<null>
path:ABS_SRCDIR/virstoragetestdata/images/qcow2 path:ABS_SRCDIR/virstoragetestdata/images/qcow2
backingStoreRaw: <null> backingStoreRaw: <null>
backingStoreRawFormat: none(0)
capacity: 1024 capacity: 1024
encryption: 0 encryption: 0
relPath:qcow2 relPath:qcow2

View File

@ -1,5 +1,6 @@
path:ABS_SRCDIR/virstoragetestdata/images/qcow2_qcow2-qcow2_raw-auto.qcow2 path:ABS_SRCDIR/virstoragetestdata/images/qcow2_qcow2-qcow2_raw-auto.qcow2
backingStoreRaw: qcow2_raw-auto.qcow2 backingStoreRaw: qcow2_raw-auto.qcow2
backingStoreRawFormat: qcow2(14)
capacity: 1024 capacity: 1024
encryption: 0 encryption: 0
relPath:<null> relPath:<null>
@ -10,6 +11,7 @@ hostname:<null>
path:ABS_SRCDIR/virstoragetestdata/images/qcow2_raw-auto.qcow2 path:ABS_SRCDIR/virstoragetestdata/images/qcow2_raw-auto.qcow2
backingStoreRaw: raw backingStoreRaw: raw
backingStoreRawFormat: <null>(-1)
capacity: 1024 capacity: 1024
encryption: 0 encryption: 0
relPath:qcow2_raw-auto.qcow2 relPath:qcow2_raw-auto.qcow2
@ -20,6 +22,7 @@ hostname:<null>
path:ABS_SRCDIR/virstoragetestdata/images/raw path:ABS_SRCDIR/virstoragetestdata/images/raw
backingStoreRaw: <null> backingStoreRaw: <null>
backingStoreRawFormat: none(0)
capacity: 0 capacity: 0
encryption: 0 encryption: 0
relPath:raw relPath:raw

View File

@ -1,5 +1,6 @@
path:ABS_BUILDDIR/virstoragedata/wrap path:ABS_BUILDDIR/virstoragedata/wrap
backingStoreRaw: ABS_BUILDDIR/virstoragedata/qcow2 backingStoreRaw: ABS_BUILDDIR/virstoragedata/qcow2
backingStoreRawFormat: qcow2(14)
capacity: 1024 capacity: 1024
encryption: 0 encryption: 0
relPath:<null> relPath:<null>
@ -10,6 +11,7 @@ hostname:<null>
path:ABS_BUILDDIR/virstoragedata/qcow2 path:ABS_BUILDDIR/virstoragedata/qcow2
backingStoreRaw: ABS_BUILDDIR/virstoragedata/raw backingStoreRaw: ABS_BUILDDIR/virstoragedata/raw
backingStoreRawFormat: raw(1)
capacity: 1024 capacity: 1024
encryption: 0 encryption: 0
relPath:<null> relPath:<null>
@ -20,6 +22,7 @@ hostname:<null>
path:ABS_BUILDDIR/virstoragedata/raw path:ABS_BUILDDIR/virstoragedata/raw
backingStoreRaw: <null> backingStoreRaw: <null>
backingStoreRawFormat: none(0)
capacity: 0 capacity: 0
encryption: 0 encryption: 0
relPath:<null> relPath:<null>

View File

@ -1,5 +1,6 @@
path:ABS_SRCDIR/virstoragetestdata/images/qcow2_raw-raw-relative.qcow2 path:ABS_SRCDIR/virstoragetestdata/images/qcow2_raw-raw-relative.qcow2
backingStoreRaw: raw backingStoreRaw: raw
backingStoreRawFormat: raw(1)
capacity: 1024 capacity: 1024
encryption: 0 encryption: 0
relPath:<null> relPath:<null>
@ -10,6 +11,7 @@ hostname:<null>
path:ABS_SRCDIR/virstoragetestdata/images/raw path:ABS_SRCDIR/virstoragetestdata/images/raw
backingStoreRaw: <null> backingStoreRaw: <null>
backingStoreRawFormat: none(0)
capacity: 0 capacity: 0
encryption: 0 encryption: 0
relPath:raw relPath:raw

View File

@ -1,5 +1,6 @@
path:ABS_SRCDIR/virstoragetestdata/images/sub/link2 path:ABS_SRCDIR/virstoragetestdata/images/sub/link2
backingStoreRaw: ../sub/link1 backingStoreRaw: ../sub/link1
backingStoreRawFormat: qcow2(14)
capacity: 1024 capacity: 1024
encryption: 0 encryption: 0
relPath:<null> relPath:<null>
@ -10,6 +11,7 @@ hostname:<null>
path:ABS_SRCDIR/virstoragetestdata/images/sub/../sub/link1 path:ABS_SRCDIR/virstoragetestdata/images/sub/../sub/link1
backingStoreRaw: ../raw backingStoreRaw: ../raw
backingStoreRawFormat: raw(1)
capacity: 1024 capacity: 1024
encryption: 0 encryption: 0
relPath:../sub/link1 relPath:../sub/link1
@ -20,6 +22,7 @@ hostname:<null>
path:ABS_SRCDIR/virstoragetestdata/images/sub/../sub/../raw path:ABS_SRCDIR/virstoragetestdata/images/sub/../sub/../raw
backingStoreRaw: <null> backingStoreRaw: <null>
backingStoreRawFormat: none(0)
capacity: 0 capacity: 0
encryption: 0 encryption: 0
relPath:../raw relPath:../raw

View File

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

View File

@ -1,5 +1,6 @@
path:ABS_SRCDIR/virstoragetestdata/images/qed_raw-raw-relative path:ABS_SRCDIR/virstoragetestdata/images/qed_raw-raw-relative
backingStoreRaw: raw backingStoreRaw: raw
backingStoreRawFormat: raw(1)
capacity: 1024 capacity: 1024
encryption: 0 encryption: 0
relPath:<null> relPath:<null>
@ -10,6 +11,7 @@ hostname:<null>
path:ABS_SRCDIR/virstoragetestdata/images/raw path:ABS_SRCDIR/virstoragetestdata/images/raw
backingStoreRaw: <null> backingStoreRaw: <null>
backingStoreRawFormat: none(0)
capacity: 0 capacity: 0
encryption: 0 encryption: 0
relPath:raw relPath:raw

View File

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

View File

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