qemu-devel
[Top][All Lists]
Advanced

[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!



reply via email to

[Prev in Thread] Current Thread [Next in Thread]