]> xenbits.xensource.com Git - libvirt.git/commitdiff
tests: storage: Remove unused test modes
authorPeter Krempa <pkrempa@redhat.com>
Tue, 17 Dec 2019 16:49:36 +0000 (17:49 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 18 Dec 2019 08:36:48 +0000 (09:36 +0100)
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@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
tests/virstoragetest.c

index 73717b0460100938cd213effa3d0f82911d057fb..93f3d1604a2d936f1eb1e76eb9a8cd31f81d2282 100644 (file)
@@ -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;