Compare also the detected format of the backing file ('backingStoreRawFormat' field) into the outptu 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@xxxxxxxxxx> --- tests/virstoragetest.c | 3 +++ tests/virstoragetestdata/out/directory-dir | 1 + tests/virstoragetestdata/out/directory-none | 1 + tests/virstoragetestdata/out/directory-raw | 1 + tests/virstoragetestdata/out/qcow2-auto_qcow2-qcow2_raw-raw | 1 + tests/virstoragetestdata/out/qcow2-auto_raw-raw-relative | 1 + tests/virstoragetestdata/out/qcow2-qcow2_nbd-raw | 2 ++ tests/virstoragetestdata/out/qcow2-qcow2_qcow2-auto | 2 ++ .../virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_qcow2-auto | 3 +++ tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_raw-auto | 3 +++ tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_raw-raw | 3 +++ tests/virstoragetestdata/out/qcow2-qcow2_raw-raw-relative | 2 ++ tests/virstoragetestdata/out/qcow2-symlinks | 3 +++ 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 + 17 files changed, 31 insertions(+) diff --git a/tests/virstoragetest.c b/tests/virstoragetest.c index c7421c55de..c28a23e332 100644 --- a/tests/virstoragetest.c +++ b/tests/virstoragetest.c @@ -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, diff --git a/tests/virstoragetestdata/out/directory-dir b/tests/virstoragetestdata/out/directory-dir index 298c6cfb4a..c6a2fa3673 100644 --- a/tests/virstoragetestdata/out/directory-dir +++ b/tests/virstoragetestdata/out/directory-dir @@ -1,5 +1,6 @@ path:ABS_SRCDIR/virstoragetestdata/images/ backingStoreRaw: <null> +backingStoreRawFormat: none(0) capacity: 0 encryption: 0 relPath:<null> diff --git a/tests/virstoragetestdata/out/directory-none b/tests/virstoragetestdata/out/directory-none index 298c6cfb4a..c6a2fa3673 100644 --- a/tests/virstoragetestdata/out/directory-none +++ b/tests/virstoragetestdata/out/directory-none @@ -1,5 +1,6 @@ path:ABS_SRCDIR/virstoragetestdata/images/ backingStoreRaw: <null> +backingStoreRawFormat: none(0) capacity: 0 encryption: 0 relPath:<null> diff --git a/tests/virstoragetestdata/out/directory-raw b/tests/virstoragetestdata/out/directory-raw index 42589746b8..6e190c97f4 100644 --- a/tests/virstoragetestdata/out/directory-raw +++ b/tests/virstoragetestdata/out/directory-raw @@ -1,5 +1,6 @@ path:ABS_SRCDIR/virstoragetestdata/images/ backingStoreRaw: <null> +backingStoreRawFormat: none(0) 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 7c299542a4..0540be0c09 100644 --- a/tests/virstoragetestdata/out/qcow2-auto_qcow2-qcow2_raw-raw +++ b/tests/virstoragetestdata/out/qcow2-auto_qcow2-qcow2_raw-raw @@ -1,5 +1,6 @@ path:ABS_BUILDDIR/virstoragedata/wrap backingStoreRaw: <null> +backingStoreRawFormat: none(0) 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 9f8246900d..e145cca417 100644 --- a/tests/virstoragetestdata/out/qcow2-auto_raw-raw-relative +++ b/tests/virstoragetestdata/out/qcow2-auto_raw-raw-relative @@ -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> diff --git a/tests/virstoragetestdata/out/qcow2-qcow2_nbd-raw b/tests/virstoragetestdata/out/qcow2-qcow2_nbd-raw index 761e65b234..0c2bb0ddc4 100644 --- a/tests/virstoragetestdata/out/qcow2-qcow2_nbd-raw +++ b/tests/virstoragetestdata/out/qcow2-qcow2_nbd-raw @@ -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> diff --git a/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-auto b/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-auto index 57f2f51108..58f1dd6d9e 100644 --- a/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-auto +++ b/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-auto @@ -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 diff --git a/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_qcow2-auto b/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_qcow2-auto index 99d3c4c273..81263c4bc0 100644 --- a/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_qcow2-auto +++ b/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_qcow2-auto @@ -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 diff --git a/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_raw-auto b/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_raw-auto index 9734cf22b9..cbb8d6a33f 100644 --- a/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_raw-auto +++ b/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_raw-auto @@ -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 diff --git a/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_raw-raw b/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_raw-raw index 0c90e9858d..de11029922 100644 --- a/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_raw-raw +++ b/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_raw-raw @@ -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> diff --git a/tests/virstoragetestdata/out/qcow2-qcow2_raw-raw-relative b/tests/virstoragetestdata/out/qcow2-qcow2_raw-raw-relative index 552353e980..b4bfd432ad 100644 --- a/tests/virstoragetestdata/out/qcow2-qcow2_raw-raw-relative +++ b/tests/virstoragetestdata/out/qcow2-qcow2_raw-raw-relative @@ -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 diff --git a/tests/virstoragetestdata/out/qcow2-symlinks b/tests/virstoragetestdata/out/qcow2-symlinks index 8e531e4cf8..f053f95fd7 100644 --- a/tests/virstoragetestdata/out/qcow2-symlinks +++ b/tests/virstoragetestdata/out/qcow2-symlinks @@ -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 diff --git a/tests/virstoragetestdata/out/qed-auto_raw b/tests/virstoragetestdata/out/qed-auto_raw index a75ef8189b..260c3fbc79 100644 --- a/tests/virstoragetestdata/out/qed-auto_raw +++ b/tests/virstoragetestdata/out/qed-auto_raw @@ -1,5 +1,6 @@ path:ABS_SRCDIR/virstoragetestdata/images/qed_raw-raw-relative backingStoreRaw: <null> +backingStoreRawFormat: none(0) capacity: 0 encryption: 0 relPath:<null> diff --git a/tests/virstoragetestdata/out/qed-qed_raw b/tests/virstoragetestdata/out/qed-qed_raw index 18a5091e6f..a13d407a5f 100644 --- a/tests/virstoragetestdata/out/qed-qed_raw +++ b/tests/virstoragetestdata/out/qed-qed_raw @@ -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 diff --git a/tests/virstoragetestdata/out/raw-auto b/tests/virstoragetestdata/out/raw-auto index 90a9dfceda..70ec22f309 100644 --- a/tests/virstoragetestdata/out/raw-auto +++ b/tests/virstoragetestdata/out/raw-auto @@ -1,5 +1,6 @@ path:ABS_SRCDIR/virstoragetestdata/images/raw backingStoreRaw: <null> +backingStoreRawFormat: none(0) capacity: 0 encryption: 0 relPath:<null> diff --git a/tests/virstoragetestdata/out/raw-raw b/tests/virstoragetestdata/out/raw-raw index 90a9dfceda..70ec22f309 100644 --- a/tests/virstoragetestdata/out/raw-raw +++ b/tests/virstoragetestdata/out/raw-raw @@ -1,5 +1,6 @@ path:ABS_SRCDIR/virstoragetestdata/images/raw backingStoreRaw: <null> +backingStoreRawFormat: none(0) capacity: 0 encryption: 0 relPath:<null> -- 2.42.0 _______________________________________________ Devel mailing list -- devel@xxxxxxxxxxxxxxxxx To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxx