diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2024-11-15 16:50:41 +0000 |
---|---|---|
committer | Fabiano Rosas <farosas@suse.de> | 2024-12-12 10:25:38 -0300 |
commit | de62427cce9060e4d631b11ba7840bb03368a448 (patch) | |
tree | 60578e7d2b44eece046b45d332ff966f753c0faf /tests/qtest/device-plug-test.c | |
parent | 9881d3d1687d1f18dc605a589d13ae5b8a9db456 (diff) | |
download | qemu-de62427cce9060e4d631b11ba7840bb03368a448.zip qemu-de62427cce9060e4d631b11ba7840bb03368a448.tar.gz qemu-de62427cce9060e4d631b11ba7840bb03368a448.tar.bz2 |
tests/qtest: Use qtest_system_reset_nowait() where appropriate
In the device and drive plug/unplug tests we want to trigger
a system reset and then see if we get the appropriate
DEVICE_DELETED event. Use qtest_system_reset_nowait() here.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Signed-off-by: Fabiano Rosas <farosas@suse.de>
Diffstat (limited to 'tests/qtest/device-plug-test.c')
-rw-r--r-- | tests/qtest/device-plug-test.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/tests/qtest/device-plug-test.c b/tests/qtest/device-plug-test.c index c6f3315..127a7f9 100644 --- a/tests/qtest/device-plug-test.c +++ b/tests/qtest/device-plug-test.c @@ -15,15 +15,6 @@ #include "qapi/qmp/qdict.h" #include "qapi/qmp/qstring.h" -static void system_reset(QTestState *qtest) -{ - QDict *resp; - - resp = qtest_qmp(qtest, "{'execute': 'system_reset'}"); - g_assert(qdict_haskey(resp, "return")); - qobject_unref(resp); -} - static void wait_device_deleted_event(QTestState *qtest, const char *id) { QDict *resp, *data; @@ -58,7 +49,7 @@ static void process_device_remove(QTestState *qtest, const char *id) * handled, removing the device. */ qtest_qmp_device_del_send(qtest, id); - system_reset(qtest); + qtest_system_reset_nowait(qtest); wait_device_deleted_event(qtest, id); } |