libvirt/tests/testutilsqemu.h
Peter Krempa e831821cbc tests: qemu: Add helper code to lookup latest capability file
The helper iterates the directory with files for the capability test and
looks up the most recent one for the given architecture. This will allow
testing against the newest qemu capabilities so that we can catch
regressions in behaviour more easily.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
2018-04-19 11:20:34 +02:00

48 lines
1.3 KiB
C

#ifdef WITH_QEMU
# include "capabilities.h"
# include "virfilecache.h"
# include "domain_conf.h"
# include "qemu/qemu_capabilities.h"
# include "qemu/qemu_conf.h"
enum {
GIC_NONE = 0,
GIC_V2,
GIC_V3,
GIC_BOTH,
};
virCapsPtr testQemuCapsInit(void);
virDomainXMLOptionPtr testQemuXMLConfInit(void);
virQEMUCapsPtr qemuTestParseCapabilitiesArch(virArch arch,
const char *capsFile);
virQEMUCapsPtr qemuTestParseCapabilities(virCapsPtr caps,
const char *capsFile);
extern virCPUDefPtr cpuDefault;
extern virCPUDefPtr cpuHaswell;
extern virCPUDefPtr cpuPower8;
extern virCPUDefPtr cpuPower9;
void qemuTestSetHostArch(virCapsPtr caps,
virArch arch);
void qemuTestSetHostCPU(virCapsPtr caps,
virCPUDefPtr cpu);
int qemuTestDriverInit(virQEMUDriver *driver);
void qemuTestDriverFree(virQEMUDriver *driver);
int qemuTestCapsCacheInsert(virFileCachePtr cache,
virQEMUCapsPtr caps);
int testQemuCapsSetGIC(virQEMUCapsPtr qemuCaps,
int gic);
char *testQemuGetLatestCapsForArch(const char *dirname,
const char *arch,
const char *suffix);
#endif