Skip to content

qemu-iotests: add test for fd passing via SCM rights

Wenchao Xia qemu-devel 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest3 patches 7 repliesIn review
  2. v33 patches 3 repliesSuperseded
  3. v23 patches 7 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v13 patches1 replySuperseded

Changes in v4 from the cover letter

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.

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3qemu-iotests: add unix socket help programconfigure tests/Makefile tests/qemu-iotests/socket_scm_helper.c+138 -20 replies
2/3qemu-iotests: add infrastructure of fd passing via SCMQMP/qmp.py tests/qemu-iotests/check tests/qemu-iotests/iotests.py+30 -00 replies
3/3qemu-iotests: add tests for runtime fd passing via SCM rightstests/qemu-iotests/045 tests/qemu-iotests/045.out+52 -30 replies

Reviews trailers per patch

None of the 3 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchStefan Hajnoczi
SeriesR-b
1/3
2/3
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [Qemu-devel] [PATCH V4 0/3] qemu-iotests: add test for fd passing via SCM rights

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