[PATCH 21/24] virstoragetest: testStorageChain: Skip test if filename is NULL

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

 



Prepare the test runner for skipping individual tests if images can't be
formatted rather than the whole virstoragetest.

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

diff --git a/tests/virstoragetest.c b/tests/virstoragetest.c
index c258bc1709..d9ab630600 100644
--- a/tests/virstoragetest.c
+++ b/tests/virstoragetest.c
@@ -176,6 +176,11 @@ testStorageChain(const void *args)
     g_autofree char *expectpath = g_strdup_printf("%s/virstoragetestdata/out/%s",
                                                   abs_srcdir, data->testname);

+    /* If the filename is NULL it means that the images couldn't be created,
+     * thus skip this particular test. */
+    if (!data->start)
+        return EXIT_AM_SKIP;
+
     meta = testStorageFileGetMetadata(data->start, data->format, -1, -1);
     if (!meta) {
         if (data->flags & EXP_FAIL) {
-- 
2.31.1




[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