]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: command: move qemuBuildGraphicsSPICECommandLine validation to qemu_domain.c
authorDaniel Henrique Barboza <danielhb413@gmail.com>
Mon, 9 Dec 2019 23:15:27 +0000 (20:15 -0300)
committerCole Robinson <crobinso@redhat.com>
Mon, 16 Dec 2019 22:51:26 +0000 (17:51 -0500)
commitc19bb8c0cf3f02141679ef1a7664d08b28756058
tree3cc756e84b2d0e8e2afb756ec53ffb9bf4a6b065
parent45270337f057f26ce484f6e2cf197aeeb7d0c4ea
qemu: command: move qemuBuildGraphicsSPICECommandLine validation to qemu_domain.c

Move the SPICE caps validation from qemuBuildGraphicsSPICECommandLine()
to a new function called qemuDomainDeviceDefValidateSPICEGraphics().
This function is called by qemuDomainDeviceDefValidateGraphics(),
which in turn is called by qemuDomainDefValidate(), validating the graphics
parameters in domain define time.

This validation move exposed a flaw in the 'default-video-type' tests
for PPC64, AARCH64 and s390 archs. The XML was considering 'spice' as
the default video type, which isn't true for those architectures.
This was flying under the radar until now because the SPICE validation
was being made in 'virsh start' time, while the XML validation done in
qemuxml2xmltest.c considers define time.

All other tests were adapted to consider SPICE validation in this
earlier stage.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
src/qemu/qemu_command.c
src/qemu/qemu_domain.c
tests/qemuhotplugtest.c
tests/qemuxml2argvdata/default-video-type-aarch64.xml
tests/qemuxml2argvdata/default-video-type-ppc64.xml
tests/qemuxml2argvdata/default-video-type-s390x.xml
tests/qemuxml2xmloutdata/default-video-type-aarch64.aarch64-latest.xml
tests/qemuxml2xmloutdata/default-video-type-ppc64.ppc64-latest.xml
tests/qemuxml2xmloutdata/default-video-type-s390x.s390x-latest.xml
tests/qemuxml2xmltest.c