mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-09 01:18:00 +03:00
testQemuInfoSetArgs: Strip default machine alias only for 'latest' test cases
For the real-capabilities test cases testing 'latest' capabilities we strip off the alias from 'pc' to the appropriate versioned machine type to prevent update to all tests when bumping qemu capabilities. Recenly we also started caching the capabilities to prevent re-parsing the XML all the time. The commit adding the caching kept the alias stripping prior to cache insertion, thus the cache contains the stripped alias. This leads to problem when a test case is added where the 'latest' equals to the selected version. Move the machine alias stripping after we create a local copy thus stripping it only for 'latest' tests. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
parent
5663be9f3a
commit
0dc45670f1
@ -790,9 +790,6 @@ testQemuInfoSetArgs(struct testQemuInfo *info,
|
||||
if (!(qemuCaps = qemuTestParseCapabilitiesArch(info->arch, capsfile)))
|
||||
goto cleanup;
|
||||
|
||||
if (stripmachinealiases)
|
||||
virQEMUCapsStripMachineAliases(qemuCaps);
|
||||
|
||||
cachedcaps = qemuCaps;
|
||||
|
||||
g_hash_table_insert(capscache, g_strdup(capsfile), g_steal_pointer(&qemuCaps));
|
||||
@ -801,6 +798,9 @@ testQemuInfoSetArgs(struct testQemuInfo *info,
|
||||
if (!(qemuCaps = virQEMUCapsNewCopy(cachedcaps)))
|
||||
goto cleanup;
|
||||
|
||||
if (stripmachinealiases)
|
||||
virQEMUCapsStripMachineAliases(qemuCaps);
|
||||
|
||||
info->flags |= FLAG_REAL_CAPS;
|
||||
|
||||
/* provide path to the replies file for schema testing */
|
||||
|
Loading…
Reference in New Issue
Block a user