]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemuxml2xmltest: Remove pointless inactive->active testing
authorPeter Krempa <pkrempa@redhat.com>
Fri, 15 Dec 2023 21:51:48 +0000 (22:51 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 17 Jan 2024 16:31:12 +0000 (17:31 +0100)
commiteb994dee5b54eb16719f95c4e0d90e1f32ea1089
tree40fda56dda7dc3cca308760171a8596268075655
parentb4e8196c50ca8b0273ecc6e8b02e79287d7c20f6
qemuxml2xmltest: Remove pointless inactive->active testing

'virDomainDefFormatInternalSetRootName' which is the top level XML
formatter function has the following condition as the very first thing:

     if (def->id == -1)
         flags |= VIR_DOMAIN_DEF_FORMAT_INACTIVE;

This makes it pointless to separately do inactive->active and
inactive->inactive XML -> XML testing as both will be in the end treated
as inactive->inactive.

This patch adds a warning to virDomainDefFormatInternalSetRootName and
removes the second pointless invocation of the test from
qemuxml2xmtest.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/conf/domain_conf.c
tests/qemuxml2xmltest.c