[Qemu-devel] [PULL v2 00/24] block: Command line option -blockdev

Markus Armbruster posted 24 patches 7 years, 1 month ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/1488809515-4047-1-git-send-email-armbru@redhat.com
Test checkpatch failed
Test docker passed
There is a newer version of this series
block.c                              |   9 +-
docs/qapi-code-gen.txt               |  61 ++--
include/qapi/qmp/qjson.h             |   5 +-
include/qapi/qobject-input-visitor.h |  21 ++
include/qapi/util.h                  |   2 +
include/qemu/option.h                |   3 +
monitor.c                            |   2 +-
qapi/qapi-util.c                     |  47 +++
qapi/qobject-input-visitor.c         | 214 +++++++++++-
qemu-options.hx                      |   7 +
qobject/qjson.c                      |  14 +-
tests/.gitignore                     |   2 +
tests/Makefile.include               |  10 +-
tests/check-qjson.c                  |  88 +++--
tests/libqtest.c                     |   3 +-
tests/test-keyval.c                  | 624 +++++++++++++++++++++++++++++++++++
tests/test-qapi-util.c               |  85 +++++
tests/test-qemu-opts.c               |   5 +
tests/test-qobject-input-visitor.c   | 190 ++++++++++-
tests/test-visitor-serialization.c   |   2 +-
util/Makefile.objs                   |   1 +
util/keyval.c                        | 394 ++++++++++++++++++++++
vl.c                                 |  39 +++
23 files changed, 1746 insertions(+), 82 deletions(-)
create mode 100644 tests/test-keyval.c
create mode 100644 tests/test-qapi-util.c
create mode 100644 util/keyval.c
[Qemu-devel] [PULL v2 00/24] block: Command line option -blockdev
Posted by Markus Armbruster 7 years, 1 month ago
Actually, the command line option is the least part of this series.
Its bulk is about building infrastructure and getting errors out of
the JSON parser.

The design of the command line interface was discussed here:
Subject: Non-flat command line option argument syntax
Message-ID: <87bmukmlau.fsf@dusky.pond.sub.org>
https://lists.gnu.org/archive/html/qemu-devel/2017-02/msg00555.html

The following changes since commit aa3a982e674b09ae32502940f93ba98b3a8ad50e:

  qapi: Improve qobject visitor documentation (2017-03-05 09:14:20 +0100)

are available in the git repository at:

  git://repo.or.cz/qemu/armbru.git tags/pull-block-2017-02-28-v2

for you to fetch changes up to 3a79d43588cff95636d5ccdfa77b372cfd6d8530:

  keyval: Support lists (2017-03-05 10:29:58 +0100)

----------------------------------------------------------------
block: Command line option -blockdev

----------------------------------------------------------------
Daniel P. Berrange (1):
      qapi: qobject input visitor variant for use with keyval_parse()

Markus Armbruster (23):
      test-qemu-opts: Cover qemu_opts_parse() of "no"
      tests: Fix gcov-files-test-qemu-opts-y, gcov-files-test-logging-y
      keyval: New keyval_parse()
      test-keyval: Cover use with qobject input visitor
      qapi: Factor out common part of qobject input visitor creation
      qapi: Factor out common qobject_input_get_keyval()
      qobject: Propagate parse errors through qobject_from_jsonv()
      libqtest: Fix qmp() & friends to abort on JSON parse errors
      qjson: Abort earlier on qobject_from_jsonf() misuse
      test-qobject-input-visitor: Abort earlier on bad test input
      qobject: Propagate parse errors through qobject_from_json()
      block: More detailed syntax error reporting for JSON filenames
      check-qjson: Test errors from qobject_from_json()
      test-visitor-serialization: Pass &error_abort to qobject_from_json()
      monitor: Assert qmp_schema_json[] is sane
      test-qapi-util: New, covering qapi/qapi-util.c
      qapi: New parse_qapi_name()
      keyval: Restrict key components to valid QAPI names
      qapi: New qobject_input_visitor_new_str() for convenience
      block: Initial implementation of -blockdev
      qapi: Improve how keyval input visitor reports unexpected dicts
      docs/qapi-code-gen.txt: Clarify naming rules
      keyval: Support lists

 block.c                              |   9 +-
 docs/qapi-code-gen.txt               |  61 ++--
 include/qapi/qmp/qjson.h             |   5 +-
 include/qapi/qobject-input-visitor.h |  21 ++
 include/qapi/util.h                  |   2 +
 include/qemu/option.h                |   3 +
 monitor.c                            |   2 +-
 qapi/qapi-util.c                     |  47 +++
 qapi/qobject-input-visitor.c         | 214 +++++++++++-
 qemu-options.hx                      |   7 +
 qobject/qjson.c                      |  14 +-
 tests/.gitignore                     |   2 +
 tests/Makefile.include               |  10 +-
 tests/check-qjson.c                  |  88 +++--
 tests/libqtest.c                     |   3 +-
 tests/test-keyval.c                  | 624 +++++++++++++++++++++++++++++++++++
 tests/test-qapi-util.c               |  85 +++++
 tests/test-qemu-opts.c               |   5 +
 tests/test-qobject-input-visitor.c   | 190 ++++++++++-
 tests/test-visitor-serialization.c   |   2 +-
 util/Makefile.objs                   |   1 +
 util/keyval.c                        | 394 ++++++++++++++++++++++
 vl.c                                 |  39 +++
 23 files changed, 1746 insertions(+), 82 deletions(-)
 create mode 100644 tests/test-keyval.c
 create mode 100644 tests/test-qapi-util.c
 create mode 100644 util/keyval.c

