]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
virstoragetest: testStorageChain: Skip test if filename is NULL
authorPeter Krempa <pkrempa@redhat.com>
Wed, 8 Sep 2021 12:10:51 +0000 (14:10 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 9 Sep 2021 13:29:00 +0000 (15:29 +0200)
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@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
tests/virstoragetest.c

index c258bc1709e25e659d0651c9e4b992dda6164c93..d9ab630600a2443c49282405a292edd5ec558796 100644 (file)
@@ -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) {