]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemuxmlactivetest: Prepare for proper active/inactive -> active/inactive testing
authorPeter Krempa <pkrempa@redhat.com>
Fri, 15 Dec 2023 15:30:20 +0000 (16:30 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 17 Jan 2024 16:31:12 +0000 (17:31 +0100)
commita895686bd1bee69afa23c6c2aebf814d4fdb22f7
treed835e56ab37ed8b90344494732656126f02304be
parent3b04d481923014c4f1addb6fe6e5dd951ee76566
qemuxmlactivetest: Prepare for proper active/inactive -> active/inactive testing

Currently the xml->xml testing we have in qemuxml2xmltest covers only 3
of the 4 possibilities:

By invocation:
  active -> active;
  inactive -> inactive;

by unintentionally:
  active -> inactive  (for configs which don't set an 'id' as the
                       formatter assumes it's inactive)

To do it better introduce proper active -> inactive/active testing into
qemuxmlactivetest. It's chosen such as we only really parse an XML as
live when restoring a status XML. To give users possibility to avoid
constructing a full status XML add a simpler variant. As of such it will
be used only for configs where we specifically cared about parsing live
data.

To ensure that the formatter doesn't decide that a config is inactive
because it doesn't have an ID we fill in a domain ID if it was not
present in the source.

In this patch the tests are not yet added.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
tests/qemuxmlactivetest.c
tests/testutilsqemu.c
tests/testutilsqemu.h