summaryrefslogtreecommitdiffstats
path: root/tests/qtest/libqos/libqtest.h
Commit message (Collapse)AuthorAgeFilesLines
* qtest: remove qtest_qmp_receive_successMaxim Levitsky2020-10-121-17/+0Star
| | | | | | | | | | The purpose of qtest_qmp_receive_success was mostly to process events that arrived between the issueing of a command and the "return" line from QMP. This is now handled by the buffering of events that libqtest performs automatically. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
* qtest: Reintroduce qtest_qmp_receive with QMP event bufferingMaxim Levitsky2020-10-121-0/+23
| | | | | | | | | | | | | | | | | | The new qtest_qmp_receive buffers all the received qmp events, allowing qtest_qmp_eventwait_ref to return them. This is intended to solve the race in regard to ordering of qmp events vs qmp responses, as soon as the callers start using the new interface. In addition to that, define qtest_qmp_event_ref a function which only scans the buffer that qtest_qmp_receive stores the events to. This is intended for callers that are only interested in events that were received during the last call to the qtest_qmp_receive. Suggested-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com> Message-Id: <20201006123904.610658-3-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* qtest: rename qtest_qmp_receive to qtest_qmp_receive_dictMaxim Levitsky2020-10-121-2/+2
| | | | | | | | | | | | In the next patch a new version of qtest_qmp_receive will be reintroduced that will buffer received qmp events for later consumption in qtest_qmp_eventwait_ref No functional change intended. Suggested-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* docs/devel/qtest: Include libqtest API referenceEduardo Habkost2020-10-121-10/+10
| | | | | | | Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Acked-by: Thomas Huth <thuth@redhat.com> Message-Id: <20201005205228.697463-4-ehabkost@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* libqtest: Rename qmp_assert_error_class() to qmp_expect_error_and_unref()Markus Armbruster2020-09-031-2/+2
| | | | | | | | | | | qmp_assert_error_class() does more than just assert: it also unrefs the @rsp argument. Rename to qmp_expect_error_and_unref() to reduce confusion. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20200902115733.1229537-1-armbru@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
* meson: convert tests/qtest to mesonPaolo Bonzini2020-08-211-0/+736
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>