virstoragetest: Use strings for storage type and format in output data

Make it easier for the humans to read/compare the outputs.

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:14:21 +01:00
parent 60df39abc8
commit bc54376f09
17 changed files with 60 additions and 60 deletions

View File

@ -187,8 +187,8 @@ testStorageChain(const void *args)
"capacity: %lld\n" "capacity: %lld\n"
"encryption: %d\n" "encryption: %d\n"
"relPath:%s\n" "relPath:%s\n"
"type:%d\n" "type:%s\n"
"format:%d\n" "format:%s\n"
"protocol:%s\n" "protocol:%s\n"
"hostname:%s\n\n", "hostname:%s\n\n",
strippedPath, strippedPath,
@ -196,8 +196,8 @@ testStorageChain(const void *args)
elt->capacity, elt->capacity,
!!elt->encryption, !!elt->encryption,
strippedRelPath, strippedRelPath,
elt->type, NULLSTR(virStorageTypeToString(elt->type)),
elt->format, NULLSTR(virStorageFileFormatTypeToString(elt->format)),
virStorageNetProtocolTypeToString(elt->protocol), virStorageNetProtocolTypeToString(elt->protocol),
NULLSTR(elt->nhosts ? elt->hosts[0].name : NULL)); NULLSTR(elt->nhosts ? elt->hosts[0].name : NULL));
} }

View File

@ -3,7 +3,7 @@ backingStoreRaw: <null>
capacity: 0 capacity: 0
encryption: 0 encryption: 0
relPath:<null> relPath:<null>
type:3 type:dir
format:2 format:dir
protocol:none protocol:none
hostname:<null> hostname:<null>

View File

@ -3,7 +3,7 @@ backingStoreRaw: <null>
capacity: 0 capacity: 0
encryption: 0 encryption: 0
relPath:<null> relPath:<null>
type:3 type:dir
format:2 format:dir
protocol:none protocol:none
hostname:<null> hostname:<null>

View File

@ -3,7 +3,7 @@ backingStoreRaw: <null>
capacity: 0 capacity: 0
encryption: 0 encryption: 0
relPath:<null> relPath:<null>
type:3 type:dir
format:1 format:raw
protocol:none protocol:none
hostname:<null> hostname:<null>

View File

@ -3,7 +3,7 @@ backingStoreRaw: <null>
capacity: 0 capacity: 0
encryption: 0 encryption: 0
relPath:<null> relPath:<null>
type:1 type:file
format:1 format:raw
protocol:none protocol:none
hostname:<null> hostname:<null>

View File

@ -3,7 +3,7 @@ backingStoreRaw: <null>
capacity: 0 capacity: 0
encryption: 0 encryption: 0
relPath:<null> relPath:<null>
type:1 type:file
format:1 format:raw
protocol:none protocol:none
hostname:<null> hostname:<null>

View File

@ -3,8 +3,8 @@ backingStoreRaw: nbd+tcp://example.org:6000/blah
capacity: 1024 capacity: 1024
encryption: 0 encryption: 0
relPath:<null> relPath:<null>
type:1 type:file
format:14 format:qcow2
protocol:none protocol:none
hostname:<null> hostname:<null>
@ -13,7 +13,7 @@ backingStoreRaw: <null>
capacity: 0 capacity: 0
encryption: 0 encryption: 0
relPath:<null> relPath:<null>
type:4 type:network
format:1 format:raw
protocol:nbd protocol:nbd
hostname:example.org hostname:example.org

View File

@ -3,8 +3,8 @@ backingStoreRaw: qcow2
capacity: 1024 capacity: 1024
encryption: 0 encryption: 0
relPath:<null> relPath:<null>
type:1 type:file
format:14 format:qcow2
protocol:none protocol:none
hostname:<null> hostname:<null>
@ -13,7 +13,7 @@ backingStoreRaw: <null>
capacity: 1024 capacity: 1024
encryption: 0 encryption: 0
relPath:qcow2 relPath:qcow2
type:1 type:file
format:14 format:qcow2
protocol:none protocol:none
hostname:<null> hostname:<null>

View File

@ -3,8 +3,8 @@ backingStoreRaw: qcow2_qcow2-auto.qcow2
capacity: 1024 capacity: 1024
encryption: 0 encryption: 0
relPath:<null> relPath:<null>
type:1 type:file
format:14 format:qcow2
protocol:none protocol:none
hostname:<null> hostname:<null>
@ -13,8 +13,8 @@ backingStoreRaw: qcow2
capacity: 1024 capacity: 1024
encryption: 0 encryption: 0
relPath:qcow2_qcow2-auto.qcow2 relPath:qcow2_qcow2-auto.qcow2
type:1 type:file
format:14 format:qcow2
protocol:none protocol:none
hostname:<null> hostname:<null>
@ -23,7 +23,7 @@ backingStoreRaw: <null>
capacity: 1024 capacity: 1024
encryption: 0 encryption: 0
relPath:qcow2 relPath:qcow2
type:1 type:file
format:14 format:qcow2
protocol:none protocol:none
hostname:<null> hostname:<null>

