[PATCH 4/7] virstoragetest: Use strings for storage type and format in output data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 tests/virstoragetest.c                               |  8 ++++----
 tests/virstoragetestdata/out/directory-dir           |  4 ++--
 tests/virstoragetestdata/out/directory-none          |  4 ++--
 tests/virstoragetestdata/out/directory-raw           |  4 ++--
 .../out/qcow2-auto_qcow2-qcow2_raw-raw               |  4 ++--
 .../out/qcow2-auto_raw-raw-relative                  |  4 ++--
 tests/virstoragetestdata/out/qcow2-qcow2_nbd-raw     |  8 ++++----
 tests/virstoragetestdata/out/qcow2-qcow2_qcow2-auto  |  8 ++++----
 .../out/qcow2-qcow2_qcow2-qcow2_qcow2-auto           | 12 ++++++------
 .../out/qcow2-qcow2_qcow2-qcow2_raw-auto             | 12 ++++++------
 .../out/qcow2-qcow2_qcow2-qcow2_raw-raw              | 12 ++++++------
 .../out/qcow2-qcow2_raw-raw-relative                 |  8 ++++----
 tests/virstoragetestdata/out/qcow2-symlinks          | 12 ++++++------
 tests/virstoragetestdata/out/qed-auto_raw            |  4 ++--
 tests/virstoragetestdata/out/qed-qed_raw             |  8 ++++----
 tests/virstoragetestdata/out/raw-auto                |  4 ++--
 tests/virstoragetestdata/out/raw-raw                 |  4 ++--
 17 files changed, 60 insertions(+), 60 deletions(-)

diff --git a/tests/virstoragetest.c b/tests/virstoragetest.c
index 11f7abbda6..c7421c55de 100644
--- a/tests/virstoragetest.c
+++ b/tests/virstoragetest.c
@@ -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));
     }
diff --git a/tests/virstoragetestdata/out/directory-dir b/tests/virstoragetestdata/out/directory-dir
index 65b7b91912..298c6cfb4a 100644
--- a/tests/virstoragetestdata/out/directory-dir
+++ b/tests/virstoragetestdata/out/directory-dir
@@ -3,7 +3,7 @@ backingStoreRaw: <null>
 capacity: 0
 encryption: 0
 relPath:<null>
-type:3
-format:2
+type:dir
+format:dir
 protocol:none
 hostname:<null>
diff --git a/tests/virstoragetestdata/out/directory-none b/tests/virstoragetestdata/out/directory-none
index 65b7b91912..298c6cfb4a 100644
--- a/tests/virstoragetestdata/out/directory-none
+++ b/tests/virstoragetestdata/out/directory-none
@@ -3,7 +3,7 @@ backingStoreRaw: <null>
 capacity: 0
 encryption: 0
 relPath:<null>
-type:3
-format:2
+type:dir
+format:dir
 protocol:none
 hostname:<null>
diff --git a/tests/virstoragetestdata/out/directory-raw b/tests/virstoragetestdata/out/directory-raw
index 5def2c4b8b..42589746b8 100644
--- a/tests/virstoragetestdata/out/directory-raw
+++ b/tests/virstoragetestdata/out/directory-raw
@@ -3,7 +3,7 @@ backingStoreRaw: <null>
 capacity: 0
 encryption: 0
 relPath:<null>
-type:3
-format:1
+type:dir
+format:raw
 protocol:none
 hostname:<null>
diff --git a/tests/virstoragetestdata/out/qcow2-auto_qcow2-qcow2_raw-raw b/tests/virstoragetestdata/out/qcow2-auto_qcow2-qcow2_raw-raw
index 2ea087592e..7c299542a4 100644
--- a/tests/virstoragetestdata/out/qcow2-auto_qcow2-qcow2_raw-raw
+++ b/tests/virstoragetestdata/out/qcow2-auto_qcow2-qcow2_raw-raw
@@ -3,7 +3,7 @@ backingStoreRaw: <null>
 capacity: 0
 encryption: 0
 relPath:<null>
-type:1
-format:1
+type:file
+format:raw
 protocol:none
 hostname:<null>
diff --git a/tests/virstoragetestdata/out/qcow2-auto_raw-raw-relative b/tests/virstoragetestdata/out/qcow2-auto_raw-raw-relative
index f9afc138f0..9f8246900d 100644
--- a/tests/virstoragetestdata/out/qcow2-auto_raw-raw-relative
+++ b/tests/virstoragetestdata/out/qcow2-auto_raw-raw-relative
@@ -3,7 +3,7 @@ backingStoreRaw: <null>
 capacity: 0
 encryption: 0
 relPath:<null>
