[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v7 02/13] qtest: Reintroduce qtest_qmp_receive
From: |
Thomas Huth |
Subject: |
Re: [PATCH v7 02/13] qtest: Reintroduce qtest_qmp_receive |
Date: |
Mon, 12 Oct 2020 15:49:48 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 |
On 12/10/2020 15.47, Paolo Bonzini wrote:
> On 12/10/20 13:14, Thomas Huth wrote:
>>> +/**
>>> + * qtest_qmp_receive:
>>> + * @s: #QTestState instance to operate on.
>>> + *
>>> + * Reads a QMP message from QEMU and returns the response.
>>> + * Buffers all the events received meanwhile, until a
>>> + * call to qtest_qmp_eventwait
>>> + */
>>> +QDict *qtest_qmp_receive(QTestState *s);
>> Re-introducing qtest_qmp_receive() with different behavior than before will
>> likely make backports of other later patches a pain, and might also break
>> other patches that use this function but are not merged yet. Could you
>> please use a different name for this function instead? Maye
>> qtest_qmp_receive_buffered() or something like that?
>
> We chose to use the same name because the new version generally is the
> one you want and, except for the handling of events, is exactly the same
> as before. In other words, I'm treating the new semantics more as a
> bugfix than a feature.
>
> The only trap that backports of later patches could fall into is if they
> want to look at events, but it would be caught easily because the test
> would fail.
Ok, thanks for the explanation! ... but I think it might be good to have
this information in the patch description, though.
Thomas
[PATCH v7 03/13] qtest: switch users back to qtest_qmp_receive, Maxim Levitsky, 2020/10/06
[PATCH v7 04/13] qdev: add "check if address free" callback for buses, Maxim Levitsky, 2020/10/06
[PATCH v7 05/13] scsi: switch to bus->check_address, Maxim Levitsky, 2020/10/06
[PATCH v7 06/13] scsi/scsi_bus: switch search direction in scsi_device_find, Maxim Levitsky, 2020/10/06
[PATCH v7 07/13] device_core: use drain_call_rcu in in qmp_device_add, Maxim Levitsky, 2020/10/06
[PATCH v7 08/13] device-core: use RCU for list of children of a bus, Maxim Levitsky, 2020/10/06
[PATCH v7 09/13] device-core: use atomic_set on .realized property, Maxim Levitsky, 2020/10/06