[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 08/32] tests/test-qga: Demonstrate the guest-age
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH 08/32] tests/test-qga: Demonstrate the guest-agent ignores "id" |
Date: |
Tue, 03 Jul 2018 08:27:57 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) |
Eric Blake <address@hidden> writes:
> On 07/02/2018 11:21 AM, Markus Armbruster wrote:
>> Signed-off-by: Markus Armbruster <address@hidden>
>> ---
>> tests/test-qga.c | 17 +++++++++++++++++
>> 1 file changed, 17 insertions(+)
>>
>> diff --git a/tests/test-qga.c b/tests/test-qga.c
>> index 30c9643257..4edd35535d 100644
>> --- a/tests/test-qga.c
>> +++ b/tests/test-qga.c
>> @@ -227,6 +227,22 @@ static void test_qga_ping(gconstpointer fix)
>> qobject_unref(ret);
>> }
>> +static void test_qga_invalid_id(gconstpointer fix)
>> +{
>> + /* FIXME "id" is ignored; it should be rejected */
>
> I might have written:
>
> /* FIXME "id" is ignored; it should either be repeated in the reply,
> or rejected on input */
Sold.
>> + const TestFixture *fixture = fix;
>> + QDict *ret, *val;
>> +
>> + ret = qmp_fd(fixture->fd, "{'execute': 'guest-ping', 'id': 1}");
>> + g_assert_nonnull(ret);
>> + qmp_assert_no_error(ret);
>> +
>> + val = qdict_get_qdict(ret, "return");
>> + g_assert(!qdict_haskey(val, "id"));
>
> This is documenting what currently happens, along with the FIXME
> showing that it is not ideal, so whether or not you improve the
> comment:
>
> Reviewed-by: Eric Blake <address@hidden>
Thanks!
- Re: [Qemu-devel] [PATCH 05/32] qmp: Get rid of x-oob-test command, (continued)
- [Qemu-devel] [PATCH 21/32] qobject: New qdict_from_jsonf_nofail(), Markus Armbruster, 2018/07/02
- [Qemu-devel] [PATCH 15/32] qmp: Simplify code around monitor_qmp_dispatch_one(), Markus Armbruster, 2018/07/02
- [Qemu-devel] [PATCH 19/32] monitor: Rename use_io_thr to use_io_thread, Markus Armbruster, 2018/07/02
- [Qemu-devel] [PATCH 08/32] tests/test-qga: Demonstrate the guest-agent ignores "id", Markus Armbruster, 2018/07/02
- [Qemu-devel] [PATCH 14/32] qmp: Always free QMPRequest with qmp_request_free(), Markus Armbruster, 2018/07/02
- [Qemu-devel] [PATCH 16/32] tests/qmp-test: Demonstrate QMP errors jumping the queue, Markus Armbruster, 2018/07/02
- [Qemu-devel] [PATCH 18/32] qmp: Don't let JSON errors jump the queue, Markus Armbruster, 2018/07/02
- [Qemu-devel] [PATCH 12/32] qmp: Redo how the client requests out-of-band execution, Markus Armbruster, 2018/07/02