diff --git a/tests/testutilsqemu.c b/tests/testutilsqemu.c index f8182033fc486a249382859d2836d0bc7844f7a1..9671a46f125d9277308ba68deae64ecb12456667 100644 --- a/tests/testutilsqemu.c +++ b/tests/testutilsqemu.c @@ -486,16 +486,13 @@ qemuTestSetHostCPU(virCapsPtr caps, virQEMUCapsPtr -qemuTestParseCapabilities(virCapsPtr caps, - const char *capsFile) +qemuTestParseCapabilitiesArch(virArch arch, + const char *capsFile) { virQEMUCapsPtr qemuCaps = NULL; - if (!caps) - return NULL; - if (!(qemuCaps = virQEMUCapsNew()) || - virQEMUCapsLoadCache(caps->host.arch, qemuCaps, capsFile) < 0) + virQEMUCapsLoadCache(arch, qemuCaps, capsFile) < 0) goto error; return qemuCaps; @@ -505,6 +502,18 @@ qemuTestParseCapabilities(virCapsPtr caps, return NULL; } + +virQEMUCapsPtr +qemuTestParseCapabilities(virCapsPtr caps, + const char *capsFile) +{ + if (!caps) + return NULL; + + return qemuTestParseCapabilitiesArch(caps->host.arch, capsFile); +} + + void qemuTestDriverFree(virQEMUDriver *driver) { virMutexDestroy(&driver->lock); diff --git a/tests/testutilsqemu.h b/tests/testutilsqemu.h index f29c6e5d621b00a2b2654dc1eb8a62d3cae66572..7ae8324933d72e11dff36c28c1666e366aabe701 100644 --- a/tests/testutilsqemu.h +++ b/tests/testutilsqemu.h @@ -16,6 +16,9 @@ enum { virCapsPtr testQemuCapsInit(void); virDomainXMLOptionPtr testQemuXMLConfInit(void); + +virQEMUCapsPtr qemuTestParseCapabilitiesArch(virArch arch, + const char *capsFile); virQEMUCapsPtr qemuTestParseCapabilities(virCapsPtr caps, const char *capsFile);