From 862bbf8a5a5996523d1881d5c6e30b47cd65808f Mon Sep 17 00:00:00 2001 From: Erik Skultety Date: Tue, 10 Feb 2015 17:17:36 +0100 Subject: [PATCH] schema: allow multiple seclabel for devices in domaincommon.rng In our RNG schema we do allow multiple (different) seclabels per-domain, but don't allow this for devices, yet we neither have a check in our XML parser, nor in a post-parse callback. In that case we should allow multiple (different) seclabels for devices as well. --- docs/schemas/domaincommon.rng | 16 +++++----- .../qemuxml2argv-seclabel-device-multiple.xml | 32 +++++++++++++++++++ tests/qemuxml2xmltest.c | 1 + 3 files changed, 41 insertions(+), 8 deletions(-) create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-seclabel-device-multiple.xml diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index d467dce6d..b1f4eaac0 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -1344,9 +1344,9 @@ - + - + @@ -1367,9 +1367,9 @@ - + - + @@ -1497,9 +1497,9 @@ - + - + @@ -3195,9 +3195,9 @@ - + - + diff --git a/tests/qemuxml2argvdata/qemuxml2argv-seclabel-device-multiple.xml b/tests/qemuxml2argvdata/qemuxml2argv-seclabel-device-multiple.xml new file mode 100644 index 000000000..ce7f4f711 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-seclabel-device-multiple.xml @@ -0,0 +1,32 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219100 + 219100 + 1 + + hvm + + + + destroy + restart + destroy + + /usr/bin/qemu + + + + + + + + +
+ + + + + + + diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index d3dfd9e75..cc29083a4 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -337,6 +337,7 @@ mymain(void) DO_TEST_DIFFERENT("seclabel-none"); DO_TEST("seclabel-dac-none"); DO_TEST("seclabel-dynamic-none"); + DO_TEST("seclabel-device-multiple"); DO_TEST_FULL("seclabel-dynamic-none-relabel", true, WHEN_INACTIVE); DO_TEST("numad-static-vcpu-no-numatune"); DO_TEST("disk-scsi-lun-passthrough-sgio"); -- 2.39.5