[libvirt] [PATCH v2 1/5] tests: Check more network XMLs for schema compliance

Jiri Denemark jdenemar at redhat.com
Tue Dec 13 13:52:45 UTC 2016


This revealed bugs in RNG schema for /network/dns/srv.

Signed-off-by: Jiri Denemark <jdenemar at redhat.com>
---
 docs/schemas/network.rng | 8 ++++++++
 tests/virschematest.c    | 2 +-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/docs/schemas/network.rng b/docs/schemas/network.rng
index 1a18e64b2..9d8c803ff 100644
--- a/docs/schemas/network.rng
+++ b/docs/schemas/network.rng
@@ -283,13 +283,21 @@
                   </attribute>
                   <optional>
                     <attribute name="domain"><ref name="dnsName"/></attribute>
+                  </optional>
+                  <optional>
                     <attribute name="target"><text/></attribute>
+                  </optional>
+                  <optional>
                     <attribute name="port">
                       <ref name="unsignedShort"/>
                     </attribute>
+                  </optional>
+                  <optional>
                     <attribute name="priority">
                       <ref name="unsignedShort"/>
                     </attribute>
+                  </optional>
+                  <optional>
                     <attribute name="weight">
                       <ref name="unsignedShort"/>
                     </attribute>
diff --git a/tests/virschematest.c b/tests/virschematest.c
index b31a5bca9..faf66d642 100644
--- a/tests/virschematest.c
+++ b/tests/virschematest.c
@@ -208,7 +208,7 @@ mymain(void)
             "domainsnapshotxml2xmlout");
     DO_TEST("interface.rng", "interfaceschemadata");
     DO_TEST("network.rng", "../src/network", "networkxml2xmlin",
-            "networkxml2xmlout");
+            "networkxml2xmlout", "networkxml2confdata");
     DO_TEST("nodedev.rng", "nodedevschemadata");
     DO_TEST("nwfilter.rng", "nwfilterxml2xmlout");
     DO_TEST("secret.rng", "secretxml2xmlin");
-- 
2.11.0




More information about the libvir-list mailing list