From: Peter Krempa <pkrempa(a)redhat.com>
Move the 'dataFileRaw' field to the main block as it's based on the data
in the qcow2 header same as 'backingStoreRaw'.
Indent and annotate the corresponding dataFile block to show where it
belongs.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
tests/virstoragetest.c | 20 ++++++++++---------
tests/virstoragetestdata/out/directory-dir | 1 +
tests/virstoragetestdata/out/directory-none | 1 +
tests/virstoragetestdata/out/directory-raw | 1 +
.../out/qcow2-auto_qcow2-qcow2_raw-raw | 1 +
.../out/qcow2-auto_raw-raw-relative | 1 +
tests/virstoragetestdata/out/qcow2-datafile | 15 +++++++-------
.../out/qcow2-protocol-backing-file | 2 ++
.../out/qcow2-protocol-backing-nbd | 2 ++
.../out/qcow2-qcow2_nbd-raw | 2 ++
.../out/qcow2-qcow2_qcow2-auto | 2 ++
.../out/qcow2-qcow2_qcow2-qcow2_qcow2-auto | 3 +++
.../out/qcow2-qcow2_qcow2-qcow2_raw-auto | 3 +++
.../out/qcow2-qcow2_qcow2-qcow2_raw-raw | 3 +++
.../out/qcow2-qcow2_raw-raw-relative | 2 ++
tests/virstoragetestdata/out/qcow2-symlinks | 3 +++
.../out/qcow2datafile-qcow2_qcow2-datafile | 16 +++++++--------
tests/virstoragetestdata/out/qed-auto_raw | 1 +
tests/virstoragetestdata/out/qed-qed_raw | 2 ++
tests/virstoragetestdata/out/raw-auto | 1 +
tests/virstoragetestdata/out/raw-raw | 1 +
21 files changed, 58 insertions(+), 25 deletions(-)
diff --git a/tests/virstoragetest.c b/tests/virstoragetest.c
index 78dc644637..e568bd3141 100644
--- a/tests/virstoragetest.c
+++ b/tests/virstoragetest.c
@@ -179,12 +179,14 @@ testStorageChain(const void *args)
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"
@@ -196,6 +198,7 @@ testStorageChain(const void *args)
strippedBackingStoreRaw,
NULLSTR(virStorageFileFormatTypeToString(elt->backingStoreRawFormat)),
elt->backingStoreRawFormat,
+ strippedDataFileRaw,
elt->capacity,
!!elt->encryption,
strippedRelPath,
@@ -205,18 +208,17 @@ testStorageChain(const void *args)
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,
diff --git a/tests/virstoragetestdata/out/directory-dir
b/tests/virstoragetestdata/out/directory-dir
index c6a2fa3673..ea3bb90191 100644
--- a/tests/virstoragetestdata/out/directory-dir
+++ b/tests/virstoragetestdata/out/directory-dir
@@ -1,6 +1,7 @@
path:ABS_SRCDIR/virstoragetestdata/images/
backingStoreRaw: <null>
backingStoreRawFormat: none(0)
+dataFileRaw: <null>
capacity: 0
encryption: 0
relPath:<null>
diff --git a/tests/virstoragetestdata/out/directory-none
b/tests/virstoragetestdata/out/directory-none
index c6a2fa3673..ea3bb90191 100644
--- a/tests/virstoragetestdata/out/directory-none
+++ b/tests/virstoragetestdata/out/directory-none
@@ -1,6 +1,7 @@
path:ABS_SRCDIR/virstoragetestdata/images/
backingStoreRaw: <null>
backingStoreRawFormat: none(0)
+dataFileRaw: <null>
capacity: 0
encryption: 0
relPath:<null>
diff --git a/tests/virstoragetestdata/out/directory-raw
b/tests/virstoragetestdata/out/directory-raw
index 6e190c97f4..a0b9f882ed 100644
--- a/tests/virstoragetestdata/out/directory-raw
+++ b/tests/virstoragetestdata/out/directory-raw
@@ -1,6 +1,7 @@
path:ABS_SRCDIR/virstoragetestdata/images/
backingStoreRaw: <null>
backingStoreRawFormat: none(0)
+dataFileRaw: <null>
capacity: 0
encryption: 0
relPath:<null>
diff --git a/tests/virstoragetestdata/out/qcow2-auto_qcow2-qcow2_raw-raw
b/tests/virstoragetestdata/out/qcow2-auto_qcow2-qcow2_raw-raw
index 0540be0c09..14d9eb987b 100644
--- a/tests/virstoragetestdata/out/qcow2-auto_qcow2-qcow2_raw-raw
+++ b/tests/virstoragetestdata/out/qcow2-auto_qcow2-qcow2_raw-raw
@@ -1,6 +1,7 @@
path:ABS_BUILDDIR/virstoragedata/wrap
backingStoreRaw: <null>
backingStoreRawFormat: none(0)
+dataFileRaw: <null>
capacity: 0
encryption: 0
relPath:<null>
diff --git a/tests/virstoragetestdata/out/qcow2-auto_raw-raw-relative
b/tests/virstoragetestdata/out/qcow2-auto_raw-raw-relative
index e145cca417..b99f64ee97 100644
--- a/tests/virstoragetestdata/out/qcow2-auto_raw-raw-relative
+++ b/tests/virstoragetestdata/out/qcow2-auto_raw-raw-relative
@@ -1,6 +1,7 @@
path:ABS_SRCDIR/virstoragetestdata/images/qcow2_raw-raw-relative.qcow2
backingStoreRaw: <null>
backingStoreRawFormat: none(0)
+dataFileRaw: <null>
capacity: 0
encryption: 0
relPath:<null>
diff --git a/tests/virstoragetestdata/out/qcow2-datafile
b/tests/virstoragetestdata/out/qcow2-datafile
index d0f46f7e1b..c395f7f65c 100644
--- a/tests/virstoragetestdata/out/qcow2-datafile
+++ b/tests/virstoragetestdata/out/qcow2-datafile
@@ -1,6 +1,7 @@
path:ABS_SRCDIR/virstoragetestdata/images/datafile.qcow2
backingStoreRaw: <null>
backingStoreRawFormat: none(0)
+dataFileRaw: raw
capacity: 1024
encryption: 0
relPath:<null>
@@ -9,12 +10,10 @@ format: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
diff --git a/tests/virstoragetestdata/out/qcow2-protocol-backing-file
b/tests/virstoragetestdata/out/qcow2-protocol-backing-file
index d9d4c1316c..d0bf411552 100644
--- a/tests/virstoragetestdata/out/qcow2-protocol-backing-file
+++ b/tests/virstoragetestdata/out/qcow2-protocol-backing-file
@@ -1,6 +1,7 @@
path:ABS_SRCDIR/virstoragetestdata/images/qcow2-protocol-backing-file.qcow2
backingStoreRaw: raw
backingStoreRawFormat: raw(1)
+dataFileRaw: <null>
capacity: 1024
encryption: 0
relPath:<null>
@@ -12,6 +13,7 @@ hostname:<null>
path:ABS_SRCDIR/virstoragetestdata/images/raw
backingStoreRaw: <null>
backingStoreRawFormat: none(0)
+dataFileRaw: <null>
capacity: 0
encryption: 0
relPath:raw
diff --git a/tests/virstoragetestdata/out/qcow2-protocol-backing-nbd
b/tests/virstoragetestdata/out/qcow2-protocol-backing-nbd
index 360a496ab0..d41a8538a6 100644
--- a/tests/virstoragetestdata/out/qcow2-protocol-backing-nbd
+++ b/tests/virstoragetestdata/out/qcow2-protocol-backing-nbd
@@ -1,6 +1,7 @@
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>
@@ -12,6 +13,7 @@ hostname:<null>
path:blah
backingStoreRaw: <null>
backingStoreRawFormat: none(0)
+dataFileRaw: <null>
capacity: 0
encryption: 0
relPath:<null>
diff --git a/tests/virstoragetestdata/out/qcow2-qcow2_nbd-raw
b/tests/virstoragetestdata/out/qcow2-qcow2_nbd-raw
index 0c2bb0ddc4..1ec84d771e 100644
--- a/tests/virstoragetestdata/out/qcow2-qcow2_nbd-raw
+++ b/tests/virstoragetestdata/out/qcow2-qcow2_nbd-raw
@@ -1,6 +1,7 @@
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>
@@ -12,6 +13,7 @@ hostname:<null>
path:blah
backingStoreRaw: <null>
backingStoreRawFormat: none(0)
+dataFileRaw: <null>
capacity: 0
encryption: 0
relPath:<null>
diff --git a/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-auto
b/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-auto
index 58f1dd6d9e..4b6b4e2283 100644
--- a/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-auto
+++ b/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-auto
@@ -1,6 +1,7 @@
path:ABS_SRCDIR/virstoragetestdata/images/qcow2_qcow2-auto.qcow2
backingStoreRaw: qcow2
backingStoreRawFormat: <null>(-1)
+dataFileRaw: <null>
capacity: 1024
encryption: 0
relPath:<null>
@@ -12,6 +13,7 @@ hostname:<null>
path:ABS_SRCDIR/virstoragetestdata/images/qcow2
backingStoreRaw: <null>
backingStoreRawFormat: none(0)
+dataFileRaw: <null>
capacity: 1024
encryption: 0
relPath:qcow2
diff --git a/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_qcow2-auto
b/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_qcow2-auto
index 81263c4bc0..79943f432e 100644
--- a/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_qcow2-auto
+++ b/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_qcow2-auto
@@ -1,6 +1,7 @@
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>
@@ -12,6 +13,7 @@ hostname:<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
@@ -23,6 +25,7 @@ hostname:<null>
path:ABS_SRCDIR/virstoragetestdata/images/qcow2
backingStoreRaw: <null>
backingStoreRawFormat: none(0)
+dataFileRaw: <null>
capacity: 1024
encryption: 0
relPath:qcow2
diff --git a/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_raw-auto
b/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_raw-auto
index cbb8d6a33f..02e2c5a966 100644
--- a/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_raw-auto
+++ b/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_raw-auto
@@ -1,6 +1,7 @@
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>
@@ -12,6 +13,7 @@ hostname:<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
@@ -23,6 +25,7 @@ hostname:<null>
path:ABS_SRCDIR/virstoragetestdata/images/raw
backingStoreRaw: <null>
backingStoreRawFormat: none(0)
+dataFileRaw: <null>
capacity: 0
encryption: 0
relPath:raw
diff --git a/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_raw-raw
b/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_raw-raw
index de11029922..843a013ef5 100644
--- a/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_raw-raw
+++ b/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_raw-raw
@@ -1,6 +1,7 @@
path:ABS_BUILDDIR/virstoragedata/wrap
backingStoreRaw: ABS_BUILDDIR/virstoragedata/qcow2
backingStoreRawFormat: qcow2(14)
+dataFileRaw: <null>
capacity: 1024
encryption: 0
relPath:<null>
@@ -12,6 +13,7 @@ hostname:<null>
path:ABS_BUILDDIR/virstoragedata/qcow2
backingStoreRaw: ABS_BUILDDIR/virstoragedata/raw
backingStoreRawFormat: raw(1)
+dataFileRaw: <null>
capacity: 1024
encryption: 0
relPath:<null>
@@ -23,6 +25,7 @@ hostname:<null>
path:ABS_BUILDDIR/virstoragedata/raw
backingStoreRaw: <null>
backingStoreRawFormat: none(0)
+dataFileRaw: <null>
capacity: 0
encryption: 0
relPath:<null>
diff --git a/tests/virstoragetestdata/out/qcow2-qcow2_raw-raw-relative
b/tests/virstoragetestdata/out/qcow2-qcow2_raw-raw-relative
index b4bfd432ad..33526cfd48 100644
--- a/tests/virstoragetestdata/out/qcow2-qcow2_raw-raw-relative
+++ b/tests/virstoragetestdata/out/qcow2-qcow2_raw-raw-relative
@@ -1,6 +1,7 @@
path:ABS_SRCDIR/virstoragetestdata/images/qcow2_raw-raw-relative.qcow2
backingStoreRaw: raw
backingStoreRawFormat: raw(1)
+dataFileRaw: <null>
capacity: 1024
encryption: 0
relPath:<null>
@@ -12,6 +13,7 @@ hostname:<null>
path:ABS_SRCDIR/virstoragetestdata/images/raw
backingStoreRaw: <null>
backingStoreRawFormat: none(0)
+dataFileRaw: <null>
capacity: 0
encryption: 0
relPath:raw
diff --git a/tests/virstoragetestdata/out/qcow2-symlinks
b/tests/virstoragetestdata/out/qcow2-symlinks
index f053f95fd7..c74cf6be53 100644
--- a/tests/virstoragetestdata/out/qcow2-symlinks
+++ b/tests/virstoragetestdata/out/qcow2-symlinks
@@ -1,6 +1,7 @@
path:ABS_SRCDIR/virstoragetestdata/images/sub/link2
backingStoreRaw: ../sub/link1
backingStoreRawFormat: qcow2(14)
+dataFileRaw: <null>
capacity: 1024
encryption: 0
relPath:<null>
@@ -12,6 +13,7 @@ hostname:<null>
path:ABS_SRCDIR/virstoragetestdata/images/sub/../sub/link1
backingStoreRaw: ../raw
backingStoreRawFormat: raw(1)
+dataFileRaw: <null>
capacity: 1024
encryption: 0
relPath:../sub/link1
@@ -23,6 +25,7 @@ hostname:<null>
path:ABS_SRCDIR/virstoragetestdata/images/sub/../sub/../raw
backingStoreRaw: <null>
backingStoreRawFormat: none(0)
+dataFileRaw: <null>
capacity: 0
encryption: 0
relPath:../raw
diff --git a/tests/virstoragetestdata/out/qcow2datafile-qcow2_qcow2-datafile
b/tests/virstoragetestdata/out/qcow2datafile-qcow2_qcow2-datafile
index cc8bac3138..c5a5d99e9e 100644
--- a/tests/virstoragetestdata/out/qcow2datafile-qcow2_qcow2-datafile
+++ b/tests/virstoragetestdata/out/qcow2datafile-qcow2_qcow2-datafile
@@ -1,6 +1,7 @@
path:ABS_SRCDIR/virstoragetestdata/images/qcow2datafile-datafile.qcow2
backingStoreRaw: datafile.qcow2
backingStoreRawFormat: qcow2(14)
+dataFileRaw: <null>
capacity: 1024
encryption: 0
relPath:<null>
@@ -12,6 +13,7 @@ hostname:<null>
path:ABS_SRCDIR/virstoragetestdata/images/datafile.qcow2
backingStoreRaw: <null>
backingStoreRawFormat: none(0)
+dataFileRaw: raw
capacity: 1024
encryption: 0
relPath:datafile.qcow2
@@ -20,12 +22,10 @@ format: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
diff --git a/tests/virstoragetestdata/out/qed-auto_raw
b/tests/virstoragetestdata/out/qed-auto_raw
index 260c3fbc79..3905398142 100644
--- a/tests/virstoragetestdata/out/qed-auto_raw
+++ b/tests/virstoragetestdata/out/qed-auto_raw
@@ -1,6 +1,7 @@
path:ABS_SRCDIR/virstoragetestdata/images/qed_raw-raw-relative
backingStoreRaw: <null>
backingStoreRawFormat: none(0)
+dataFileRaw: <null>
capacity: 0
encryption: 0
relPath:<null>
diff --git a/tests/virstoragetestdata/out/qed-qed_raw
b/tests/virstoragetestdata/out/qed-qed_raw
index a13d407a5f..5ae7fef357 100644
--- a/tests/virstoragetestdata/out/qed-qed_raw
+++ b/tests/virstoragetestdata/out/qed-qed_raw
@@ -1,6 +1,7 @@
path:ABS_SRCDIR/virstoragetestdata/images/qed_raw-raw-relative
backingStoreRaw: raw
backingStoreRawFormat: raw(1)
+dataFileRaw: <null>
capacity: 1024
encryption: 0
relPath:<null>
@@ -12,6 +13,7 @@ hostname:<null>
path:ABS_SRCDIR/virstoragetestdata/images/raw
backingStoreRaw: <null>
backingStoreRawFormat: none(0)
+dataFileRaw: <null>
capacity: 0
encryption: 0
relPath:raw
diff --git a/tests/virstoragetestdata/out/raw-auto
b/tests/virstoragetestdata/out/raw-auto
index 70ec22f309..5eb1d71681 100644
--- a/tests/virstoragetestdata/out/raw-auto
+++ b/tests/virstoragetestdata/out/raw-auto
@@ -1,6 +1,7 @@
path:ABS_SRCDIR/virstoragetestdata/images/raw
backingStoreRaw: <null>
backingStoreRawFormat: none(0)
+dataFileRaw: <null>
capacity: 0
encryption: 0
relPath:<null>
diff --git a/tests/virstoragetestdata/out/raw-raw b/tests/virstoragetestdata/out/raw-raw
index 70ec22f309..5eb1d71681 100644
--- a/tests/virstoragetestdata/out/raw-raw
+++ b/tests/virstoragetestdata/out/raw-raw
@@ -1,6 +1,7 @@
path:ABS_SRCDIR/virstoragetestdata/images/raw
backingStoreRaw: <null>
backingStoreRawFormat: none(0)
+dataFileRaw: <null>
capacity: 0
encryption: 0
relPath:<null>
--
2.49.0