[PATCH 2/4] testCompareXMLToArgvValidateSchema: Improve and fix helper for testing everything

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

 



The schema validator has a comment which allows checking all xml2argv
input files for schema validity by forcing the latest schema onto files
which don't have any schema. Fix it so that it works properly with the
caching introduced in previous commit.

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

diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index 647187404c..2d538bee9c 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -528,6 +528,11 @@ testCompareXMLToArgvValidateSchema(virQEMUDriverPtr drv,
     unsigned int parseFlags = info->parseFlags;
     bool netdevQAPIfied = false;

+    /* comment out with line comment to enable schema checking for non _CAPS tests
+    if (!info->schemafile)
+        info->schemafile =  testQemuGetLatestCapsForArch(virArchToString(info->arch), "replies");
+    // */
+
     if (info->schemafile) {
         /* lookup and insert into cache if not found */
         if (!g_hash_table_lookup_extended(info->qapiSchemaCache,
@@ -540,11 +545,6 @@ testCompareXMLToArgvValidateSchema(virQEMUDriverPtr drv,
         }
     }

-    /* comment out with line comment to enable schema checking for non _CAPS tests
-    if (!schema)
-        schema = testQEMUSchemaLoadLatest(virArchToString(info->arch));
-    // */
-
     if (!schema)
         return 0;

-- 
2.29.2




[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