[Qemu-devel] [PATCH 00/21] qapi: QMP dispatch and input visitor work

Markus Armbruster posted 21 patches 7 years, 2 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/1487886317-27400-1-git-send-email-armbru@redhat.com
Test checkpatch failed
Test docker passed
Test s390x passed
There is a newer version of this series
block/nbd.c                           |   2 +-
block/nfs.c                           |   2 +-
block/ssh.c                           |   2 +-
docs/qapi-code-gen.txt                |   2 +-
hw/ppc/spapr_drc.c                    |   5 +
include/monitor/monitor.h             |   1 +
include/qapi/qmp/qerror.h             |   9 -
include/qapi/qobject-input-visitor.h  |  39 +++-
include/qapi/qobject-output-visitor.h |  35 +++-
include/qapi/visitor-impl.h           |   7 +-
include/qapi/visitor.h                |  19 +-
include/qemu/module.h                 |   2 -
monitor.c                             | 149 +++++--------
qapi/opts-visitor.c                   |  12 ++
qapi/qapi-visit-core.c                |   8 +
qapi/qmp-dispatch.c                   |  22 +-
qapi/qobject-input-visitor.c          | 209 ++++++++++++-------
qapi/string-input-visitor.c           |  97 +++++----
qapi/trace-events                     |   1 +
qga/main.c                            |   2 +-
qmp.c                                 |   2 +-
qom/qom-qobject.c                     |   4 +-
scripts/qapi-commands.py              |   7 +-
scripts/qapi-visit.py                 |   3 +
target/s390x/cpu_models.c             |   2 +-
tests/Makefile.include                |   9 +-
tests/check-qnull.c                   |   2 +-
tests/libqtest.c                      |  29 ++-
tests/libqtest.h                      |   8 +
tests/qmp-test.c                      | 139 +++++++++++++
tests/test-opts-visitor.c             |  41 ++++
tests/test-qga.c                      |   2 +-
tests/test-qmp-commands.c             |   4 +-
tests/test-qobject-input-strict.c     | 381 ----------------------------------
tests/test-qobject-input-visitor.c    | 218 ++++++++++++++++++-
tests/test-string-input-visitor.c     |  20 ++
tests/test-visitor-serialization.c    |   2 +-
trace-events                          |   1 -
vl.c                                  |   2 +-
39 files changed, 823 insertions(+), 678 deletions(-)
create mode 100644 tests/qmp-test.c
delete mode 100644 tests/test-qobject-input-strict.c
[Qemu-devel] [PATCH 00/21] qapi: QMP dispatch and input visitor work
Posted by Markus Armbruster 7 years, 2 months ago
PATCH 10+11 have previously been posed as "[PATCH 0/2] qapi: Improve
qobject input visitor error reporting".

Markus Armbruster (21):
  qga: Fix crash on non-dictionary QMP argument
  libqtest: Work around a "QMP wants a newline" bug
  qmp-test: New, covering basic QMP protocol
  qmp: Dumb down how we run QMP command registration
  qmp: Clean up how we enforce capability negotiation
  qmp: Drop duplicated QMP command object checks
  qmp: Eliminate silly QERR_QMP_* macros
  qmp: Improve QMP dispatch error messages
  qapi: Improve a QObject input visitor error message
  qapi: Clean up after commit 3d344c2
  qapi: Make QObject input visitor set *list reliably
  qapi: Improve qobject input visitor error reporting
  qapi: Drop string input visitor method optional()
  qapi: Make string input and opts visitor require non-null input
  qom: Make object_property_set_qobject()'s input visitor strict
  test-qobject-input-visitor: Use strict visitor
  qapi: Drop unused non-strict qobject input visitor
  tests-qobject-input-strict: Merge into test-qobject-input-visitor
  tests: Cover partial input visit of list
  qapi: Make input visitors detect unvisited list tails
  qapi: Improve qobject visitor documentation

 block/nbd.c                           |   2 +-
 block/nfs.c                           |   2 +-
 block/ssh.c                           |   2 +-
 docs/qapi-code-gen.txt                |   2 +-
 hw/ppc/spapr_drc.c                    |   5 +
 include/monitor/monitor.h             |   1 +
 include/qapi/qmp/qerror.h             |   9 -
 include/qapi/qobject-input-visitor.h  |  39 +++-
 include/qapi/qobject-output-visitor.h |  35 +++-
 include/qapi/visitor-impl.h           |   7 +-
 include/qapi/visitor.h                |  19 +-
 include/qemu/module.h                 |   2 -
 monitor.c                             | 149 +++++--------
 qapi/opts-visitor.c                   |  12 ++
 qapi/qapi-visit-core.c                |   8 +
 qapi/qmp-dispatch.c                   |  22 +-
 qapi/qobject-input-visitor.c          | 209 ++++++++++++-------
 qapi/string-input-visitor.c           |  97 +++++----
 qapi/trace-events                     |   1 +
 qga/main.c                            |   2 +-
 qmp.c                                 |   2 +-
 qom/qom-qobject.c                     |   4 +-
 scripts/qapi-commands.py              |   7 +-
 scripts/qapi-visit.py                 |   3 +
 target/s390x/cpu_models.c             |   2 +-
 tests/Makefile.include                |   9 +-
 tests/check-qnull.c                   |   2 +-
 tests/libqtest.c                      |  29 ++-
 tests/libqtest.h                      |   8 +
 tests/qmp-test.c                      | 139 +++++++++++++
 tests/test-opts-visitor.c             |  41 ++++
 tests/test-qga.c                      |   2 +-
 tests/test-qmp-commands.c             |   4 +-
 tests/test-qobject-input-strict.c     | 381 ----------------------------------
 tests/test-qobject-input-visitor.c    | 218 ++++++++++++++++++-
 tests/test-string-input-visitor.c     |  20 ++
 tests/test-visitor-serialization.c    |   2 +-
 trace-events                          |   1 -
 vl.c                                  |   2 +-
 39 files changed, 823 insertions(+), 678 deletions(-)
 create mode 100644 tests/qmp-test.c
 delete mode 100644 tests/test-qobject-input-strict.c

