From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35274) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WJKiR-0000PT-Sb for qemu-devel@nongnu.org; Fri, 28 Feb 2014 05:30:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WJKiG-0007R6-Fs for qemu-devel@nongnu.org; Fri, 28 Feb 2014 05:30:51 -0500 Received: from mail-pa0-f47.google.com ([209.85.220.47]:51065) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WJKiG-0007Qp-3x for qemu-devel@nongnu.org; Fri, 28 Feb 2014 05:30:40 -0500 Received: by mail-pa0-f47.google.com with SMTP id lj1so587076pab.20 for ; Fri, 28 Feb 2014 02:30:39 -0800 (PST) Message-ID: <53106549.2050208@ozlabs.ru> Date: Fri, 28 Feb 2014 21:30:33 +1100 From: Alexey Kardashevskiy MIME-Version: 1.0 References: <53100AF8.8080409@ozlabs.ru> <20140228102731.GC30385@stefanha-thinkpad.redhat.com> In-Reply-To: <20140228102731.GC30385@stefanha-thinkpad.redhat.com> Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] migrate to fd - how to use with HMP? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: "qemu-devel@nongnu.org" On 02/28/2014 09:27 PM, Stefan Hajnoczi wrote: > On Fri, Feb 28, 2014 at 03:05:12PM +1100, Alexey Kardashevskiy wrote: >> However once socket_scm_helper talked to "mon" (./qemu.monitor), I cannot >> get any response from it via "socat UNIX-CONNECT:./qemu.monitor STDIN". > > Have you tried with QMP? Perhaps the HMP monitor handles > connect/disconnect differently from the QMP monitor. > > I guess this will require more step-by-step debugging of monitor.c to > find out what's going on. One of my questions is still unanswered :) Is socket_scm_helper assumed to be correct or it is a bug? Because if it is correct, I do not know what to think. Thanks. diff --git a/tests/qemu-iotests/socket_scm_helper.c b/tests/qemu-iotests/socket_scm_helper.c index 0e2b285..8195983 100644 --- a/tests/qemu-iotests/socket_scm_helper.c +++ b/tests/qemu-iotests/socket_scm_helper.c @@ -52,7 +52,7 @@ static int send_fd(int fd, int fd_to_send) cmsg->cmsg_len = CMSG_LEN(sizeof(int)); cmsg->cmsg_level = SOL_SOCKET; cmsg->cmsg_type = SCM_RIGHTS; - memcpy(CMSG_DATA(cmsg), &fd, sizeof(int)); + memcpy(CMSG_DATA(cmsg), &fd_to_send, sizeof(int)); -- Alexey