• E
    conf: fix omission of <driver> in domain dumpxml · 8fb44675
    Eric Blake 提交于
    I noticed that depending on the <driver> attributes the user passed
    in, the output may omit the <driver> element altogether.  For example,
    the rerror_policy has had this problem since commit 4bb4109f in Oct
    2011.  But in adding testsuite coverage to expose it, I found another
    problem: the C code is just fine without a driver name, but the
    XML validator required either a name or a cache mode.
    
    * src/conf/domain_conf.c (virDomainDiskDefFormat): Update
    conditional.
    * docs/schemas/domaincommon.rng (diskDriver): Simplify.
    * tests/qemuxml2argvdata/qemuxml2argv-disk-drive-copy-on-read.xml:
    * tests/qemuxml2argvdata/qemuxml2argv-disk-drive-copy-on-read.args:
    New files.
    * tests/qemuxml2argvdata/qemuxml2argv-disk-drive-discard.xml:
    Enhance test.
    * tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-drive-discard.xml:
    Likewise.
    * tests/qemuxml2argvtest.c (mymain): New test.
    * tests/qemuxml2xmltest.c (mymain): Likewise.
    Signed-off-by: NEric Blake <eblake@redhat.com>
    Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
    8fb44675
domaincommon.rng 115.4 KB