]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: monitor: Add possibility to reset command sequence in tests
authorPeter Krempa <pkrempa@redhat.com>
Fri, 4 May 2018 14:26:08 +0000 (16:26 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 12 Jun 2018 08:27:49 +0000 (10:27 +0200)
commitcc8f8bfdee073032e3793f9350042c3245c062a3
tree4a12577b6a7bde0f8a95fb75495411ffe2a836d9
parentbf72ab16e2ddedf3848d44826ea98d6ba25e9183
qemu: monitor: Add possibility to reset command sequence in tests

qemucapabilitiestest for simplicity uses one test monitor object for
simulating work of two separate inquiries of the qemu process. To allow
better testing in the future it will be required to reset the counter
so that it accurately simulates how qemu would behave.

This patch adds a private monitor API which allows to reset the counter
which will be usable only in tests.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
src/qemu/qemu_monitor.c
src/qemu/qemu_monitor_priv.h [new file with mode: 0644]