From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49260) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VJfZg-0002jB-G7 for qemu-devel@nongnu.org; Wed, 11 Sep 2013 04:15:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VJfZY-0001Dk-Em for qemu-devel@nongnu.org; Wed, 11 Sep 2013 04:14:56 -0400 Received: from e23smtp03.au.ibm.com ([202.81.31.145]:58405) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VJfZX-0001DN-SW for qemu-devel@nongnu.org; Wed, 11 Sep 2013 04:14:48 -0400 Received: from /spool/local by e23smtp03.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 11 Sep 2013 18:03:00 +1000 Received: from d23relay03.au.ibm.com (d23relay03.au.ibm.com [9.190.235.21]) by d23dlp01.au.ibm.com (Postfix) with ESMTP id CD7AB2CE8053 for ; Wed, 11 Sep 2013 18:14:34 +1000 (EST) Received: from d23av03.au.ibm.com (d23av03.au.ibm.com [9.190.234.97]) by d23relay03.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r8B8EN1J64356426 for ; Wed, 11 Sep 2013 18:14:24 +1000 Received: from d23av03.au.ibm.com (localhost [127.0.0.1]) by d23av03.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id r8B8EYgS004143 for ; Wed, 11 Sep 2013 18:14:34 +1000 Message-ID: <52302669.5000503@linux.vnet.ibm.com> Date: Wed, 11 Sep 2013 16:14:33 +0800 From: Wenchao Xia MIME-Version: 1.0 References: <1378437874-28103-1-git-send-email-xiawenc@linux.vnet.ibm.com> <20130909115720.GB20215@stefanha-thinkpad.redhat.com> <20130910114751.GA2797@dhcp-200-207.str.redhat.com> <522FD7B6.5040604@linux.vnet.ibm.com> <20130911073220.GA2305@dhcp-200-207.str.redhat.com> In-Reply-To: <20130911073220.GA2305@dhcp-200-207.str.redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH V4 0/3] qemu-iotests: add test for fd passing via SCM rights List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: Stefan Hajnoczi , lcapitulino@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com, armbru@redhat.com 于 2013/9/11 15:32, Kevin Wolf 写道: > Am 11.09.2013 um 04:38 hat Wenchao Xia geschrieben: >> 于 2013/9/10 19:47, Kevin Wolf 写道: >>> Am 09.09.2013 um 13:57 hat Stefan Hajnoczi geschrieben: >>>> On Fri, Sep 06, 2013 at 11:24:31AM +0800, Wenchao Xia wrote: >>>>> This series add test case for fd passing with unix socket at runtime. Since >>>>> getfd and closefd interface will interact with monitor's data, so it will >>>>> help to do regression test for monitor patches. Since python2 do not support >>>>> sendmsg(), so a C helper program is added to do the job. >>>>> >>>>> v2: >>>>> 1: add missing $ in the makefile rule. >>>>> >>>>> v3: >>>>> Address Eric's comments: >>>>> 1: typo fix, remove "." in the end of error message, strick >>>>> check argc as "!=", use EXIT_SUCCESS and EXIT_FAILURE as exit >>>>> values, strict error check for strtol() call. >>>>> Address Luiz's comments: >>>>> 1: change the helper program parameter as "bin< socket-fd> < file-path>", >>>>> the program open the file itself now, data parameter is removed and blank >>>>> is always used as iov data, better usage tip message, folder the string parsing >>>>> code into a function. >>>>> 2: related change for helper program parameter change. >>>>> 3: related change for helper program parameter change. >>>>> Other: >>>>> 1: remove "LINK" rule in makefile, remove fd checking code inside send_fd() >>>>> since it is already checked before calling, add '' around %s for path and >>>>> number string in error message. >>>>> 2: renamed fd_bin to bin in send_fd_scm() to tip better, add '' around %s >>>>> for path in error message. >>>>> v4: >>>>> Address Stefan's comments: >>>>> 2: add space after # for comments, refined the comment's grammar. >>>>> 3: add space after # for comments, refined the comment's grammar, add two >>>>> test cases for error path. >>>>> >>>>> Wenchao Xia (3): >>>>> 1 qemu-iotests: add unix socket help program >>>>> 2 qemu-iotests: add infrastructure of fd passing via SCM >>>>> 3 qemu-iotests: add tests for runtime fd passing via SCM rights >>>>> >>>>> QMP/qmp.py | 6 ++ >>>>> configure | 2 +- >>>>> tests/Makefile | 3 +- >>>>> tests/qemu-iotests/045 | 51 ++++++++++++- >>>>> tests/qemu-iotests/045.out | 4 +- >>>>> tests/qemu-iotests/check | 1 + >>>>> tests/qemu-iotests/iotests.py | 23 ++++++ >>>>> tests/qemu-iotests/socket_scm_helper.c | 135 ++++++++++++++++++++++++++++++++ >>>>> 8 files changed, 220 insertions(+), 5 deletions(-) >>>>> create mode 100644 tests/qemu-iotests/socket_scm_helper.c >>>> Reviewed-by: Stefan Hajnoczi >>> I'm not completely convinced that it's a good idea to introduce a helper >>> binary that isn't automatically rebuilt after an upgrade (I basically >> Indeed it will not be rebuilt when code for qemu change, but will be >> rebuilt when >> socket_scm_helper.c change. The help program have no connection with >> qemu's main code, >> so I think it is safe. >> The binaries built under tests/ will not be cleaned, so I think they >> all have a chance to >> stay as old version. If this is the issue you mean, I will send a >> patch clean them, which >> is what I planned to do sometimes ago . :) > The difference is that the binaries under tests/ will usually only ever > be called using 'make check', which does update them. In contrast, I > usually run qemu-iotests by directly executing check -T -nocache -qcow2, > which doesn't update anything. > > Kevin > OK, I see the problem now. I guess "make" is done before to update qemu binary, so the problem is how to trigger the build of helper. What about add Makefile in test/qemu-iotests/ ? Then 'make check' in root dir, and 'check -T ..." both trigger the build. >>> never run 'make check-block', which is the only way that would trigger >>> it), but given this Reviewed-by, I've applied this to the block branch. >>> >>> Kevin >>>