From: Markus Armbruster <armbru@redhat.com>
To: Eric Blake <eblake@redhat.com>
Cc: Lin Ma <lma@suse.com>,
berrange@redhat.com, pbonzini@redhat.com, qemu-devel@nongnu.org,
afaerber@suse.de
Subject: Re: [Qemu-devel] 答复: Re: [PATCH v3 2/3] qapi: auto generate enum value strings
Date: Tue, 11 Oct 2016 08:56:47 +0200 [thread overview]
Message-ID: <87twcjqspc.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <c2bf6a38-0d73-3f98-a85b-da47bb479f40@redhat.com> (Eric Blake's message of "Mon, 10 Oct 2016 14:00:59 -0500")
Eric Blake <eblake@redhat.com> writes:
> On 10/10/2016 10:09 AM, Lin Ma wrote:
>>
>>
>>>>> Eric Blake <eblake@redhat.com> 2016/9/27 星期二 上午 4:17 >>>
>>> On 09/26/2016 05:38 AM, Daniel P. Berrange wrote:
>>>> On Mon, Sep 26, 2016 at 06:16:26PM +0800, Lin Ma wrote:
>>>>> Automatically generate enum value strings that containing the acceptable values.
>>>>> (Borrowwed Daniel's code.)
>>>
>>> s/Borrowwed/Borrowed/
>> Sorry for the late reply, I was on vacation.
>> Thanks for the review.
>>>
>>>>>
>>>>> Signed-off-by: Lin Ma <lma@suse.com>
>>>>> ---
>>>>> scripts/qapi-types.py | 2 ++
>>>>> scripts/qapi.py | 9 +++++++++
>>>>> 2 files changed, 11 insertions(+)
>>>>
>>>> This will need some test case coverage in tests/ somewhere, but I'm
>>>> not sure exactly which place is best - Eric/Markus can probably advise
>>>
>>> tests/test-qmp-commands.c is the first one that comes to mind, for
>>> adding another test case to an existing program.
Yes, that's the closest we got.
>> I'm not familiar with how to write qapi generator code and related test
>> code at all. I'll start to dig, Any guidance is appreciated.
>> For adding test case, Only this tests/test-qmp-commands.c needs to be
>> modified, right?
>
> Yes, I think the easiest approach is to add a new line in the main()
> file that calls out to a new function, and the new function tests that
> an existing QAPI enum (from tests/qapi-schema/qapi-schema-test.json) has
> a sane conversion to a string listing all its members. Markus may have
> better ideas on where to place a new test, though.
I think tests/test-qmp-commands.c should be split. See
Message-ID: <8760p7yv8n.fsf@dusky.pond.sub.org>
http://lists.gnu.org/archive/html/qemu-devel/2016-10/msg00664.html
However, splitting it out of scope of Lin Ma's work. Go ahead and add
to tests/test-qmp-commands.c.
next prev parent reply other threads:[~2016-10-11 6:56 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-26 10:16 [Qemu-devel] [PATCH v3 0/3] object: Add 'help' option for all available backends and properties Lin Ma
2016-09-26 10:16 ` [Qemu-devel] [PATCH v3 1/3] qom: make base type user-creatable abstract Lin Ma
2016-09-26 10:37 ` Daniel P. Berrange
2016-10-10 14:32 ` [Qemu-devel] 答复: " Lin Ma
2016-10-10 14:45 ` Paolo Bonzini
2016-10-10 15:01 ` Daniel P. Berrange
2016-10-10 16:37 ` Paolo Bonzini
2016-09-26 10:16 ` [Qemu-devel] [PATCH v3 2/3] qapi: auto generate enum value strings Lin Ma
2016-09-26 10:38 ` Daniel P. Berrange
2016-09-26 20:17 ` Eric Blake
2016-10-10 15:09 ` [Qemu-devel] 答复: " Lin Ma
2016-10-10 19:00 ` Eric Blake
2016-10-11 6:56 ` Markus Armbruster [this message]
2016-10-13 10:02 ` Lin Ma
2016-09-26 10:16 ` [Qemu-devel] [PATCH v3 3/3] object: Add 'help' option for all available backends and properties Lin Ma
2016-09-26 10:41 ` Daniel P. Berrange
2016-10-10 14:38 ` [Qemu-devel] 答复: " Lin Ma
2016-09-26 10:34 ` [Qemu-devel] [PATCH v3 0/3] " no-reply
2016-09-26 10:39 ` Paolo Bonzini
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=87twcjqspc.fsf@dusky.pond.sub.org \
--to=armbru@redhat.com \
--cc=afaerber@suse.de \
--cc=berrange@redhat.com \
--cc=eblake@redhat.com \
--cc=lma@suse.com \
--cc=pbonzini@redhat.com \
--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.