-- 
2.7.4


Re: [Qemu-devel] [PULL v2 00/24] block: Command line option -blockdev
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: 1488809515-4047-1-git-send-email-armbru@redhat.com
Subject: [Qemu-devel] [PULL v2 00/24] block: Command line option -blockdev
Type: series

=== 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/1488809515-4047-1-git-send-email-armbru@redhat.com -> patchew/1488809515-4047-1-git-send-email-armbru@redhat.com
Switched to a new branch 'test'
bcd0cc3 keyval: Support lists
ff62cf9 docs/qapi-code-gen.txt: Clarify naming rules
9ac00f7 qapi: Improve how keyval input visitor reports unexpected dicts
491763a block: Initial implementation of -blockdev
2f99f84 qapi: New qobject_input_visitor_new_str() for convenience
41be75d keyval: Restrict key components to valid QAPI names
7f9e667 qapi: New parse_qapi_name()
b6826c4 test-qapi-util: New, covering qapi/qapi-util.c
00dc4bb monitor: Assert qmp_schema_json[] is sane
9a42678 test-visitor-serialization: Pass &error_abort to qobject_from_json()
b4d1473 check-qjson: Test errors from qobject_from_json()
1132489 block: More detailed syntax error reporting for JSON filenames
9cbc6a4 qobject: Propagate parse errors through qobject_from_json()
cf8bd63 test-qobject-input-visitor: Abort earlier on bad test input
3083b9d qjson: Abort earlier on qobject_from_jsonf() misuse
0493013 libqtest: Fix qmp() & friends to abort on JSON parse errors
95b2325 qobject: Propagate parse errors through qobject_from_jsonv()
7b0e39e qapi: Factor out common qobject_input_get_keyval()
4430d7b qapi: Factor out common part of qobject input visitor creation
864a296 test-keyval: Cover use with qobject input visitor
0b27ece qapi: qobject input visitor variant for use with keyval_parse()
2767817 keyval: New keyval_parse()
9b7e9c3 tests: Fix gcov-files-test-qemu-opts-y, gcov-files-test-logging-y
0025443 test-qemu-opts: Cover qemu_opts_parse() of "no"

=== OUTPUT BEGIN ===
Checking PATCH 1/24: test-qemu-opts: Cover qemu_opts_parse() of "no"...
Checking PATCH 2/24: tests: Fix gcov-files-test-qemu-opts-y, gcov-files-test-logging-y...
Checking PATCH 3/24: keyval: New keyval_parse()...
ERROR: suspect code indent for conditional statements (8, 8)
#438: FILE: util/keyval.c:140:
+        for (len = 0; s + len < key_end && s[len] != '.'; len++) {
+        }

