[PATCH] test: Skip storage test when filesystem storage backend isn't compiled in

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

 



'virstoragetest' accesses backing chains of files on local storage with
the help of the storage driver. Disable the test on builds without the
storage driver as the test is crashing otherwise.
---
 tests/virstoragetest.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tests/virstoragetest.c b/tests/virstoragetest.c
index e15578c..043c5e6 100644
--- a/tests/virstoragetest.c
+++ b/tests/virstoragetest.c
@@ -536,6 +536,12 @@ mymain(void)
     virStorageSourcePtr chain2; /* short for chain->backingStore */
     virStorageSourcePtr chain3; /* short for chain2->backingStore */

+#if !WITH_STORAGE_FS
+    /* this test doesn't make sense without storage driver access
+     * to local files */
+    return EXIT_AM_SKIP;
+#endif
+
     /* 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.  */
     if ((ret = testPrepImages()) != 0)
-- 
1.9.3

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