Eric Blake <[email protected]> writes:
> On 08/17/2018 10:05 AM, Markus Armbruster wrote:
>> Signed-off-by: Markus Armbruster <[email protected]>
>> ---
>
> 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 <[email protected]>
Thanks!