]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
schema: allow a <rule> element with no subelements in a nwfilter
authorLaine Stump <laine@laine.org>
Thu, 21 Jun 2018 06:07:17 +0000 (02:07 -0400)
committerLaine Stump <laine@laine.org>
Thu, 21 Jun 2018 08:04:49 +0000 (04:04 -0400)
This is a regression in behavior caused by commit 37359814. It was
intended to limit the schema to allow only a single subelement of
<rule>, but it is also acceptable for <rule> to have no subelement at
all.

To prevent the same error from reoccurring in the future, the
examples/xml/nwfilter directory was added to the list of nwfilter
schema test directories.

Resolves: https://bugzilla.redhat.com/1593549

Signed-off-by: Laine Stump <laine@laine.org>
ACKed-by: Michal Privoznik <mprivozn@redhat.com>
docs/schemas/nwfilter.rng
tests/virschematest.c

index cca6ff29548bed20f9d19d012af0e747794feea2..17cda5c78d42c350f831b4ad27e250c2408d7bf0 100644 (file)
@@ -20,6 +20,7 @@
           <element name="rule">
             <ref name="rule-node-attributes"/>
             <choice>
+                <empty/>
                 <element name="mac">
                   <ref name="match-attribute"/>
                   <ref name="common-l2-attributes"/>
index 2d35833919437787d68201f459ef405e2ddacc60..aa65a434fff292830599141e1d32c7b50dd25443 100644 (file)
@@ -229,7 +229,7 @@ mymain(void)
     DO_TEST_DIR("network.rng", "../src/network", "networkxml2xmlin",
                 "networkxml2xmlout", "networkxml2confdata");
     DO_TEST_DIR("nodedev.rng", "nodedevschemadata");
-    DO_TEST_DIR("nwfilter.rng", "nwfilterxml2xmlout");
+    DO_TEST_DIR("nwfilter.rng", "nwfilterxml2xmlout", "../examples/xml/nwfilter");
     DO_TEST_DIR("secret.rng", "secretxml2xmlin");
     DO_TEST_DIR("storagepool.rng", "storagepoolxml2xmlin", "storagepoolxml2xmlout",
                 "storagepoolschemadata");