qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 3/9] tests/qtest: get rid of 'qmp_command' helper in migra


From: Thomas Huth
Subject: Re: [PATCH v3 3/9] tests/qtest: get rid of 'qmp_command' helper in migration test
Date: Thu, 1 Jun 2023 11:26:46 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0

On 31/05/2023 15.23, Daniel P. Berrangé wrote:
This function duplicates logic of qtest_qmp_assert_success_ref

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
  tests/qtest/migration-helpers.c | 22 ----------------------
  tests/qtest/migration-helpers.h |  3 ---
  tests/qtest/migration-test.c    | 29 +++++++++++++++--------------
  3 files changed, 15 insertions(+), 39 deletions(-)

diff --git a/tests/qtest/migration-helpers.c b/tests/qtest/migration-helpers.c
index f6f3c6680f..bddf3f8d4d 100644
--- a/tests/qtest/migration-helpers.c
+++ b/tests/qtest/migration-helpers.c
@@ -85,28 +85,6 @@ QDict *wait_command(QTestState *who, const char *command, 
...)
      return ret;
  }
-/*
- * Execute the qmp command only
- */
-QDict *qmp_command(QTestState *who, const char *command, ...)
-{
-    va_list ap;
-    QDict *resp, *ret;
-
-    va_start(ap, command);
-    resp = qtest_vqmp(who, command, ap);
-    va_end(ap);
-
-    g_assert(!qdict_haskey(resp, "error"));

What about this g_assert(!qdict_haskey(resp, "error")) ? qtest_qmp_assert_success_ref() does not have this assert... do we still need it somewhere? If not, please add a comment to the patch description why it can be ignored now.

 Thomas





reply via email to

[Prev in Thread] Current Thread [Next in Thread]