-- 
2.7.4


Re: [Qemu-devel] [PATCH 00/21] qapi: QMP dispatch and input visitor work
Posted by no-reply@patchew.org 7 years, 1 month ago
Hi,

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

Message-id: 1487886317-27400-1-git-send-email-armbru@redhat.com
Type: series
Subject: [Qemu-devel] [PATCH 00/21] qapi: QMP dispatch and input visitor work

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

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

# Useful git options
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/1487886317-27400-1-git-send-email-armbru@redhat.com -> patchew/1487886317-27400-1-git-send-email-armbru@redhat.com
Switched to a new branch 'test'
700a2ac qapi: Improve qobject visitor documentation
175f23f qapi: Make input visitors detect unvisited list tails
f8ca0b1 tests: Cover partial input visit of list
756fdaa tests-qobject-input-strict: Merge into test-qobject-input-visitor
eb9410c qapi: Drop unused non-strict qobject input visitor
172f593 test-qobject-input-visitor: Use strict visitor
5685ece qom: Make object_property_set_qobject()'s input visitor strict
6ea05df qapi: Make string input and opts visitor require non-null input
9112d89 qapi: Drop string input visitor method optional()
dae8b6a qapi: Improve qobject input visitor error reporting
92c4f7b qapi: Make QObject input visitor set *list reliably
015ae02 qapi: Clean up after commit 3d344c2
48848af qapi: Improve a QObject input visitor error message
f531352 qmp: Improve QMP dispatch error messages
0fa4ae4 qmp: Eliminate silly QERR_QMP_* macros
458f762 qmp: Drop duplicated QMP command object checks
0c32703 qmp: Clean up how we enforce capability negotiation
e2a3724 qmp: Dumb down how we run QMP command registration
16e7bcf qmp-test: New, covering basic QMP protocol
173fd91 libqtest: Work around a "QMP wants a newline" bug
7d1c822 qga: Fix crash on non-dictionary QMP argument

=== OUTPUT BEGIN ===
Checking PATCH 1/21: qga: Fix crash on non-dictionary QMP argument...
Checking PATCH 2/21: libqtest: Work around a "QMP wants a newline" bug...
Checking PATCH 3/21: qmp-test: New, covering basic QMP protocol...
Checking PATCH 4/21: qmp: Dumb down how we run QMP command registration...
Checking PATCH 5/21: qmp: Clean up how we enforce capability negotiation...
Checking PATCH 6/21: qmp: Drop duplicated QMP command object checks...
Checking PATCH 7/21: qmp: Eliminate silly QERR_QMP_* macros...
Checking PATCH 8/21: qmp: Improve QMP dispatch error messages...
Checking PATCH 9/21: qapi: Improve a QObject input visitor error message...
Checking PATCH 10/21: qapi: Clean up after commit 3d344c2...
Checking PATCH 11/21: qapi: Make QObject input visitor set *list reliably...
Checking PATCH 12/21: qapi: Improve qobject input visitor error reporting...
Checking PATCH 13/21: qapi: Drop string input visitor method optional()...
Checking PATCH 14/21: qapi: Make string input and opts visitor require non-null input...
Checking PATCH 15/21: qom: Make object_property_set_qobject()'s input visitor strict...
Checking PATCH 16/21: test-qobject-input-visitor: Use strict visitor...
Checking PATCH 17/21: qapi: Drop unused non-strict qobject input visitor...
Checking PATCH 18/21: tests-qobject-input-strict: Merge into test-qobject-input-visitor...
ERROR: line over 90 characters
#484: FILE: tests/test-qobject-input-visitor.c:847:
+    v = visitor_input_test_init(data, "{ 'integer': -42, 'boolean': true, 'string': 'foo', 'extra': 42 }");

ERROR: line over 90 characters
#498: FILE: tests/test-qobject-input-visitor.c:861:
+    v = visitor_input_test_init(data, "{ 'string0': 'string0', 'dict1': { 'string1': 'string1', 'dict2': { 'userdef1': { 'integer': 42, 'string': 'string', 'extra': [42, 23, {'foo':'bar'}] }, 'string2': 'string2'}}}");

ERROR: line over 90 characters
#512: FILE: tests/test-qobject-input-visitor.c:875:
+    v = visitor_input_test_init(data, "[ { 'string': 'string0', 'integer': 42 }, { 'string': 'string1', 'integer': 43 }, { 'string': 'string2', 'integer': 44, 'extra': 'ggg' } ]");

ERROR: line over 90 characters
#585: FILE: tests/test-qobject-input-visitor.c:948:
+    v = visitor_input_test_init(data, "{ 'string': 'c', 'integer': 41, 'boolean': true }");

WARNING: line over 80 characters
#592: FILE: tests/test-qobject-input-visitor.c:955:
+static void test_visitor_in_fail_union_flat_no_discrim(TestInputVisitorData *data,

ERROR: line over 90 characters
#600: FILE: tests/test-qobject-input-visitor.c:963:
+    v = visitor_input_test_init(data, "{ 'integer': 42, 'string': 'c', 'string1': 'd', 'string2': 'e' }");

total: 5 errors, 1 warnings, 233 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.

Checking PATCH 19/21: tests: Cover partial input visit of list...
Checking PATCH 20/21: qapi: Make input visitors detect unvisited list tails...
Checking PATCH 21/21: qapi: Improve qobject visitor documentation...
=== 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