mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-09 18:44:58 -06:00
tests/x86: add helper qtest_qmp_device_del_send()
Move sending 'device_del' command to separate function. Function can be used in case of addition action is needed to start actual removing device after sending command. Signed-off-by: Michael Labiuk <michael.labiuk@virtuozzo.com> Message-Id: <20220929223547.1429580-2-michael.labiuk@virtuozzo.com> Reviewed-by: Thomas Huth <thuth@redhat.com> [thuth: Fixed typo] Signed-off-by: Thomas Huth <thuth@redhat.com>
This commit is contained in:
parent
770beadb98
commit
ea42a6c405
5 changed files with 25 additions and 32 deletions
|
@ -143,11 +143,7 @@ static void device_del(QTestState *qts, bool and_reset)
|
|||
{
|
||||
QDict *response;
|
||||
|
||||
response = qtest_qmp(qts, "{'execute': 'device_del',"
|
||||
" 'arguments': { 'id': 'dev0' } }");
|
||||
g_assert(response);
|
||||
g_assert(qdict_haskey(response, "return"));
|
||||
qobject_unref(response);
|
||||
qtest_qmp_device_del_send(qts, "dev0");
|
||||
|
||||
if (and_reset) {
|
||||
response = qtest_qmp(qts, "{'execute': 'system_reset' }");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue