]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
tests: qemucapabilities: Reset command sequence before second probe
authorPeter Krempa <pkrempa@redhat.com>
Mon, 4 Jun 2018 09:21:51 +0000 (11:21 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 12 Jun 2018 08:27:50 +0000 (10:27 +0200)
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>
tests/qemucapabilitiestest.c

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