Re: [PATCH 17/21] qemuxml2(xml|argv)test: Test real state of things with 'x86-kvm-32-on-64'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On a Thursday in 2022, Peter Krempa wrote:
As demonstrated by the qemuxml2xmltest DO_TEST_CAPS_LATEST data based on
the 'x86-kvm-32-on-64' test case the post parse CPU selection code which
fills in the CPU into the definition does not have exactly the same
logic as we used to have when the cpu model was picked when formatting
the commandline.

Change the qemuxml2argv test to use DO_TEST_CAPS_LATEST too as it
doesn't really make sense to test this on fake data.


Consider also adding a versioned test with QEMU 4.1.0 data which executes the
code path in qemuBuildCpuCommandLine that hardcodes qemu32 for i686
guests.

Ever since
commit 5e939cea896fb3373a6f68f86e325c657429ed3d
    qemu: Store default CPU in domain XML
we fill the default model in post-parse.

The qemuDomainDefSetDefaultCPU function is probably missing:

if (def->os.arch == VIR_ARCH_I686)
    virStringReplace(model, "64", "32");

This possibly shows that there's a regression/change in behaviour which
happened when the CPU code was changed.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
...gs => x86-kvm-32-on-64.x86_64-latest.args} | 14 +++++-----
tests/qemuxml2argvtest.c                      |  2 +-
.../x86-kvm-32-on-64.x86_64-latest.xml        | 27 +++++++++++++++++++
tests/qemuxml2xmltest.c                       |  2 ++
4 files changed, 38 insertions(+), 7 deletions(-)
rename tests/qemuxml2argvdata/{x86-kvm-32-on-64.args => x86-kvm-32-on-64.x86_64-latest.args} (53%)
create mode 100644 tests/qemuxml2xmloutdata/x86-kvm-32-on-64.x86_64-latest.xml


Reviewed-by: Ján Tomko <jtomko@xxxxxxxxxx>

Jano

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux