[libvirt] [PATCH 02/10] tests: qemucapabilities: Reset command sequence before second probe

Peter Krempa posted 10 patches 6 years, 11 months ago
[libvirt] [PATCH 02/10] tests: qemucapabilities: Reset command sequence before second probe
Posted by Peter Krempa 6 years, 11 months ago
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>
---
 tests/qemucapabilitiestest.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tests/qemucapabilitiestest.c b/tests/qemucapabilitiestest.c
index 5a42a35c11..6981e973a6 100644
--- a/tests/qemucapabilitiestest.c
+++ b/tests/qemucapabilitiestest.c
@@ -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;
-- 
2.16.2

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 02/10] tests: qemucapabilities: Reset command sequence before second probe
Posted by John Ferlan 6 years, 11 months ago

On 06/04/2018 09:58 AM, Peter Krempa wrote:
> 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>
> ---
>  tests/qemucapabilitiestest.c | 3 +++
>  1 file changed, 3 insertions(+)
> 

Reviewed-by: John Ferlan <jferlan@redhat.com>

John

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list