[PATCH 2/4] tests: storage: Remove unused test modes

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

 



EXP_WARN and ALLOW_PROBE flags for the testStorageChain cases are no
longer used so we can remove them.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 tests/virstoragetest.c | 30 +++++++++---------------------
 1 file changed, 9 insertions(+), 21 deletions(-)

diff --git a/tests/virstoragetest.c b/tests/virstoragetest.c
index 73717b0460..93f3d1604a 100644
--- a/tests/virstoragetest.c
+++ b/tests/virstoragetest.c
@@ -242,8 +242,6 @@ struct _testFileData
 enum {
     EXP_PASS = 0,
     EXP_FAIL = 1,
-    EXP_WARN = 2,
-    ALLOW_PROBE = 4,
 };

 struct testChainData
@@ -288,25 +286,15 @@ testStorageChain(const void *args)
         fprintf(stderr, "call should have failed\n");
         return -1;
     }
-    if (data->flags & EXP_WARN) {
-        if (virGetLastErrorCode() == VIR_ERR_OK) {
-            fprintf(stderr, "call should have warned\n");
-            return -1;
-        }
-        virResetLastError();
-        if (virStorageFileChainGetBroken(meta, &broken) || !broken) {
-            fprintf(stderr, "call should identify broken part of chain\n");
-            return -1;
-        }
-    } else {
-        if (virGetLastErrorCode()) {
-            fprintf(stderr, "call should not have warned\n");
-            return -1;
-        }
-        if (virStorageFileChainGetBroken(meta, &broken) || broken) {
-            fprintf(stderr, "chain should not be identified as broken\n");
-            return -1;
-        }
+
+    if (virGetLastErrorCode()) {
+        fprintf(stderr, "call should not have reported error\n");
+        return -1;
+    }
+
+    if (virStorageFileChainGetBroken(meta, &broken) || broken) {
+        fprintf(stderr, "chain should not be identified as broken\n");
+        return -1;
     }

     elt = meta;
-- 
2.23.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[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