[PATCH 2/6] tests: storage: Fully register storage driver

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

 



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 | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/tests/virstoragetest.c b/tests/virstoragetest.c
index f34408395..a73c53839 100644
--- a/tests/virstoragetest.c
+++ b/tests/virstoragetest.c
@@ -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.  */
-- 
2.12.2

--
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