From: Daniel P. Berrangé Date: Mon, 17 Dec 2018 13:17:26 +0000 (+0000) Subject: tests: ignore XML files starting with a . X-Git-Tag: v5.0.0-rc1~82 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3dc3e58b3299f88400fc105f020469c4e102920e;p=thirdparty%2Flibvirt.git tests: ignore XML files starting with a . 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 Signed-off-by: Daniel P. Berrangé --- diff --git a/tests/virschematest.c b/tests/virschematest.c index 4c348d9909..d1bcdeac9c 100644 --- a/tests/virschematest.c +++ b/tests/virschematest.c @@ -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;