libvirt/tests/qemuhelptest.c
Eric Blake 6e769ebadb qemu: require qmp on new enough qemu
The qemu developers have made it clear that modern qemu will no
longer guarantee human monitor command stability; furthermore,
some features, such as async events, are only supported via qmp.
If we are compiled without support for handling JSON, we cannot
expect to sanely interact with modern qemu.

However, things must continue to build on RHEL 5, where qemu
is stuck at 0.10, and where yajl is not available.

Another benefit of this patch: future additions of new monitor
commands need only focus on qemu_monitor_json.c, instead of
also wasting time with qemu_monitor_text.c.

* src/qemu/qemu_capabilities.c (qemuCapsComputeCmdFlags): Report
error if yajl is missing but qemu requires qmp.
(qemuCapsParseHelpStr): Propagate error.
(qemuCapsExtractVersionInfo): Update caller.
* tests/qemuhelptest.c (testHelpStrParsing): Likewise.
2012-01-27 08:45:50 -07:00

692 lines
22 KiB
C

#include <config.h>
#ifdef WITH_QEMU
# include <stdio.h>
# include <stdlib.h>
# include "testutils.h"
# include "qemu/qemu_capabilities.h"
# include "memory.h"
struct testInfo {
const char *name;
virBitmapPtr flags;
unsigned int version;
unsigned int is_kvm;
unsigned int kvm_version;
};
static void printMismatchedFlags(virBitmapPtr got,
virBitmapPtr expect)
{
int i;
for (i = 0 ; i < QEMU_CAPS_LAST ; i++) {
bool gotFlag = qemuCapsGet(got, i);
bool expectFlag = qemuCapsGet(expect, i);
if (gotFlag && !expectFlag)
fprintf(stderr, "Extra flag %i\n", i);
if (!gotFlag && expectFlag)
fprintf(stderr, "Missing flag %i\n", i);
}
}
static int testHelpStrParsing(const void *data)
{
const struct testInfo *info = data;
char *path = NULL;
char *help = NULL;
unsigned int version, is_kvm, kvm_version;
virBitmapPtr flags = NULL;
int ret = -1;
char *got = NULL;
char *expected = NULL;
if (virAsprintf(&path, "%s/qemuhelpdata/%s", abs_srcdir, info->name) < 0)
return -1;
if (virtTestLoadFile(path, &help) < 0)
goto cleanup;
if (!(flags = qemuCapsNew()))
goto cleanup;
if (qemuCapsParseHelpStr("QEMU", help, flags,
&version, &is_kvm, &kvm_version, false) == -1)
goto cleanup;
# ifndef HAVE_YAJL
if (qemuCapsGet(info->flags, QEMU_CAPS_MONITOR_JSON))
qemuCapsSet(flags, QEMU_CAPS_MONITOR_JSON);
# endif
if (qemuCapsGet(info->flags, QEMU_CAPS_DEVICE)) {
VIR_FREE(path);
VIR_FREE(help);
if (virAsprintf(&path, "%s/qemuhelpdata/%s-device", abs_srcdir,
info->name) < 0)
goto cleanup;
if (virtTestLoadFile(path, &help) < 0)
goto cleanup;
if (qemuCapsParseDeviceStr(help, flags) < 0)
goto cleanup;
}
got = virBitmapString(flags);
expected = virBitmapString(info->flags);
if (!got || !expected)
goto cleanup;
if (STRNEQ(got, expected)) {
if (virTestGetVerbose() || virTestGetDebug())
fprintf(stderr,
"%s: computed flags do not match: got %s, expected %s\n",
info->name, got, expected);
if (virTestGetDebug())
printMismatchedFlags(flags, info->flags);
goto cleanup;
}
if (version != info->version) {
fprintf(stderr, "%s: parsed versions do not match: got %u, expected %u\n",
info->name, version, info->version);
goto cleanup;
}
if (is_kvm != info->is_kvm) {
fprintf(stderr,
"%s: parsed is_kvm flag does not match: got %u, expected %u\n",
info->name, is_kvm, info->is_kvm);
goto cleanup;
}
if (kvm_version != info->kvm_version) {
fprintf(stderr,
"%s: parsed KVM versions do not match: got %u, expected %u\n",
info->name, kvm_version, info->kvm_version);
goto cleanup;
}
ret = 0;
cleanup:
VIR_FREE(path);
VIR_FREE(help);
qemuCapsFree(flags);
VIR_FREE(got);
VIR_FREE(expected);
return ret;
}
static int
mymain(void)
{
int ret = 0;
# define DO_TEST(name, version, is_kvm, kvm_version, ...) \
do { \
struct testInfo info = { \
name, NULL, version, is_kvm, kvm_version \
}; \
if (!(info.flags = qemuCapsNew())) \
return EXIT_FAILURE; \
qemuCapsSetList(info.flags, __VA_ARGS__, QEMU_CAPS_LAST); \
if (virtTestRun("QEMU Help String Parsing " name, \
1, testHelpStrParsing, &info) < 0) \
ret = -1; \
qemuCapsFree(info.flags); \
} while (0)
DO_TEST("qemu-0.9.1", 9001, 0, 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BOOT_MENU,
QEMU_CAPS_FSDEV,
QEMU_CAPS_NAME_PROCESS,
QEMU_CAPS_SMBIOS_TYPE,
QEMU_CAPS_VGA_QXL,
QEMU_CAPS_SPICE,
QEMU_CAPS_VGA_NONE,
QEMU_CAPS_MIGRATE_QEMU_FD,
QEMU_CAPS_BOOTINDEX,
QEMU_CAPS_HDA_DUPLEX,
QEMU_CAPS_DRIVE_AIO,
QEMU_CAPS_CCID_EMULATED,
QEMU_CAPS_CCID_PASSTHRU,
QEMU_CAPS_CHARDEV_SPICEVMC,
QEMU_CAPS_VIRTIO_TX_ALG,
QEMU_CAPS_DEVICE_QXL_VGA,
QEMU_CAPS_PCI_MULTIFUNCTION,
QEMU_CAPS_VIRTIO_IOEVENTFD,
QEMU_CAPS_SGA,
QEMU_CAPS_VIRTIO_BLK_EVENT_IDX,
QEMU_CAPS_VIRTIO_NET_EVENT_IDX,
QEMU_CAPS_DRIVE_CACHE_DIRECTSYNC,
QEMU_CAPS_PIIX3_USB_UHCI,
QEMU_CAPS_PIIX4_USB_UHCI,
QEMU_CAPS_USB_EHCI,
QEMU_CAPS_ICH9_USB_EHCI1,
QEMU_CAPS_VT82C686B_USB_UHCI,
QEMU_CAPS_PCI_OHCI,
QEMU_CAPS_USB_HUB,
QEMU_CAPS_NO_SHUTDOWN,
QEMU_CAPS_PCI_ROMBAR,
QEMU_CAPS_ICH9_AHCI,
QEMU_CAPS_NO_ACPI,
QEMU_CAPS_FSDEV_READONLY,
QEMU_CAPS_VIRTIO_BLK_SCSI,
QEMU_CAPS_VIRTIO_BLK_SG_IO,
QEMU_CAPS_CPU_HOST,
QEMU_CAPS_FSDEV_WRITEOUT);
return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
}
VIRT_TEST_MAIN(mymain)
#else
# include "testutils.h"
int main(void)
{
return EXIT_AM_SKIP;
}
#endif /* WITH_QEMU */