]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemuxml2argvtest: Modernize 'cpu-(no)fallback' test
authorPeter Krempa <pkrempa@redhat.com>
Tue, 5 Sep 2023 11:04:31 +0000 (13:04 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 6 Sep 2023 12:09:45 +0000 (14:09 +0200)
commitf1e288f6d450ace5d00161cd1d4350b7191081a6
tree32296017c6c46d838ade19348b8a670ce60faee4
parent36072d873efd136afe67d9c7663a066918b5bf39
qemuxml2argvtest: Modernize 'cpu-(no)fallback' test

Previously without modern capabilities the test was relying on a CPU
model which was not entered into a fake list of supported cpus.

With real capabilities we have to pick a CPU model which is supported by
libvirt but in some version is not supported by qemu. I've picked
EPYC-Milan, which was introduced into qemu-6.0.

This test configures a CPU which is equivalent to EPYC-Rome by disabling
features from EPYC-Milan and uses a versioned real caps test to check it
against a qemu which doesn't support EPYC-Milan.

With real capabilities though, we can also do a positive test case by
using a version whic doesh support it. I've specifically not used the
LATEST caps so that it doesn't change once capabilities are bumped.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
tests/qemuxml2argvdata/cpu-fallback.x86_64-5.2.0.args [new file with mode: 0644]
tests/qemuxml2argvdata/cpu-fallback.x86_64-8.0.0.args [moved from tests/qemuxml2argvdata/cpu-fallback.args with 86% similarity]
tests/qemuxml2argvdata/cpu-fallback.xml
tests/qemuxml2argvdata/cpu-nofallback.err [deleted file]
tests/qemuxml2argvdata/cpu-nofallback.x86_64-5.2.0.err [new file with mode: 0644]
tests/qemuxml2argvdata/cpu-nofallback.x86_64-8.0.0.args [new file with mode: 0644]
tests/qemuxml2argvdata/cpu-nofallback.xml
tests/qemuxml2argvtest.c