]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
virstoragetest: Use strings for storage type and format in output data
authorPeter Krempa <pkrempa@redhat.com>
Fri, 24 Nov 2023 10:14:21 +0000 (11:14 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 27 Nov 2023 09:12:34 +0000 (10:12 +0100)
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>
17 files changed:
tests/virstoragetest.c
tests/virstoragetestdata/out/directory-dir
tests/virstoragetestdata/out/directory-none
tests/virstoragetestdata/out/directory-raw
tests/virstoragetestdata/out/qcow2-auto_qcow2-qcow2_raw-raw
tests/virstoragetestdata/out/qcow2-auto_raw-raw-relative
tests/virstoragetestdata/out/qcow2-qcow2_nbd-raw
tests/virstoragetestdata/out/qcow2-qcow2_qcow2-auto
tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_qcow2-auto
tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_raw-auto
tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_raw-raw
tests/virstoragetestdata/out/qcow2-qcow2_raw-raw-relative
tests/virstoragetestdata/out/qcow2-symlinks
tests/virstoragetestdata/out/qed-auto_raw
tests/virstoragetestdata/out/qed-qed_raw
tests/virstoragetestdata/out/raw-auto
tests/virstoragetestdata/out/raw-raw

index 11f7abbda6b2f4e69936b0909d15aec46182761f..c7421c55de82f9df32caed46a02ffcf8271a2924 100644 (file)
@@ -187,8 +187,8 @@ testStorageChain(const void *args)
                           "capacity: %lld\n"
                           "encryption: %d\n"
                           "relPath:%s\n"
-                          "type:%d\n"
-                          "format:%d\n"
+                          "type:%s\n"
+                          "format:%s\n"
                           "protocol:%s\n"
                           "hostname:%s\n\n",
                           strippedPath,
@@ -196,8 +196,8 @@ testStorageChain(const void *args)
                           elt->capacity,
                           !!elt->encryption,
                           strippedRelPath,
-                          elt->type,
-                          elt->format,
+                          NULLSTR(virStorageTypeToString(elt->type)),
+                          NULLSTR(virStorageFileFormatTypeToString(elt->format)),
                           virStorageNetProtocolTypeToString(elt->protocol),
                           NULLSTR(elt->nhosts ? elt->hosts[0].name : NULL));
     }
index 65b7b919126cf8713edf778435be38402a2f9355..298c6cfb4a40d5dd07744573e8221eaec0c3b7d3 100644 (file)
@@ -3,7 +3,7 @@ backingStoreRaw: <null>
 capacity: 0
 encryption: 0
 relPath:<null>
-type:3
-format:2
+type:dir
+format:dir
 protocol:none
 hostname:<null>
index 65b7b919126cf8713edf778435be38402a2f9355..298c6cfb4a40d5dd07744573e8221eaec0c3b7d3 100644 (file)
@@ -3,7 +3,7 @@ backingStoreRaw: <null>
 capacity: 0
 encryption: 0
 relPath:<null>
-type:3
-format:2
+type:dir
+format:dir
 protocol:none
 hostname:<null>
index 5def2c4b8b9dc3e5f4674f9f8a475231860ea251..42589746b8b0fc9d62e95cb301e68dd861a7605f 100644 (file)
@@ -3,7 +3,7 @@ backingStoreRaw: <null>
 capacity: 0
 encryption: 0
 relPath:<null>
-type:3
-format:1
+type:dir
+format:raw
 protocol:none
 hostname:<null>
index 2ea087592e4ffe88ee1767236d8ef8cbc607cb5e..7c299542a405fd076f47f2d4e5fb07be5092b91c 100644 (file)
@@ -3,7 +3,7 @@ backingStoreRaw: <null>
 capacity: 0
 encryption: 0
 relPath:<null>
-type:1
-format:1
+type:file
+format:raw
 protocol:none
 hostname:<null>
