qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2] qmp: fix __accept() in qmp.py
@ 2012-10-15 20:58 Jeff Cody
  2012-10-16  8:06 ` Kevin Wolf
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Jeff Cody @ 2012-10-15 20:58 UTC (permalink / raw)
  To: qemu-devel; +Cc: kwolf, lcapitulino

In QEMUMonitorProtocol, commit e9d17b6 removed the __sockfile creation
from __negotiate_capabilities(), which breaks _accept().  This causes
failures in qemu-io python based tests (i.e. tests 030 and 040).

This patch creates the sockfile in __accept() as well.

Signed-off-by: Jeff Cody <jcody@redhat.com>
---
 QMP/qmp.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/QMP/qmp.py b/QMP/qmp.py
index 33c7d36..32510a1 100644
--- a/QMP/qmp.py
+++ b/QMP/qmp.py
@@ -96,6 +96,7 @@ class QEMUMonitorProtocol:
         @raise QMPCapabilitiesError if fails to negotiate capabilities
         """
         self.__sock, _ = self.__sock.accept()
+        self.__sockfile = self.__sock.makefile()
         return self.__negotiate_capabilities()
 
     def cmd_obj(self, qmp_cmd):
-- 
1.7.11.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH v2] qmp: fix __accept() in qmp.py
  2012-10-15 20:58 [Qemu-devel] [PATCH v2] qmp: fix __accept() in qmp.py Jeff Cody
@ 2012-10-16  8:06 ` Kevin Wolf
  2012-10-16  8:23 ` Stefan Hajnoczi
  2012-10-17  1:54 ` Luiz Capitulino
  2 siblings, 0 replies; 4+ messages in thread
From: Kevin Wolf @ 2012-10-16  8:06 UTC (permalink / raw)
  To: Jeff Cody; +Cc: qemu-devel, lcapitulino

Am 15.10.2012 22:58, schrieb Jeff Cody:
> In QEMUMonitorProtocol, commit e9d17b6 removed the __sockfile creation
> from __negotiate_capabilities(), which breaks _accept().  This causes
> failures in qemu-io python based tests (i.e. tests 030 and 040).
> 
> This patch creates the sockfile in __accept() as well.
> 
> Signed-off-by: Jeff Cody <jcody@redhat.com>

Thanks, applied to the block branch.

Kevin

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH v2] qmp: fix __accept() in qmp.py
  2012-10-15 20:58 [Qemu-devel] [PATCH v2] qmp: fix __accept() in qmp.py Jeff Cody
  2012-10-16  8:06 ` Kevin Wolf
@ 2012-10-16  8:23 ` Stefan Hajnoczi
  2012-10-17  1:54 ` Luiz Capitulino
  2 siblings, 0 replies; 4+ messages in thread
From: Stefan Hajnoczi @ 2012-10-16  8:23 UTC (permalink / raw)
  To: Jeff Cody; +Cc: kwolf, qemu-devel, lcapitulino

On Mon, Oct 15, 2012 at 04:58:02PM -0400, Jeff Cody wrote:
> In QEMUMonitorProtocol, commit e9d17b6 removed the __sockfile creation
> from __negotiate_capabilities(), which breaks _accept().  This causes
> failures in qemu-io python based tests (i.e. tests 030 and 040).
> 
> This patch creates the sockfile in __accept() as well.
> 
> Signed-off-by: Jeff Cody <jcody@redhat.com>
> ---
>  QMP/qmp.py | 1 +
>  1 file changed, 1 insertion(+)

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH v2] qmp: fix __accept() in qmp.py
  2012-10-15 20:58 [Qemu-devel] [PATCH v2] qmp: fix __accept() in qmp.py Jeff Cody
  2012-10-16  8:06 ` Kevin Wolf
  2012-10-16  8:23 ` Stefan Hajnoczi
@ 2012-10-17  1:54 ` Luiz Capitulino
  2 siblings, 0 replies; 4+ messages in thread
From: Luiz Capitulino @ 2012-10-17  1:54 UTC (permalink / raw)
  To: Jeff Cody; +Cc: kwolf, qemu-devel

On Mon, 15 Oct 2012 16:58:02 -0400
Jeff Cody <jcody@redhat.com> wrote:

> In QEMUMonitorProtocol, commit e9d17b6 removed the __sockfile creation
> from __negotiate_capabilities(), which breaks _accept().  This causes
> failures in qemu-io python based tests (i.e. tests 030 and 040).
> 
> This patch creates the sockfile in __accept() as well.
> 
> Signed-off-by: Jeff Cody <jcody@redhat.com>

Acked-by: Luiz Capitulino <lcapitulino@redhat.com>

> ---
>  QMP/qmp.py | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/QMP/qmp.py b/QMP/qmp.py
> index 33c7d36..32510a1 100644
> --- a/QMP/qmp.py
> +++ b/QMP/qmp.py
> @@ -96,6 +96,7 @@ class QEMUMonitorProtocol:
>          @raise QMPCapabilitiesError if fails to negotiate capabilities
>          """
>          self.__sock, _ = self.__sock.accept()
> +        self.__sockfile = self.__sock.makefile()
>          return self.__negotiate_capabilities()
>  
>      def cmd_obj(self, qmp_cmd):

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-10-17  1:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-15 20:58 [Qemu-devel] [PATCH v2] qmp: fix __accept() in qmp.py Jeff Cody
2012-10-16  8:06 ` Kevin Wolf
2012-10-16  8:23 ` Stefan Hajnoczi
2012-10-17  1:54 ` Luiz Capitulino

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).