[libvirt] [PATCH 4/9] tests: qemumonitor: Add testing for the 'transaction' command and generators

Eric Blake eblake at redhat.com
Thu Sep 26 22:46:56 UTC 2019


On 9/26/19 11:05 AM, Peter Krempa wrote:
> Validate all the commands against the schema.
> 
> Signed-off-by: Peter Krempa <pkrempa at redhat.com>
> ---
>   tests/qemumonitorjsontest.c | 39 +++++++++++++++++++++++++++++++++++++
>   1 file changed, 39 insertions(+)
> 

> +
> +    if (qemuMonitorTransactionBitmapAdd(actions, "node1", "bitmap1", true, true) < 0 ||
> +        qemuMonitorTransactionBitmapRemove(actions, "node2", "bitmap2") < 0 ||
> +        qemuMonitorTransactionBitmapEnable(actions, "node3", "bitmap3") < 0 ||
> +        qemuMonitorTransactionBitmapDisable(actions, "node4", "bitmap4") < 0 ||
> +        qemuMonitorTransactionBitmapMerge(actions, "node5", "bitmap5", &mergebitmaps) < 0 ||
> +        qemuMonitorTransactionSnapshotLegacy(actions, "dev6", "path", "qcow2", true) < 0 ||
> +        qemuMonitorTransactionSnapshotBlockdev(actions, "node7", "overlay7") < 0)
> +        return -1;

The sequence of transactioned commands don't have to match reality, just 
exercise code paths ;)

Reviewed-by: Eric Blake <eblake at redhat.com>

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org




More information about the libvir-list mailing list