qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 05/60] qmp-test: Cover syntax and lexical err


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH v2 05/60] qmp-test: Cover syntax and lexical errors
Date: Mon, 20 Aug 2018 10:34:54 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

Eric Blake <address@hidden> writes:

> On 08/17/2018 10:05 AM, Markus Armbruster wrote:
>> Signed-off-by: Markus Armbruster <address@hidden>
>> ---
>
> Might be worth mentioning the addition of qtest_qmp_send_raw() in the
> commit message body.

I'm adding:

    qmp-test neglects to cover QMP input that isn't valid JSON.  libqtest
    doesn't let us such input.  Add qtest_qmp_send_raw() for this purpose,
    and put it to use in qmp-test.

>>   tests/libqtest.c | 17 +++++++++++++++++
>>   tests/libqtest.h | 11 +++++++++++
>>   tests/qmp-test.c | 41 ++++++++++++++++++++++++++++++++++++++++-
>>   3 files changed, 68 insertions(+), 1 deletion(-)
>>
>
>> +/**
>> + * qtest_qmp_send_raw:
>> + * @s: #QTestState instance to operate on.
>> + * @fmt...: text to send, formatted like sprintf()
>> + *
>> + * Sends text to the QMP monitor verbatim.  Need not be valid JSON;
>> + * this is useful for negative tests.
>> + */
>> +void qtest_qmp_send_raw(QTestState *s, const char *fmt, ...)
>> +    GCC_FMT_ATTR(2, 3);
>> +
>
> Reviewed-by: Eric Blake <address@hidden>

Thanks!



reply via email to

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