aboutsummaryrefslogtreecommitdiff
path: root/tests/qtest/drive_del-test.c
diff options
context:
space:
mode:
authorMichael Labiuk <michael.labiuk@virtuozzo.com>2022-09-30 01:35:39 +0300
committerThomas Huth <thuth@redhat.com>2022-10-11 14:06:48 +0200
commitea42a6c405269229d0923719854637425be07b31 (patch)
treed66e522890e732d53375aee299b1411260ce88c3 /tests/qtest/drive_del-test.c
parent770beadb984d630a89b5a7327925a4cfba4488d5 (diff)
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>
Diffstat (limited to 'tests/qtest/drive_del-test.c')
-rw-r--r--tests/qtest/drive_del-test.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/tests/qtest/drive_del-test.c b/tests/qtest/drive_del-test.c
index 5e6d58b4dd..467e752b0d 100644
--- a/tests/qtest/drive_del-test.c
+++ b/tests/qtest/drive_del-test.c
@@ -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' }");