View File

@ -3,8 +3,8 @@ backingStoreRaw: qcow2_raw-auto.qcow2
capacity: 1024 capacity: 1024
encryption: 0 encryption: 0
relPath:<null> relPath:<null>
type:1 type:file
format:14 format:qcow2
protocol:none protocol:none
hostname:<null> hostname:<null>
@ -13,8 +13,8 @@ backingStoreRaw: raw
capacity: 1024 capacity: 1024
encryption: 0 encryption: 0
relPath:qcow2_raw-auto.qcow2 relPath:qcow2_raw-auto.qcow2
type:1 type:file
format:14 format:qcow2
protocol:none protocol:none
hostname:<null> hostname:<null>
@ -23,7 +23,7 @@ backingStoreRaw: <null>
capacity: 0 capacity: 0
encryption: 0 encryption: 0
relPath:raw relPath:raw
type:1 type:file
format:1 format:raw
protocol:none protocol:none
hostname:<null> hostname:<null>

View File

@ -3,8 +3,8 @@ backingStoreRaw: ABS_BUILDDIR/virstoragedata/qcow2
capacity: 1024 capacity: 1024
encryption: 0 encryption: 0
relPath:<null> relPath:<null>
type:1 type:file
format:14 format:qcow2
protocol:none protocol:none
hostname:<null> hostname:<null>
@ -13,8 +13,8 @@ backingStoreRaw: ABS_BUILDDIR/virstoragedata/raw
capacity: 1024 capacity: 1024
encryption: 0 encryption: 0
relPath:<null> relPath:<null>
type:1 type:file
format:14 format:qcow2
protocol:none protocol:none
hostname:<null> hostname:<null>
@ -23,7 +23,7 @@ backingStoreRaw: <null>
capacity: 0 capacity: 0
encryption: 0 encryption: 0
relPath:<null> relPath:<null>
type:1 type:file
format:1 format:raw
protocol:none protocol:none
hostname:<null> hostname:<null>

View File

@ -3,8 +3,8 @@ backingStoreRaw: raw
capacity: 1024 capacity: 1024
encryption: 0 encryption: 0
relPath:<null> relPath:<null>
type:1 type:file
format:14 format:qcow2
protocol:none protocol:none
hostname:<null> hostname:<null>
@ -13,7 +13,7 @@ backingStoreRaw: <null>
capacity: 0 capacity: 0
encryption: 0 encryption: 0
relPath:raw relPath:raw
type:1 type:file
format:1 format:raw
protocol:none protocol:none
hostname:<null> hostname:<null>

View File

@ -3,8 +3,8 @@ backingStoreRaw: ../sub/link1
capacity: 1024 capacity: 1024
encryption: 0 encryption: 0
relPath:<null> relPath:<null>
type:1 type:file
format:14 format:qcow2
protocol:none protocol:none
hostname:<null> hostname:<null>
@ -13,8 +13,8 @@ backingStoreRaw: ../raw
capacity: 1024 capacity: 1024
encryption: 0 encryption: 0
relPath:../sub/link1 relPath:../sub/link1
type:1 type:file
format:14 format:qcow2
protocol:none protocol:none
hostname:<null> hostname:<null>
@ -23,7 +23,7 @@ backingStoreRaw: <null>
capacity: 0 capacity: 0
encryption: 0 encryption: 0
relPath:../raw relPath:../raw
type:1 type:file
format:1 format:raw
protocol:none protocol:none
hostname:<null> hostname:<null>

View File

@ -3,7 +3,7 @@ backingStoreRaw: <null>
capacity: 0 capacity: 0
encryption: 0 encryption: 0
relPath:<null> relPath:<null>
type:1 type:file
format:1 format:raw
protocol:none protocol:none
hostname:<null> hostname:<null>

View File

@ -3,8 +3,8 @@ backingStoreRaw: raw
capacity: 1024 capacity: 1024
encryption: 0 encryption: 0
relPath:<null> relPath:<null>
type:1 type:file
format:15 format:qed
protocol:none protocol:none
hostname:<null> hostname:<null>
@ -13,7 +13,7 @@ backingStoreRaw: <null>
capacity: 0 capacity: 0
encryption: 0 encryption: 0
relPath:raw relPath:raw
type:1 type:file
format:1 format:raw
protocol:none protocol:none
hostname:<null> hostname:<null>

View File

@ -3,7 +3,7 @@ backingStoreRaw: <null>
capacity: 0 capacity: 0
encryption: 0 encryption: 0
relPath:<null> relPath:<null>
type:1 type:file
format:1 format:raw
protocol:none protocol:none
hostname:<null> hostname:<null>

View File

@ -3,7 +3,7 @@ backingStoreRaw: <null>
capacity: 0 capacity: 0
encryption: 0 encryption: 0
relPath:<null> relPath:<null>
type:1 type:file
format:1 format:raw
protocol:none protocol:none
hostname:<null> hostname:<null>