total: 1 errors, 0 warnings, 447 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 4/24: qapi: qobject input visitor variant for use with keyval_parse()...
Checking PATCH 5/24: test-keyval: Cover use with qobject input visitor...
Checking PATCH 6/24: qapi: Factor out common part of qobject input visitor creation...
Checking PATCH 7/24: qapi: Factor out common qobject_input_get_keyval()...
Checking PATCH 8/24: qobject: Propagate parse errors through qobject_from_jsonv()...
Checking PATCH 9/24: libqtest: Fix qmp() & friends to abort on JSON parse errors...
Checking PATCH 10/24: qjson: Abort earlier on qobject_from_jsonf() misuse...
Checking PATCH 11/24: test-qobject-input-visitor: Abort earlier on bad test input...
Checking PATCH 12/24: qobject: Propagate parse errors through qobject_from_json()...
Checking PATCH 13/24: block: More detailed syntax error reporting for JSON filenames...
Checking PATCH 14/24: check-qjson: Test errors from qobject_from_json()...
Checking PATCH 15/24: test-visitor-serialization: Pass &error_abort to qobject_from_json()...
Checking PATCH 16/24: monitor: Assert qmp_schema_json[] is sane...
Checking PATCH 17/24: test-qapi-util: New, covering qapi/qapi-util.c...
Checking PATCH 18/24: qapi: New parse_qapi_name()...
Checking PATCH 19/24: keyval: Restrict key components to valid QAPI names...
Checking PATCH 20/24: qapi: New qobject_input_visitor_new_str() for convenience...
Checking PATCH 21/24: block: Initial implementation of -blockdev...
Checking PATCH 22/24: qapi: Improve how keyval input visitor reports unexpected dicts...
Checking PATCH 23/24: docs/qapi-code-gen.txt: Clarify naming rules...
Checking PATCH 24/24: keyval: Support lists...
ERROR: spaces required around that '-' (ctx:VxV)
#444: FILE: util/keyval.c:345:
+    assert(!elt[nelt-1]);       /* need the sentinel to be null */
                     ^

total: 1 errors, 0 warnings, 420 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
Re: [Qemu-devel] [PULL v2 00/24] block: Command line option -blockdev
Posted by Peter Maydell 7 years, 1 month ago
On 6 March 2017 at 14:11, Markus Armbruster <armbru@redhat.com> wrote:
> Actually, the command line option is the least part of this series.
> Its bulk is about building infrastructure and getting errors out of
> the JSON parser.
>
> The design of the command line interface was discussed here:
> Subject: Non-flat command line option argument syntax
> Message-ID: <87bmukmlau.fsf@dusky.pond.sub.org>
> https://lists.gnu.org/archive/html/qemu-devel/2017-02/msg00555.html
>
> The following changes since commit aa3a982e674b09ae32502940f93ba98b3a8ad50e:
>
>   qapi: Improve qobject visitor documentation (2017-03-05 09:14:20 +0100)
>
> are available in the git repository at:
>
>   git://repo.or.cz/qemu/armbru.git tags/pull-block-2017-02-28-v2
>
> for you to fetch changes up to 3a79d43588cff95636d5ccdfa77b372cfd6d8530:
>
>   keyval: Support lists (2017-03-05 10:29:58 +0100)
>
> ----------------------------------------------------------------
> block: Command line option -blockdev

This appears to be a pull request for a feature change
after freeze ?

thanks
-- PMM

Re: [Qemu-devel] [PULL v2 00/24] block: Command line option -blockdev
Posted by Peter Maydell 7 years, 1 month ago
On 6 March 2017 at 15:06, Peter Maydell <peter.maydell@linaro.org> wrote:
> On 6 March 2017 at 14:11, Markus Armbruster <armbru@redhat.com> wrote:
>> Actually, the command line option is the least part of this series.
>> Its bulk is about building infrastructure and getting errors out of
>> the JSON parser.
>>
>> The design of the command line interface was discussed here:
>> Subject: Non-flat command line option argument syntax
>> Message-ID: <87bmukmlau.fsf@dusky.pond.sub.org>
>> https://lists.gnu.org/archive/html/qemu-devel/2017-02/msg00555.html
>>
>> The following changes since commit aa3a982e674b09ae32502940f93ba98b3a8ad50e:
>>
>>   qapi: Improve qobject visitor documentation (2017-03-05 09:14:20 +0100)
>>
>> are available in the git repository at:
>>
>>   git://repo.or.cz/qemu/armbru.git tags/pull-block-2017-02-28-v2
>>
>> for you to fetch changes up to 3a79d43588cff95636d5ccdfa77b372cfd6d8530:
>>
>>   keyval: Support lists (2017-03-05 10:29:58 +0100)
>>
>> ----------------------------------------------------------------
>> block: Command line option -blockdev
>
> This appears to be a pull request for a feature change
> after freeze ?

...oh, v2 of something that failed first time round. Sorry,
I'm not really awake this afternoon.

thanks
-- PMM