All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PULL 1/8] tests/migration: Do not use functions anymore that rely on global_qtest
Date: Thu,  5 Sep 2019 10:30:42 +0200	[thread overview]
Message-ID: <20190905083049.11645-2-thuth@redhat.com> (raw)
In-Reply-To: <20190905083049.11645-1-thuth@redhat.com>

The migration tests deal with multiple test states, so we really should
not use functions here that rely on the single global_qtest variable.
Switch from qtest_start() to qtest_init() to make sure that global_qtest
is not set anymore. This also revealed a regression in the migrate()
function: It has once been converted to use the qtest_qmp() function,
but commit b5bbd3f315d686bd511 ("Clean up string interpolation into QMP,
part 2") accidentally reverted it back to qmp().

Message-Id: <20190904130047.25808-2-thuth@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 tests/migration-test.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/migration-test.c b/tests/migration-test.c
index b87ba99a9e..a9f81cc185 100644
--- a/tests/migration-test.c
+++ b/tests/migration-test.c
@@ -490,7 +490,7 @@ static void migrate(QTestState *who, const char *uri, const char *fmt, ...)
     g_assert(!qdict_haskey(args, "uri"));
     qdict_put_str(args, "uri", uri);
 
-    rsp = qmp("{ 'execute': 'migrate', 'arguments': %p}", args);
+    rsp = qtest_qmp(who, "{ 'execute': 'migrate', 'arguments': %p}", args);
 
     g_assert(qdict_haskey(rsp, "return"));
     qobject_unref(rsp);
@@ -625,7 +625,7 @@ static int test_migrate_start(QTestState **from, QTestState **to,
         cmd_dst = tmp;
     }
 
-    *from = qtest_start(cmd_src);
+    *from = qtest_init(cmd_src);
     g_free(cmd_src);
 
     *to = qtest_init(cmd_dst);
@@ -715,7 +715,7 @@ static void test_deprecated(void)
 {
     QTestState *from;
 
-    from = qtest_start("-machine none");
+    from = qtest_init("-machine none");
 
     deprecated_set_downtime(from, 0.12345);
     deprecated_set_speed(from, 12345);
-- 
2.18.1



  reply	other threads:[~2019-09-05  8:38 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-05  8:30 [Qemu-devel] [PULL 0/8] qtests and misc patches Thomas Huth
2019-09-05  8:30 ` Thomas Huth [this message]
2019-09-05  8:30 ` [Qemu-devel] [PULL 2/8] tests/libqos/e1000e: Make e1000e libqos functions independent from global_qtest Thomas Huth
2019-09-05  8:30 ` [Qemu-devel] [PULL 3/8] tests/libqos: Replace clock_step with qtest_clock_step in virtio code Thomas Huth
2019-09-05  8:30 ` [Qemu-devel] [PULL 4/8] tests: Remove unnecessary global_qtest references Thomas Huth
2019-09-05  8:30 ` [Qemu-devel] [PULL 5/8] tests/libqtest: Move global_test wrapper function into a separate header Thomas Huth
2019-09-05  8:30 ` [Qemu-devel] [PULL 6/8] tests/libqtest: Use libqtest-single.h in tests that require global_qtest Thomas Huth
2019-09-05  8:30 ` [Qemu-devel] [PULL 7/8] tests/vm: Take the J=x setting into account for the vm-boot-ssh targets, too Thomas Huth
2019-09-05  8:30 ` [Qemu-devel] [PULL 8/8] qemu-doc: Do not hard-code the name of the QEMU binary Thomas Huth
2019-09-05 10:14 ` [Qemu-devel] [PULL 0/8] qtests and misc patches Peter Maydell
2019-09-05 10:28   ` Thomas Huth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190905083049.11645-2-thuth@redhat.com \
    --to=thuth@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.