summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2012-02-04 07:01:56 -0700
committerEric Blake <eblake@redhat.com>2012-02-06 12:04:33 -0700
commitc052d8a89f6df81822abbd0a3204d47f402f6de4 (patch)
treef472eed9a8f28673bd58733eea6d32216df000e5 /tests/qemuxml2argvdata/qemuxml2argv-seclabel-none.args
parentmaint: Add test output files to .gitignore (diff)
downloadlibvirt-c052d8a89f6df81822abbd0a3204d47f402f6de4.tar.gz
libvirt-c052d8a89f6df81822abbd0a3204d47f402f6de4.tar.bz2
libvirt-c052d8a89f6df81822abbd0a3204d47f402f6de4.zip
seclabel: make code and RNG match
Commit b170eb99 introduced a bug: domains that had an explicit <seclabel type='none'/> when started would not be reparsed if libvirtd restarted. It turns out that our testsuite was not exercising this because it never tried anything but inactive parsing. Additionally, the live XML for such a domain failed to re-validate. Applying just the tests/ portion of this patch will expose the bugs that are fixed by the other two files. * docs/schemas/domaincommon.rng (seclabel): Allow relabel under type='none'. * src/conf/domain_conf.c (virSecurityLabelDefParseXML): Per RNG, presence of <seclabel> with no type implies dynamic. Don't require sub-elements for type='none'. * tests/qemuxml2xmltest.c (mymain): Add test. * tests/qemuxml2argvtest.c (mymain): Likewise. * tests/qemuxml2argvdata/qemuxml2argv-seclabel-none.xml: Add file. * tests/qemuxml2argvdata/qemuxml2argv-seclabel-none.args: Add file. Reported by Ansis Atteka.
Diffstat (limited to 'tests/qemuxml2argvdata/qemuxml2argv-seclabel-none.args')
-rw-r--r--tests/qemuxml2argvdata/qemuxml2argv-seclabel-none.args4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-seclabel-none.args b/tests/qemuxml2argvdata/qemuxml2argv-seclabel-none.args
new file mode 100644
index 000000000..651793da9
--- /dev/null
+++ b/tests/qemuxml2argvdata/qemuxml2argv-seclabel-none.args
@@ -0,0 +1,4 @@
+LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu -S -M \
+pc -m 214 -smp 1 -name QEMUGuest1 -nographic -monitor unix:/tmp/test-monitor,\
+server,nowait -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial \
+none -parallel none -usb