tests: qemucapabilities: Reset command sequence before second probe

The test data for capabilities is obtained from two consecutive qemu
runs when the regular monitor object will be reset. Do the same for the
test monitor object which is not disposed between runs by calling
qemuMonitorResetCommandID.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
This commit is contained in:
Peter Krempa 2018-06-04 11:21:51 +02:00
parent cc8f8bfdee
commit 215167042a

View File

@ -24,6 +24,8 @@
#include "qemumonitortestutils.h" #include "qemumonitortestutils.h"
#define __QEMU_CAPSPRIV_H_ALLOW__ #define __QEMU_CAPSPRIV_H_ALLOW__
#include "qemu/qemu_capspriv.h" #include "qemu/qemu_capspriv.h"
#define __QEMU_MONITOR_PRIV_H_ALLOW__
#include "qemu/qemu_monitor_priv.h"
#define VIR_FROM_THIS VIR_FROM_NONE #define VIR_FROM_THIS VIR_FROM_NONE
@ -62,6 +64,7 @@ testQemuCaps(const void *opaque)
goto cleanup; goto cleanup;
if (virQEMUCapsGet(capsActual, QEMU_CAPS_KVM)) { if (virQEMUCapsGet(capsActual, QEMU_CAPS_KVM)) {
qemuMonitorResetCommandID(qemuMonitorTestGetMonitor(mon));
if (virQEMUCapsInitQMPMonitorTCG(capsActual, if (virQEMUCapsInitQMPMonitorTCG(capsActual,
qemuMonitorTestGetMonitor(mon)) < 0) qemuMonitorTestGetMonitor(mon)) < 0)
goto cleanup; goto cleanup;