qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Balamuruhan S <bala24@linux.vnet.ibm.com>
To: qemu-devel@nongnu.org
Cc: dgilbert@redhat.com, quintela@redhat.com, peterx@redhat.com,
	Balamuruhan S <bala24@linux.vnet.ibm.com>
Subject: [Qemu-devel] [PATCH 1/2] tests: add precopy multifd migration test with unix
Date: Thu,  5 Jul 2018 13:30:16 +0530	[thread overview]
Message-ID: <20180705080017.31123-2-bala24@linux.vnet.ibm.com> (raw)
In-Reply-To: <20180705080017.31123-1-bala24@linux.vnet.ibm.com>

multifd migration feature is in with commit: 35374cbdff, this patch
adds test for it using unix socket.

Signed-off-by: Balamuruhan S <bala24@linux.vnet.ibm.com>
---
 tests/migration-test.c | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/tests/migration-test.c b/tests/migration-test.c
index 3a85446f95..e2434e70ea 100644
--- a/tests/migration-test.c
+++ b/tests/migration-test.c
@@ -619,6 +619,36 @@ static void test_precopy_unix(void)
     g_free(uri);
 }
 
+static void test_multifd_unix(void)
+{
+    char *uri = g_strdup_printf("unix:%s/migsocket", tmpfs);
+    QTestState *from, *to;
+    test_migrate_start(&from, &to, uri, false);
+
+    /* set multifd capability on source and target */
+    migrate_set_capability(from, "x-multifd", "true");
+    migrate_set_capability(to, "x-multifd", "true");
+
+    /* Wait for the first serial output from the source */
+    wait_for_serial("src_serial");
+
+    /* perform migration */
+    migrate(from, uri);
+
+    wait_for_migration_pass(from);
+
+    if (!got_stop) {
+        qtest_qmp_eventwait(from, "STOP");
+    }
+
+    qtest_qmp_eventwait(to, "RESUME");
+
+    wait_for_serial("dest_serial");
+    wait_for_migration_complete(from);
+    test_migrate_end(from, to, true);
+    g_free(uri);
+}
+
 int main(int argc, char **argv)
 {
     char template[] = "/tmp/migration-test-XXXXXX";
@@ -642,6 +672,7 @@ int main(int argc, char **argv)
     qtest_add_func("/migration/deprecated", test_deprecated);
     qtest_add_func("/migration/bad_dest", test_baddest);
     qtest_add_func("/migration/precopy/unix", test_precopy_unix);
+    qtest_add_func("/migration/multifd/unix", test_multifd_unix);
 
     ret = g_test_run();
 
-- 
2.14.3

  reply	other threads:[~2018-07-05  8:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-05  8:00 [Qemu-devel] [PATCH 0/2] tests: multifd migration test scenarios Balamuruhan S
2018-07-05  8:00 ` Balamuruhan S [this message]
2018-07-05  9:19   ` [Qemu-devel] [PATCH 1/2] tests: add precopy multifd migration test with unix Peter Xu
2018-07-05  8:00 ` [Qemu-devel] [PATCH 2/2] tests: add precopy multifd migration with fd protocol Balamuruhan S
2018-07-05  9:26   ` Peter Xu
2018-07-05 12:52     ` Balamuruhan S
2018-07-06  4:37       ` Peter Xu
2018-07-06  5:51         ` Balamuruhan S
2018-07-05  8:06 ` [Qemu-devel] [PATCH 0/2] tests: multifd migration test scenarios no-reply

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=20180705080017.31123-2-bala24@linux.vnet.ibm.com \
    --to=bala24@linux.vnet.ibm.com \
    --cc=dgilbert@redhat.com \
    --cc=peterx@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).