mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
qemu: cache host arch separately from virCapsPtr
As part of a goal to eliminate the need to use virCapsPtr for anything other than the virConnectGetCapabilies() API impl, cache the host arch against the QEMU driver struct and use that field directly. In the tests we move virArchFromHost() globally in testutils.c so that every test runs with a fixed default architecture reported. Reviewed-by: Michal Privoznik <mprivozn@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
@@ -101,7 +101,7 @@ mymain(void)
|
||||
* ensure settings are prioritized as expected.
|
||||
*/
|
||||
|
||||
qemuTestSetHostArch(driver.caps, VIR_ARCH_X86_64);
|
||||
qemuTestSetHostArch(&driver, VIR_ARCH_X86_64);
|
||||
|
||||
DO_TEST("pc-kvm", 0);
|
||||
DO_TEST("pc-tcg", 0);
|
||||
@@ -115,7 +115,7 @@ mymain(void)
|
||||
DO_TEST("pc-hardlimit+locked+hostdev", 2147483648);
|
||||
DO_TEST("pc-locked+hostdev", VIR_DOMAIN_MEMORY_PARAM_UNLIMITED);
|
||||
|
||||
qemuTestSetHostArch(driver.caps, VIR_ARCH_PPC64);
|
||||
qemuTestSetHostArch(&driver, VIR_ARCH_PPC64);
|
||||
if (!(qemuCaps = virQEMUCapsNew())) {
|
||||
ret = -1;
|
||||
goto cleanup;
|
||||
|
||||
Reference in New Issue
Block a user