index f9afc138f0a4b1dc939d02bcaae3b772a151d571..9f8246900d1dec0f17ddc56d7609590b94deaef0 100644 (file)
@@ -3,7 +3,7 @@ backingStoreRaw: <null>
 capacity: 0
 encryption: 0
 relPath:<null>
-type:1
-format:1
+type:file
+format:raw
 protocol:none
 hostname:<null>
index 08a93b9f320231b336776e05cee6985f514de451..761e65b23497c4c0dc32ed69f91c2cc84a65c5fd 100644 (file)
@@ -3,8 +3,8 @@ backingStoreRaw: nbd+tcp://example.org:6000/blah
 capacity: 1024
 encryption: 0
 relPath:<null>
-type:1
-format:14
+type:file
+format:qcow2
 protocol:none
 hostname:<null>
 
@@ -13,7 +13,7 @@ backingStoreRaw: <null>
 capacity: 0
 encryption: 0
 relPath:<null>
-type:4
-format:1
+type:network
+format:raw
 protocol:nbd
 hostname:example.org
index e23c43f328b6470757eb3e546a51dd7aa084ec8f..57f2f511089c5b3f3b966109833fd0b6960828fa 100644 (file)
@@ -3,8 +3,8 @@ backingStoreRaw: qcow2
 capacity: 1024
 encryption: 0
 relPath:<null>
-type:1
-format:14
+type:file
+format:qcow2
 protocol:none
 hostname:<null>
 
@@ -13,7 +13,7 @@ backingStoreRaw: <null>
 capacity: 1024
 encryption: 0
 relPath:qcow2
-type:1
-format:14
+type:file
+format:qcow2
 protocol:none
 hostname:<null>
index 17f53f3ed073e4f24bf5c3d5209eade7229525ee..99d3c4c273c259cf73884a38e34a16c7a138211a 100644 (file)
@@ -3,8 +3,8 @@ backingStoreRaw: qcow2_qcow2-auto.qcow2
 capacity: 1024
 encryption: 0
 relPath:<null>
-type:1
-format:14
+type:file
+format:qcow2
 protocol:none
 hostname:<null>
 
@@ -13,8 +13,8 @@ backingStoreRaw: qcow2
 capacity: 1024
 encryption: 0
 relPath:qcow2_qcow2-auto.qcow2
-type:1
-format:14
+type:file
+format:qcow2
 protocol:none
 hostname:<null>
 
@@ -23,7 +23,7 @@ backingStoreRaw: <null>
 capacity: 1024
 encryption: 0
 relPath:qcow2
-type:1
-format:14
+type:file
+format:qcow2
 protocol:none
 hostname:<null>
index 1be5a82cc9afc51e9671bea2d8d3ed1e302d71e7..9734cf22b920210dac90e0956bf279f3b4cad797 100644 (file)
@@ -3,8 +3,8 @@ backingStoreRaw: qcow2_raw-auto.qcow2
 capacity: 1024
 encryption: 0
 relPath:<null>
-type:1
-format:14
+type:file
+format:qcow2
 protocol:none
 hostname:<null>
 
@@ -13,8 +13,8 @@ backingStoreRaw: raw
 capacity: 1024
 encryption: 0
 relPath:qcow2_raw-auto.qcow2
-type:1
-format:14
+type:file
+format:qcow2
 protocol:none
 hostname:<null>
 
@@ -23,7 +23,7 @@ backingStoreRaw: <null>
 capacity: 0
 encryption: 0
 relPath:raw
-type:1
-format:1
+type:file
+format:raw
 protocol:none
 hostname:<null>
index 5f93fe746bfcd9fb08f11cd9848a779b58eb20dc..0c90e9858d24149b154ea5af2589c14c78d48f31 100644 (file)
@@ -3,8 +3,8 @@ backingStoreRaw: ABS_BUILDDIR/virstoragedata/qcow2
 capacity: 1024
 encryption: 0
 relPath:<null>
