[Qemu-devel] [PATCH v2 0/2] Enable passing pre-opened chardev socket FDs

Daniel P. Berrange posted 2 patches 6 years, 3 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20171221155905.3793-1-berrange@redhat.com
Test checkpatch failed
Test docker passed
Test ppc passed
Test s390x passed
There is a newer version of this series
chardev/char-socket.c  |  32 +++++++--
chardev/char.c         |   3 +
include/qemu/sockets.h |   1 +
io/channel-util.c      |  13 ----
tests/test-char.c      | 173 ++++++++++++++++++++++++++++++++++++++++++++++++-
util/qemu-sockets.c    |  55 +++++++++++++++-
6 files changed, 252 insertions(+), 25 deletions(-)
[Qemu-devel] [PATCH v2 0/2] Enable passing pre-opened chardev socket FDs
Posted by Daniel P. Berrange 6 years, 3 months ago
This fixes a long standing problem that libvirt has with starting up QEMU.

We have to busy-wait retrying connect() on the QMP monitor socket until QEMU
finally creates & listens on it, but at same time must be careful to not wait
forever if QEMU exits.

This this patch series, libvirt can simply pass in a pre-opened UNIX domain
socket file descriptor, which it can immediately connect to with no busy-wait.

Changed in v2:

  - Drop 'fdset' property / address kind, and use 'fd' for both CLI and HMP
  - Add unit tests

Daniel P. Berrange (2):
  io: move fd_is_socket() into common sockets code
  char: allow passing pre-opened socket file descriptor at startup

 chardev/char-socket.c  |  32 +++++++--
 chardev/char.c         |   3 +
 include/qemu/sockets.h |   1 +
 io/channel-util.c      |  13 ----
 tests/test-char.c      | 173 ++++++++++++++++++++++++++++++++++++++++++++++++-
 util/qemu-sockets.c    |  55 +++++++++++++++-
 6 files changed, 252 insertions(+), 25 deletions(-)

-- 
2.14.3


Re: [Qemu-devel] [PATCH v2 0/2] Enable passing pre-opened chardev socket FDs
Posted by no-reply@patchew.org 6 years, 3 months ago
Hi,

This series seems to have some coding style problems. See output below for
more information:

Type: series
Message-id: 20171221155905.3793-1-berrange@redhat.com
Subject: [Qemu-devel] [PATCH v2 0/2] Enable passing pre-opened chardev socket FDs

=== TEST SCRIPT BEGIN ===
#!/bin/bash

BASE=base
n=1
total=$(git log --oneline $BASE.. | wc -l)
failed=0

git config --local diff.renamelimit 0
git config --local diff.renames True

commits="$(git log --format=%H --reverse $BASE..)"
for c in $commits; do
    echo "Checking PATCH $n/$total: $(git log -n 1 --format=%s $c)..."
    if ! git show $c --format=email | ./scripts/checkpatch.pl --mailback -; then
        failed=1
        echo
    fi
    n=$((n+1))
done

exit $failed
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
 * [new tag]               patchew/20171221160558.14151-1-laurent@vivier.eu -> patchew/20171221160558.14151-1-laurent@vivier.eu
Switched to a new branch 'test'
6116de2222 char: allow passing pre-opened socket file descriptor at startup
89d89b749c io: move fd_is_socket() into common sockets code

=== OUTPUT BEGIN ===
Checking PATCH 1/2: io: move fd_is_socket() into common sockets code...
Checking PATCH 2/2: char: allow passing pre-opened socket file descriptor at startup...
ERROR: do not initialise globals to 0 or NULL
#255: FILE: tests/test-char.c:414:
+Monitor *cur_mon = NULL;

total: 1 errors, 0 warnings, 330 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

=== OUTPUT END ===

Test command exited with code: 1


---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@freelists.org