]> xenbits.xensource.com Git - libvirt.git/commitdiff
tests: ignore XML files starting with a .
authorDaniel P. Berrangé <berrange@redhat.com>
Mon, 17 Dec 2018 13:17:26 +0000 (13:17 +0000)
committerDaniel P. Berrangé <berrange@redhat.com>
Tue, 18 Dec 2018 14:49:46 +0000 (14:49 +0000)
If an editor has an XML file open, it may create a temporary . file. The
existance of this file will cause the virschematest to fail, so just
skip these editor temp files.

Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
tests/virschematest.c

index 4c348d9909e2762f18042d787246a4c9d00a1d10..d1bcdeac9c5b5a0ec37ed7686c98cd8e9cb11500 100644 (file)
@@ -84,6 +84,8 @@ testSchemaDir(const char *schema,
     while ((rc = virDirRead(dir, &ent, dir_path)) > 0) {
         if (!virFileHasSuffix(ent->d_name, ".xml"))
             continue;
+        if (ent->d_name[0] == '.')
+            continue;
 
         if (virAsprintf(&xml_path, "%s/%s", dir_path, ent->d_name) < 0)
             goto cleanup;