aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2011-12-22 17:47:46 -0700
committerDaniel Veillard <veillard@redhat.com>2011-12-30 10:38:37 +0800
commit116d6af9791cf535e7e4e501db54ad0266300be1 (patch)
tree83778421b346120f99b9d74089c34c8c74c7ebb4 /tests/qemuxml2xmltest.c
parentRequire avahi as an rpm dependancy (diff)
downloadlibvirt-116d6af9791cf535e7e4e501db54ad0266300be1.tar.gz
libvirt-116d6af9791cf535e7e4e501db54ad0266300be1.tar.bz2
libvirt-116d6af9791cf535e7e4e501db54ad0266300be1.zip
schema: rewrite seclabel rng to match code
The RNG for <seclabel> was too strict - if it was present, then it had to have sub-elements, even if those didn't make sense for the given attributes. Also, we didn't have any tests of <seclabel> parsing or XML output. In this patch, I added more parsing tests than output tests (since the output populates and/or reorders fields not present in certain inputs). Making the RNG reliable is a precursor to using <seclabel> variants in more places in the XML in later patches. See also: http://berrange.com/posts/2011/09/29/two-small-improvements-to-svirt-guest-configuration-flexibility-with-kvmlibvirt/ * docs/schemas/domaincommon.rng (seclabel): Tighten rules. * tests/qemuxml2argvtest.c (mymain): New tests. * tests/qemuxml2xmltest.c (mymain): Likewise. * tests/qemuxml2argvdata/qemuxml2argv-seclabel-*.*: New files.
Diffstat (limited to 'tests/qemuxml2xmltest.c')
-rw-r--r--tests/qemuxml2xmltest.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c
index 35bfdcebc..e4b99c40e 100644
--- a/tests/qemuxml2xmltest.c
+++ b/tests/qemuxml2xmltest.c
@@ -194,6 +194,9 @@ mymain(void)
DO_TEST("usb-redir");
DO_TEST("blkdeviotune");
+ DO_TEST("seclabel-dynamic-baselabel");
+ DO_TEST("seclabel-static");
+
/* These tests generate different XML */
DO_TEST_DIFFERENT("balloon-device-auto");
DO_TEST_DIFFERENT("channel-virtio-auto");