[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 18/26] tests-qobject-input-strict: Merge into
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH v2 18/26] tests-qobject-input-strict: Merge into test-qobject-input-visitor |
Date: |
Tue, 28 Feb 2017 18:10:32 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) |
Markus Armbruster <address@hidden> writes:
> Eric Blake <address@hidden> writes:
>
>> On 02/26/2017 03:43 PM, Markus Armbruster wrote:
>>> Much test-qobject-input-strict.c duplicates
>>
>> s/Much/Much of/
>>
>>> test-qobject-input-strict.c less assertions on expected output:
>>
>> s/less/, but with less/
>
> Will fix.
>
>>
>> ...
>>>
>>> Merge the remaining test cases into test-qobject-input-visitor.c, and
>>> drop the now redundant test-qobject-input-strict.c.
>>>
>>> Test case "/visitor/input-strict/fail/list" isn't really about lists,
>>> it's about a bad struct nested in a list. Rename accordingly.
>>>
>>> Signed-off-by: Markus Armbruster <address@hidden>
>>> ---
>>
>>
>>> -static void test_validate_struct_nested(TestInputVisitorData *data,
>>> - const void *unused)
>>> -{
>>> - UserDefTwo *udp = NULL;
>>> - Visitor *v;
>>> -
>>> - v = validate_test_init(data, "{ 'string0': 'string0', "
>>> - "'dict1': { 'string1': 'string1', "
>>> - "'dict2': { 'userdef': { 'integer': 42, "
>>> - "'string': 'string' }, 'string': 'string2'}}}");
>>> -
>>
>> Old code had semi-sane line wrapping...
>>
>>
>>> +++ b/tests/test-qobject-input-visitor.c
>>> @@ -5,6 +5,7 @@
>>> *
>>
>>> +static void test_visitor_in_fail_struct_nested(TestInputVisitorData *data,
>>> + const void *unused)
>>> +{
>>> + UserDefTwo *udp = NULL;
>>> + Error *err = NULL;
>>> + Visitor *v;
>>> +
>>> + v = visitor_input_test_init(data, "{ 'string0': 'string0', 'dict1': {
>>> 'string1': 'string1', 'dict2': { 'userdef1': { 'integer': 42, 'string':
>>> 'string', 'extra': [42, 23, {'foo':'bar'}] }, 'string2': 'string2'}}}");
>>
>>
>> ...new code has insanely long lines. Not a show-stopper, but I wouldn't
>> mind if you added line breaks.
>
> Editing accident. I'll restore the line breaks.
Actually, no: I moved it verbatim. The code you quoted is a different
function.
I'll leave it unchanged.
>> It's a little bit hard to follow the patch alone, but I didn't spot any
>> obvious loss of coverage and the commit message definitely helps.
>>
>> Reviewed-by: Eric Blake <address@hidden>
>
> Thanks!
- Re: [Qemu-devel] [PATCH v2 19/26] test-string-input-visitor: Tear down existing test automatically, (continued)
- [Qemu-devel] [PATCH v2 25/26] qapi: Fix object input visit beyond end of list, Markus Armbruster, 2017/02/26
- [Qemu-devel] [PATCH v2 06/26] qmp: Drop duplicated QMP command object checks, Markus Armbruster, 2017/02/26
- [Qemu-devel] [PATCH v2 26/26] qapi: Improve qobject visitor documentation, Markus Armbruster, 2017/02/26
- [Qemu-devel] [PATCH v2 16/26] test-qobject-input-visitor: Use strict visitor, Markus Armbruster, 2017/02/26
- [Qemu-devel] [PATCH v2 09/26] qapi: Improve a QObject input visitor error message, Markus Armbruster, 2017/02/26
- [Qemu-devel] [PATCH v2 05/26] qmp: Clean up how we enforce capability negotiation, Markus Armbruster, 2017/02/26