for (elt = meta; virStorageSourceIsBacking(elt); elt = elt->backingStore) {
g_autofree char *strippedPath = virTestStablePath(elt->path);
g_autofree char *strippedBackingStoreRaw = virTestStablePath(elt->backingStoreRaw);
+ g_autofree char *strippedDataFileRaw = virTestStablePath(elt->dataFileRaw);
g_autofree char *strippedRelPath = virTestStablePath(elt->relPath);
virBufferAsprintf(&buf,
"path:%s\n"
"backingStoreRaw: %s\n"
"backingStoreRawFormat: %s(%d)\n"
+ "dataFileRaw: %s\n"
"capacity: %lld\n"
"encryption: %d\n"
"relPath:%s\n"
strippedBackingStoreRaw,
NULLSTR(virStorageFileFormatTypeToString(elt->backingStoreRawFormat)),
elt->backingStoreRawFormat,
+ strippedDataFileRaw,
elt->capacity,
!!elt->encryption,
strippedRelPath,
NULLSTR(elt->nhosts ? elt->hosts[0].name : NULL));
if (elt->dataFileStore) {
- g_autofree char *strippedPathDataFileRaw = virTestStablePath(elt->dataFileRaw);
g_autofree char *strippedPathDataFile = virTestStablePath(elt->dataFileStore->path);
virBufferAsprintf(&buf,
- "dataFileRaw: %s\n\n\n"
- "dataFileStoreSource:\n"
- "path: %s\n"
- "capacity: %lld\n"
- "encryption: %d\n"
- "type:%s\n"
- "format:%s\n",
- strippedPathDataFileRaw,
+ " dataFileStoreSource for '%s':\n"
+ " path: %s\n"
+ " capacity: %lld\n"
+ " encryption: %d\n"
+ " type:%s\n"
+ " format:%s\n"
+ "\n\n",
+ strippedPath,
strippedPathDataFile,
elt->dataFileStore->capacity,
!!elt->dataFileStore->encryption,
path:ABS_SRCDIR/virstoragetestdata/images/
backingStoreRaw: <null>
backingStoreRawFormat: none(0)
+dataFileRaw: <null>
capacity: 0
encryption: 0
relPath:<null>
path:ABS_SRCDIR/virstoragetestdata/images/
backingStoreRaw: <null>
backingStoreRawFormat: none(0)
+dataFileRaw: <null>
capacity: 0
encryption: 0
relPath:<null>
path:ABS_SRCDIR/virstoragetestdata/images/
backingStoreRaw: <null>
backingStoreRawFormat: none(0)
+dataFileRaw: <null>
capacity: 0
encryption: 0
relPath:<null>
path:ABS_BUILDDIR/virstoragedata/wrap
backingStoreRaw: <null>
backingStoreRawFormat: none(0)
+dataFileRaw: <null>
capacity: 0
encryption: 0
relPath:<null>
path:ABS_SRCDIR/virstoragetestdata/images/qcow2_raw-raw-relative.qcow2
backingStoreRaw: <null>
backingStoreRawFormat: none(0)
+dataFileRaw: <null>
capacity: 0
encryption: 0
relPath:<null>
path:ABS_SRCDIR/virstoragetestdata/images/datafile.qcow2
backingStoreRaw: <null>
backingStoreRawFormat: none(0)
+dataFileRaw: raw
capacity: 1024
encryption: 0
relPath:<null>
protocol:none
hostname:<null>
-dataFileRaw: raw
-
+ dataFileStoreSource for 'ABS_SRCDIR/virstoragetestdata/images/datafile.qcow2':
+ path: ABS_SRCDIR/virstoragetestdata/images/raw
+ capacity: 0
+ encryption: 0
+ type:file
+ format:raw
-dataFileStoreSource:
-path: ABS_SRCDIR/virstoragetestdata/images/raw
-capacity: 0
-encryption: 0
-type:file
-format:raw
path:ABS_SRCDIR/virstoragetestdata/images/qcow2-protocol-backing-file.qcow2
backingStoreRaw: raw
backingStoreRawFormat: raw(1)
+dataFileRaw: <null>
capacity: 1024
encryption: 0
relPath:<null>
path:ABS_SRCDIR/virstoragetestdata/images/raw
backingStoreRaw: <null>
backingStoreRawFormat: none(0)
+dataFileRaw: <null>
capacity: 0
encryption: 0
relPath:raw
path:ABS_SRCDIR/virstoragetestdata/images/qcow2-protocol-backing-nbd.qcow2
backingStoreRaw: nbd+tcp://example.org:6000/blah
backingStoreRawFormat: raw(1)
+dataFileRaw: <null>
capacity: 10485760
encryption: 0
relPath:<null>
path:blah
backingStoreRaw: <null>
backingStoreRawFormat: none(0)
+dataFileRaw: <null>
capacity: 0
encryption: 0
relPath:<null>
path:ABS_SRCDIR/virstoragetestdata/images/qcow2_nbd-raw.qcow2
backingStoreRaw: nbd+tcp://example.org:6000/blah
backingStoreRawFormat: raw(1)
+dataFileRaw: <null>
capacity: 1024
encryption: 0
relPath:<null>
path:blah
backingStoreRaw: <null>
backingStoreRawFormat: none(0)
+dataFileRaw: <null>
capacity: 0
encryption: 0
relPath:<null>
path:ABS_SRCDIR/virstoragetestdata/images/qcow2_qcow2-auto.qcow2
backingStoreRaw: qcow2
backingStoreRawFormat: <null>(-1)
+dataFileRaw: <null>
capacity: 1024
encryption: 0
relPath:<null>
path:ABS_SRCDIR/virstoragetestdata/images/qcow2
backingStoreRaw: <null>
backingStoreRawFormat: none(0)
+dataFileRaw: <null>
capacity: 1024
encryption: 0
relPath:qcow2
path:ABS_SRCDIR/virstoragetestdata/images/qcow2_qcow2-qcow2_qcow2-auto.qcow2
backingStoreRaw: qcow2_qcow2-auto.qcow2
backingStoreRawFormat: qcow2(14)
+dataFileRaw: <null>
capacity: 1024
encryption: 0
relPath:<null>
path:ABS_SRCDIR/virstoragetestdata/images/qcow2_qcow2-auto.qcow2
backingStoreRaw: qcow2
backingStoreRawFormat: <null>(-1)
+dataFileRaw: <null>
capacity: 1024
encryption: 0
relPath:qcow2_qcow2-auto.qcow2
path:ABS_SRCDIR/virstoragetestdata/images/qcow2
backingStoreRaw: <null>
backingStoreRawFormat: none(0)
+dataFileRaw: <null>
capacity: 1024
encryption: 0
relPath:qcow2
path:ABS_SRCDIR/virstoragetestdata/images/qcow2_qcow2-qcow2_raw-auto.qcow2
backingStoreRaw: qcow2_raw-auto.qcow2
backingStoreRawFormat: qcow2(14)
+dataFileRaw: <null>
capacity: 1024
encryption: 0
relPath:<null>
path:ABS_SRCDIR/virstoragetestdata/images/qcow2_raw-auto.qcow2
backingStoreRaw: raw
backingStoreRawFormat: <null>(-1)
+dataFileRaw: <null>
capacity: 1024
encryption: 0
relPath:qcow2_raw-auto.qcow2
path:ABS_SRCDIR/virstoragetestdata/images/raw
backingStoreRaw: <null>
backingStoreRawFormat: none(0)
+dataFileRaw: <null>
capacity: 0
encryption: 0
relPath:raw
path:ABS_BUILDDIR/virstoragedata/wrap
backingStoreRaw: ABS_BUILDDIR/virstoragedata/qcow2
backingStoreRawFormat: qcow2(14)
+dataFileRaw: <null>
capacity: 1024
encryption: 0
relPath:<null>
path:ABS_BUILDDIR/virstoragedata/qcow2
backingStoreRaw: ABS_BUILDDIR/virstoragedata/raw
backingStoreRawFormat: raw(1)
+dataFileRaw: <null>
capacity: 1024
encryption: 0
relPath:<null>
path:ABS_BUILDDIR/virstoragedata/raw
backingStoreRaw: <null>
backingStoreRawFormat: none(0)
+dataFileRaw: <null>
capacity: 0
encryption: 0
relPath:<null>
path:ABS_SRCDIR/virstoragetestdata/images/qcow2_raw-raw-relative.qcow2
backingStoreRaw: raw
backingStoreRawFormat: raw(1)
+dataFileRaw: <null>
capacity: 1024
encryption: 0
relPath:<null>
path:ABS_SRCDIR/virstoragetestdata/images/raw
backingStoreRaw: <null>
backingStoreRawFormat: none(0)
+dataFileRaw: <null>
capacity: 0
encryption: 0
relPath:raw
path:ABS_SRCDIR/virstoragetestdata/images/sub/link2
backingStoreRaw: ../sub/link1
backingStoreRawFormat: qcow2(14)
+dataFileRaw: <null>
capacity: 1024
encryption: 0
relPath:<null>
path:ABS_SRCDIR/virstoragetestdata/images/sub/../sub/link1
backingStoreRaw: ../raw
backingStoreRawFormat: raw(1)
+dataFileRaw: <null>
capacity: 1024
encryption: 0
relPath:../sub/link1
path:ABS_SRCDIR/virstoragetestdata/images/sub/../sub/../raw
backingStoreRaw: <null>
backingStoreRawFormat: none(0)
+dataFileRaw: <null>
capacity: 0
encryption: 0
relPath:../raw
path:ABS_SRCDIR/virstoragetestdata/images/qcow2datafile-datafile.qcow2
backingStoreRaw: datafile.qcow2
backingStoreRawFormat: qcow2(14)
+dataFileRaw: <null>
capacity: 1024
encryption: 0
relPath:<null>
path:ABS_SRCDIR/virstoragetestdata/images/datafile.qcow2
backingStoreRaw: <null>
backingStoreRawFormat: none(0)
+dataFileRaw: raw
capacity: 1024
encryption: 0
relPath:datafile.qcow2
protocol:none
hostname:<null>
-dataFileRaw: raw
-
+ dataFileStoreSource for 'ABS_SRCDIR/virstoragetestdata/images/datafile.qcow2':
+ path: ABS_SRCDIR/virstoragetestdata/images/raw
+ capacity: 0
+ encryption: 0
+ type:file
+ format:raw
-dataFileStoreSource:
-path: ABS_SRCDIR/virstoragetestdata/images/raw
-capacity: 0
-encryption: 0
-type:file
-format:raw
path:ABS_SRCDIR/virstoragetestdata/images/qed_raw-raw-relative
backingStoreRaw: <null>
backingStoreRawFormat: none(0)
+dataFileRaw: <null>
capacity: 0
encryption: 0
relPath:<null>
path:ABS_SRCDIR/virstoragetestdata/images/qed_raw-raw-relative
backingStoreRaw: raw
backingStoreRawFormat: raw(1)
+dataFileRaw: <null>
capacity: 1024
encryption: 0
relPath:<null>
path:ABS_SRCDIR/virstoragetestdata/images/raw
backingStoreRaw: <null>
backingStoreRawFormat: none(0)
+dataFileRaw: <null>
capacity: 0
encryption: 0
relPath:raw
path:ABS_SRCDIR/virstoragetestdata/images/raw
backingStoreRaw: <null>
backingStoreRawFormat: none(0)
+dataFileRaw: <null>
capacity: 0
encryption: 0
relPath:<null>
path:ABS_SRCDIR/virstoragetestdata/images/raw
backingStoreRaw: <null>
backingStoreRawFormat: none(0)
+dataFileRaw: <null>
capacity: 0
encryption: 0
relPath:<null>