-type:1
-format:14
+type:file
+format:qcow2
 protocol:none
 hostname:<null>
 
@@ -13,8 +13,8 @@ backingStoreRaw: ABS_BUILDDIR/virstoragedata/raw
 capacity: 1024
 encryption: 0
 relPath:<null>
-type:1
-format:14
+type:file
+format:qcow2
 protocol:none
 hostname:<null>
 
@@ -23,7 +23,7 @@ backingStoreRaw: <null>
 capacity: 0
 encryption: 0
 relPath:<null>
-type:1
-format:1
+type:file
+format:raw
 protocol:none
 hostname:<null>
index 6e3f7ab3392e1ca1ef57b94f4d75a777fe0fecb4..552353e980734ef99ec37c509695d9c1230e3f12 100644 (file)
@@ -3,8 +3,8 @@ backingStoreRaw: raw
 capacity: 1024
 encryption: 0
 relPath:<null>
-type:1
-format:14
+type:file
+format:qcow2
 protocol:none
 hostname:<null>
 
@@ -13,7 +13,7 @@ backingStoreRaw: <null>
 capacity: 0
 encryption: 0
 relPath:raw
-type:1
-format:1
+type:file
+format:raw
 protocol:none
 hostname:<null>
index 34c3a37c2ebbbb6372e0fdd9a28e842e86344b45..8e531e4cf81e57ba3ddc92eceb8bf7f8b3ef90d9 100644 (file)
@@ -3,8 +3,8 @@ backingStoreRaw: ../sub/link1
 capacity: 1024
 encryption: 0
 relPath:<null>
-type:1
-format:14
+type:file
+format:qcow2
 protocol:none
 hostname:<null>
 
@@ -13,8 +13,8 @@ backingStoreRaw: ../raw
 capacity: 1024
 encryption: 0
 relPath:../sub/link1
-type:1
-format:14
+type:file
+format:qcow2
 protocol:none
 hostname:<null>
 
@@ -23,7 +23,7 @@ backingStoreRaw: <null>
 capacity: 0
 encryption: 0
 relPath:../raw
-type:1
-format:1
+type:file
+format:raw
 protocol:none
 hostname:<null>
index 292a8fa7fb52c05fe879765dc2f4a80076dd89af..a75ef8189b5521bd7c7e201b9e9f08a1e78a1d57 100644 (file)
@@ -3,7 +3,7 @@ backingStoreRaw: <null>
 capacity: 0
 encryption: 0
 relPath:<null>
-type:1
-format:1
+type:file
+format:raw
 protocol:none
 hostname:<null>
index 043ec4240bae16607618abc94396859b02f3edac..18a5091e6fae88689065199a0341593d6de770aa 100644 (file)
@@ -3,8 +3,8 @@ backingStoreRaw: raw
 capacity: 1024
 encryption: 0
 relPath:<null>
-type:1
-format:15
+type:file
+format:qed
 protocol:none
 hostname:<null>
 
@@ -13,7 +13,7 @@ backingStoreRaw: <null>
 capacity: 0
 encryption: 0
 relPath:raw
-type:1
-format:1
+type:file
+format:raw
 protocol:none
 hostname:<null>
index d98b6e8bf59269306bb03b1c02291122e796f9a5..90a9dfcedaa103853f4df4e3e47ccb014d8c44ed 100644 (file)
@@ -3,7 +3,7 @@ backingStoreRaw: <null>
 capacity: 0
 encryption: 0
 relPath:<null>
-type:1
-format:1
+type:file
+format:raw
 protocol:none
 hostname:<null>
index d98b6e8bf59269306bb03b1c02291122e796f9a5..90a9dfcedaa103853f4df4e3e47ccb014d8c44ed 100644 (file)
@@ -3,7 +3,7 @@ backingStoreRaw: <null>
 capacity: 0
 encryption: 0
 relPath:<null>
-type:1
-format:1
+type:file
+format:raw
 protocol:none
 hostname:<null>