-type:1
-format:1
+type:file
+format:raw
 protocol:none
 hostname:<null>
diff --git a/tests/virstoragetestdata/out/qcow2-qcow2_nbd-raw b/tests/virstoragetestdata/out/qcow2-qcow2_nbd-raw
index 08a93b9f32..761e65b234 100644
--- a/tests/virstoragetestdata/out/qcow2-qcow2_nbd-raw
+++ b/tests/virstoragetestdata/out/qcow2-qcow2_nbd-raw
@@ -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
diff --git a/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-auto b/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-auto
index e23c43f328..57f2f51108 100644
--- a/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-auto
+++ b/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-auto
@@ -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>
diff --git a/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_qcow2-auto b/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_qcow2-auto
index 17f53f3ed0..99d3c4c273 100644
--- a/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_qcow2-auto
+++ b/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_qcow2-auto
@@ -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>
diff --git a/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_raw-auto b/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_raw-auto
index 1be5a82cc9..9734cf22b9 100644
--- a/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_raw-auto
+++ b/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_raw-auto
@@ -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>
diff --git a/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_raw-raw b/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_raw-raw
index 5f93fe746b..0c90e9858d 100644
--- a/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_raw-raw
+++ b/tests/virstoragetestdata/out/qcow2-qcow2_qcow2-qcow2_raw-raw
@@ -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>
diff --git a/tests/virstoragetestdata/out/qcow2-qcow2_raw-raw-relative b/tests/virstoragetestdata/out/qcow2-qcow2_raw-raw-relative
index 6e3f7ab339..552353e980 100644
--- a/tests/virstoragetestdata/out/qcow2-qcow2_raw-raw-relative
+++ b/tests/virstoragetestdata/out/qcow2-qcow2_raw-raw-relative
@@ -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>
diff --git a/tests/virstoragetestdata/out/qcow2-symlinks b/tests/virstoragetestdata/out/qcow2-symlinks
index 34c3a37c2e..8e531e4cf8 100644
--- a/tests/virstoragetestdata/out/qcow2-symlinks
+++ b/tests/virstoragetestdata/out/qcow2-symlinks
@@ -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>
diff --git a/tests/virstoragetestdata/out/qed-auto_raw b/tests/virstoragetestdata/out/qed-auto_raw
index 292a8fa7fb..a75ef8189b 100644
--- a/tests/virstoragetestdata/out/qed-auto_raw
+++ b/tests/virstoragetestdata/out/qed-auto_raw
@@ -3,7 +3,7 @@ backingStoreRaw: <null>
 capacity: 0
 encryption: 0
 relPath:<null>
-type:1
-format:1
+type:file
+format:raw
 protocol:none
 hostname:<null>
diff --git a/tests/virstoragetestdata/out/qed-qed_raw b/tests/virstoragetestdata/out/qed-qed_raw
index 043ec4240b..18a5091e6f 100644
--- a/tests/virstoragetestdata/out/qed-qed_raw
+++ b/tests/virstoragetestdata/out/qed-qed_raw
@@ -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>
diff --git a/tests/virstoragetestdata/out/raw-auto b/tests/virstoragetestdata/out/raw-auto
index d98b6e8bf5..90a9dfceda 100644
--- a/tests/virstoragetestdata/out/raw-auto
+++ b/tests/virstoragetestdata/out/raw-auto
@@ -3,7 +3,7 @@ backingStoreRaw: <null>
 capacity: 0
 encryption: 0
 relPath:<null>
-type:1
-format:1
+type:file
+format:raw
 protocol:none
 hostname:<null>
diff --git a/tests/virstoragetestdata/out/raw-raw b/tests/virstoragetestdata/out/raw-raw
index d98b6e8bf5..90a9dfceda 100644
--- a/tests/virstoragetestdata/out/raw-raw
+++ b/tests/virstoragetestdata/out/raw-raw
@@ -3,7 +3,7 @@ backingStoreRaw: <null>
 capacity: 0
 encryption: 0
 relPath:<null>
-type:1
-format:1
+type:file
+format:raw
 protocol:none
 hostname:<null>
-- 
2.42.0
_______________________________________________
Devel mailing list -- devel@xxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxx




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux