• E
    seclabel: make code and RNG match · c052d8a8
    Eric Blake 提交于
    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.
    c052d8a8
qemuxml2argvtest.c 29.7 KB