All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PULL v3 00/24] block: Command line option -blockdev
Date: Tue, 07 Mar 2017 16:05:58 +0100	[thread overview]
Message-ID: <87efy99lex.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <CAFEAcA-SBSz5M_GDEQhqvb+=5WprkwURKb_sY2M9VewJJ+N1Zw@mail.gmail.com> (Peter Maydell's message of "Tue, 7 Mar 2017 14:30:30 +0000")

Peter Maydell <peter.maydell@linaro.org> writes:

> On 7 March 2017 at 07:20, 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
>>
>> v3: A few commit messages touched up, code unchanged
>>
>> The following changes since commit fbddc2e5608eb655493253d080598375db61a748:
>>
>>   Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2017-02-28' into staging (2017-03-06 10:18:33 +0000)
>>
>> are available in the git repository at:
>>
>>   git://repo.or.cz/qemu/armbru.git tags/pull-block-2017-02-28-v3
>>
>> for you to fetch changes up to de479f01438d974100ac9ec10ab82c2ee1ad124f:
>>
>>   keyval: Support lists (2017-03-07 08:15:18 +0100)
>
> The clang sanitizer has a complaint about your new test:
>
>   GTESTER tests/test-keyval
> /home/petmay01/linaro/qemu-for-merges/util/keyval.c:129:15: runtime
> error: member access within null pointer of type 'QString' (aka
> 'struct QString')
>
> which is the line:
>         new = QOBJECT(value) ?: QOBJECT(qdict_new());
>
> This is because QOBJECT is defined as:
>
> #define QOBJECT(obj) (&(obj)->base)
>
> and so it doesn't have the "if you pass in NULL you get NULL"
> semantics that OBJECT() and all the QOM object typecast
> macros do.

QOBJECT() returns its argument, so this is rather pedantic.  However,
placating the sanitize isn't too onerous; this should do:

        new = value ? QOBJECT(value) : QOBJECT(qdict_new());

> (As an aside, it's rather confusing to have a QObject
> whose header claims it's part of the "QEMU Object Model"
> which is completely different from the QOM Object...)

Hey, QObject claimed the name first!

Seriously, I hate the name clash, too.  Rewording the comment is easy
enough.  Even better would be renaming QObject, but that's a lot of
churn.

      reply	other threads:[~2017-03-07 15:06 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-07  7:20 [Qemu-devel] [PULL v3 00/24] block: Command line option -blockdev Markus Armbruster
2017-03-07  7:20 ` [Qemu-devel] [PULL v3 01/24] test-qemu-opts: Cover qemu_opts_parse() of "no" Markus Armbruster
2017-03-07  7:20 ` [Qemu-devel] [PULL v3 02/24] tests: Fix gcov-files-test-qemu-opts-y, gcov-files-test-logging-y Markus Armbruster
2017-03-07  7:20 ` [Qemu-devel] [PULL v3 03/24] keyval: New keyval_parse() Markus Armbruster
2017-03-07  7:20 ` [Qemu-devel] [PULL v3 04/24] qapi: qobject input visitor variant for use with keyval_parse() Markus Armbruster
2017-03-07  7:20 ` [Qemu-devel] [PULL v3 05/24] test-keyval: Cover use with qobject input visitor Markus Armbruster
2017-03-07  7:20 ` [Qemu-devel] [PULL v3 06/24] qapi: Factor out common part of qobject input visitor creation Markus Armbruster
2017-03-07  7:20 ` [Qemu-devel] [PULL v3 07/24] qapi: Factor out common qobject_input_get_keyval() Markus Armbruster
2017-03-07  7:20 ` [Qemu-devel] [PULL v3 08/24] qobject: Propagate parse errors through qobject_from_jsonv() Markus Armbruster
2017-03-07  7:20 ` [Qemu-devel] [PULL v3 09/24] libqtest: Fix qmp() & friends to abort on JSON parse errors Markus Armbruster
2017-03-07  7:20 ` [Qemu-devel] [PULL v3 10/24] qjson: Abort earlier on qobject_from_jsonf() misuse Markus Armbruster
2017-03-07  7:20 ` [Qemu-devel] [PULL v3 11/24] test-qobject-input-visitor: Abort earlier on bad test input Markus Armbruster
2017-03-07  7:20 ` [Qemu-devel] [PULL v3 12/24] qobject: Propagate parse errors through qobject_from_json() Markus Armbruster
2017-03-07  7:20 ` [Qemu-devel] [PULL v3 13/24] block: More detailed syntax error reporting for JSON filenames Markus Armbruster
2017-03-07  7:20 ` [Qemu-devel] [PULL v3 14/24] check-qjson: Test errors from qobject_from_json() Markus Armbruster
2017-03-07  7:20 ` [Qemu-devel] [PULL v3 15/24] test-visitor-serialization: Pass &error_abort to qobject_from_json() Markus Armbruster
2017-03-07  7:20 ` [Qemu-devel] [PULL v3 16/24] monitor: Assert qmp_schema_json[] is sane Markus Armbruster
2017-03-07  7:20 ` [Qemu-devel] [PULL v3 17/24] test-qapi-util: New, covering qapi/qapi-util.c Markus Armbruster
2017-03-07  7:20 ` [Qemu-devel] [PULL v3 18/24] qapi: New parse_qapi_name() Markus Armbruster
2017-03-07  7:20 ` [Qemu-devel] [PULL v3 19/24] keyval: Restrict key components to valid QAPI names Markus Armbruster
2017-03-07  7:20 ` [Qemu-devel] [PULL v3 20/24] qapi: New qobject_input_visitor_new_str() for convenience Markus Armbruster
2017-03-07  7:20 ` [Qemu-devel] [PULL v3 21/24] block: Initial implementation of -blockdev Markus Armbruster
2017-03-07  7:20 ` [Qemu-devel] [PULL v3 22/24] qapi: Improve how keyval input visitor reports unexpected dicts Markus Armbruster
2017-03-07  7:20 ` [Qemu-devel] [PULL v3 23/24] docs/qapi-code-gen.txt: Clarify naming rules Markus Armbruster
2017-03-07  7:20 ` [Qemu-devel] [PULL v3 24/24] keyval: Support lists Markus Armbruster
2017-03-07  7:41 ` [Qemu-devel] [PULL v3 00/24] block: Command line option -blockdev no-reply
2017-03-07 14:30 ` Peter Maydell
2017-03-07 15:05   ` Markus Armbruster [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87efy99lex.fsf@dusky.pond.sub.org \
    --to=armbru@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.