mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
qemuxml2xmltest: Always include basic set of capabilities
Use virQEMUCapsInitQMPBasicArch to add the basic set of capabilities which all qemu versions will get. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
parent
86c1fcf7cd
commit
987644a9dc
@ -15,6 +15,9 @@
|
|||||||
#include "virfilewrapper.h"
|
#include "virfilewrapper.h"
|
||||||
#include "configmake.h"
|
#include "configmake.h"
|
||||||
|
|
||||||
|
#define LIBVIRT_QEMU_CAPSPRIV_H_ALLOW
|
||||||
|
#include "qemu/qemu_capspriv.h"
|
||||||
|
|
||||||
#define VIR_FROM_THIS VIR_FROM_NONE
|
#define VIR_FROM_THIS VIR_FROM_NONE
|
||||||
|
|
||||||
static virQEMUDriver driver;
|
static virQEMUDriver driver;
|
||||||
@ -26,11 +29,27 @@ enum {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
static int
|
||||||
|
testXML2XMLCommon(const struct testQemuInfo *info)
|
||||||
|
{
|
||||||
|
if (!(info->flags & FLAG_REAL_CAPS)) {
|
||||||
|
virQEMUCapsInitQMPBasicArch(info->qemuCaps);
|
||||||
|
if (qemuTestCapsCacheInsert(driver.qemuCapsCache, info->qemuCaps) < 0)
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
testXML2XMLActive(const void *opaque)
|
testXML2XMLActive(const void *opaque)
|
||||||
{
|
{
|
||||||
const struct testQemuInfo *info = opaque;
|
const struct testQemuInfo *info = opaque;
|
||||||
|
|
||||||
|
if (testXML2XMLCommon(info) < 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
return testCompareDomXML2XMLFiles(driver.caps, driver.xmlopt,
|
return testCompareDomXML2XMLFiles(driver.caps, driver.xmlopt,
|
||||||
info->infile, info->outfile, true,
|
info->infile, info->outfile, true,
|
||||||
info->parseFlags,
|
info->parseFlags,
|
||||||
@ -43,6 +62,9 @@ testXML2XMLInactive(const void *opaque)
|
|||||||
{
|
{
|
||||||
const struct testQemuInfo *info = opaque;
|
const struct testQemuInfo *info = opaque;
|
||||||
|
|
||||||
|
if (testXML2XMLCommon(info) < 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
return testCompareDomXML2XMLFiles(driver.caps, driver.xmlopt,
|
return testCompareDomXML2XMLFiles(driver.caps, driver.xmlopt,
|
||||||
info->infile, info->outfile, false,
|
info->infile, info->outfile, false,
|
||||||
info->parseFlags,
|
info->parseFlags,
|
||||||
|
Loading…
Reference in New Issue
Block a user