From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33208) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VHmff-0005m9-OO for qemu-devel@nongnu.org; Thu, 05 Sep 2013 23:25:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VHmfX-0000QV-3Z for qemu-devel@nongnu.org; Thu, 05 Sep 2013 23:25:19 -0400 Received: from e28smtp01.in.ibm.com ([122.248.162.1]:50109) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VHmfW-0000Ng-EB for qemu-devel@nongnu.org; Thu, 05 Sep 2013 23:25:11 -0400 Received: from /spool/local by e28smtp01.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 6 Sep 2013 08:45:42 +0530 Received: from d28relay04.in.ibm.com (d28relay04.in.ibm.com [9.184.220.61]) by d28dlp03.in.ibm.com (Postfix) with ESMTP id 95EA21258052 for ; Fri, 6 Sep 2013 08:55:03 +0530 (IST) Received: from d28av02.in.ibm.com (d28av02.in.ibm.com [9.184.220.64]) by d28relay04.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r863OqXQ44695712 for ; Fri, 6 Sep 2013 08:55:02 +0530 Received: from d28av02.in.ibm.com (localhost [127.0.0.1]) by d28av02.in.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id r863OsuD015097 for ; Fri, 6 Sep 2013 08:54:54 +0530 From: Wenchao Xia Date: Fri, 6 Sep 2013 11:24:31 +0800 Message-Id: <1378437874-28103-1-git-send-email-xiawenc@linux.vnet.ibm.com> Subject: [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: qemu-devel@nongnu.org Cc: kwolf@redhat.com, armbru@redhat.com, lcapitulino@redhat.com, stefanha@redhat.com, Wenchao Xia 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