]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
tests: storage: Fully register storage driver
authorPeter Krempa <pkrempa@redhat.com>
Thu, 11 May 2017 14:50:04 +0000 (16:50 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 11 Jul 2017 15:07:04 +0000 (17:07 +0200)
Use the full storage driver registration method that also fails if one
of the storage backends is not present. This makes the test fail if a
submodule fails registration, which is useful for testing.

Additionally return EXIT_FAILURE as usual in tests rather than -1.

tests/virstoragetest.c

index 90fcf36ca1f3e7f437478995231ba9b7e2475d2a..65f0fe78283e860baa1a1f773a7963c130ad048c 100644 (file)
@@ -32,7 +32,6 @@
 #include "dirname.h"
 
 #include "storage/storage_driver.h"
-#include "storage/storage_backend.h"
 
 #define VIR_FROM_THIS VIR_FROM_NONE
 
@@ -732,8 +731,8 @@ mymain(void)
     virStorageSourcePtr chain2; /* short for chain->backingStore */
     virStorageSourcePtr chain3; /* short for chain2->backingStore */
 
-    if (virStorageBackendDriversRegister(false) < 0)
-       return -1;
+    if (storageRegisterAll() < 0)
+       return EXIT_FAILURE;
 
     /* Prep some files with qemu-img; if that is not found on PATH, or
      * if it lacks support for qcow2 and qed, skip this test.  */