From: Wei Yang <richardw.yang@linux.intel.com>
To: Juan Quintela <quintela@redhat.com>
Cc: Laurent Vivier <lvivier@redhat.com>,
Thomas Huth <thuth@redhat.com>,
Markus Armbruster <armbru@redhat.com>,
qemu-devel@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>,
"Dr. David Alan Gilbert" <dgilbert@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v3 2/8] migration-test: rename parameter to parameter_int
Date: Mon, 20 May 2019 14:43:12 +0800 [thread overview]
Message-ID: <20190520064312.GC6718@richard> (raw)
In-Reply-To: <20190515121544.4597-3-quintela@redhat.com>
On Wed, May 15, 2019 at 02:15:38PM +0200, Juan Quintela wrote:
>We would need _str ones on the next patch.
>
>Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Wei Yang <richardw.yang@linux.intel.com>
>---
> tests/migration-test.c | 49 +++++++++++++++++++++---------------------
> 1 file changed, 25 insertions(+), 24 deletions(-)
>
>diff --git a/tests/migration-test.c b/tests/migration-test.c
>index bd3f5c3125..0b25aa3d6c 100644
>--- a/tests/migration-test.c
>+++ b/tests/migration-test.c
>@@ -392,7 +392,8 @@ static char *migrate_get_socket_address(QTestState *who, const char *parameter)
> return result;
> }
>
>-static long long migrate_get_parameter(QTestState *who, const char *parameter)
>+static long long migrate_get_parameter_int(QTestState *who,
>+ const char *parameter)
> {
> QDict *rsp;
> long long result;
>@@ -403,17 +404,17 @@ static long long migrate_get_parameter(QTestState *who, const char *parameter)
> return result;
> }
>
>-static void migrate_check_parameter(QTestState *who, const char *parameter,
>- long long value)
>+static void migrate_check_parameter_int(QTestState *who, const char *parameter,
>+ long long value)
> {
> long long result;
>
>- result = migrate_get_parameter(who, parameter);
>+ result = migrate_get_parameter_int(who, parameter);
> g_assert_cmpint(result, ==, value);
> }
>
>-static void migrate_set_parameter(QTestState *who, const char *parameter,
>- long long value)
>+static void migrate_set_parameter_int(QTestState *who, const char *parameter,
>+ long long value)
> {
> QDict *rsp;
>
>@@ -423,7 +424,7 @@ static void migrate_set_parameter(QTestState *who, const char *parameter,
> parameter, value);
> g_assert(qdict_haskey(rsp, "return"));
> qobject_unref(rsp);
>- migrate_check_parameter(who, parameter, value);
>+ migrate_check_parameter_int(who, parameter, value);
> }
>
> static void migrate_pause(QTestState *who)
>@@ -672,7 +673,7 @@ static void deprecated_set_downtime(QTestState *who, const double value)
> " 'arguments': { 'value': %f } }", value);
> g_assert(qdict_haskey(rsp, "return"));
> qobject_unref(rsp);
>- migrate_check_parameter(who, "downtime-limit", value * 1000);
>+ migrate_check_parameter_int(who, "downtime-limit", value * 1000);
> }
>
> static void deprecated_set_speed(QTestState *who, long long value)
>@@ -683,7 +684,7 @@ static void deprecated_set_speed(QTestState *who, long long value)
> "'arguments': { 'value': %lld } }", value);
> g_assert(qdict_haskey(rsp, "return"));
> qobject_unref(rsp);
>- migrate_check_parameter(who, "max-bandwidth", value);
>+ migrate_check_parameter_int(who, "max-bandwidth", value);
> }
>
> static void deprecated_set_cache_size(QTestState *who, long long value)
>@@ -694,7 +695,7 @@ static void deprecated_set_cache_size(QTestState *who, long long value)
> "'arguments': { 'value': %lld } }", value);
> g_assert(qdict_haskey(rsp, "return"));
> qobject_unref(rsp);
>- migrate_check_parameter(who, "xbzrle-cache-size", value);
>+ migrate_check_parameter_int(who, "xbzrle-cache-size", value);
> }
>
> static void test_deprecated(void)
>@@ -729,8 +730,8 @@ static int migrate_postcopy_prepare(QTestState **from_ptr,
> * quickly, but that it doesn't complete precopy even on a slow
> * machine, so also set the downtime.
> */
>- migrate_set_parameter(from, "max-bandwidth", 100000000);
>- migrate_set_parameter(from, "downtime-limit", 1);
>+ migrate_set_parameter_int(from, "max-bandwidth", 100000000);
>+ migrate_set_parameter_int(from, "downtime-limit", 1);
>
> /* Wait for the first serial output from the source */
> wait_for_serial("src_serial");
>@@ -781,7 +782,7 @@ static void test_postcopy_recovery(void)
> }
>
> /* Turn postcopy speed down, 4K/s is slow enough on any machines */
>- migrate_set_parameter(from, "max-postcopy-bandwidth", 4096);
>+ migrate_set_parameter_int(from, "max-postcopy-bandwidth", 4096);
>
> /* Now we start the postcopy */
> migrate_postcopy_start(from, to);
>@@ -822,7 +823,7 @@ static void test_postcopy_recovery(void)
> g_free(uri);
>
> /* Restore the postcopy bandwidth to unlimited */
>- migrate_set_parameter(from, "max-postcopy-bandwidth", 0);
>+ migrate_set_parameter_int(from, "max-postcopy-bandwidth", 0);
>
> migrate_postcopy_complete(from, to);
> }
>@@ -868,9 +869,9 @@ static void test_precopy_unix(void)
> * machine, so also set the downtime.
> */
> /* 1 ms should make it not converge*/
>- migrate_set_parameter(from, "downtime-limit", 1);
>+ migrate_set_parameter_int(from, "downtime-limit", 1);
> /* 1GB/s */
>- migrate_set_parameter(from, "max-bandwidth", 1000000000);
>+ migrate_set_parameter_int(from, "max-bandwidth", 1000000000);
>
> /* Wait for the first serial output from the source */
> wait_for_serial("src_serial");
>@@ -880,7 +881,7 @@ static void test_precopy_unix(void)
> wait_for_migration_pass(from);
>
> /* 300 ms should converge */
>- migrate_set_parameter(from, "downtime-limit", 300);
>+ migrate_set_parameter_int(from, "downtime-limit", 300);
>
> if (!got_stop) {
> qtest_qmp_eventwait(from, "STOP");
>@@ -947,11 +948,11 @@ static void test_xbzrle(const char *uri)
> * machine, so also set the downtime.
> */
> /* 1 ms should make it not converge*/
>- migrate_set_parameter(from, "downtime-limit", 1);
>+ migrate_set_parameter_int(from, "downtime-limit", 1);
> /* 1GB/s */
>- migrate_set_parameter(from, "max-bandwidth", 1000000000);
>+ migrate_set_parameter_int(from, "max-bandwidth", 1000000000);
>
>- migrate_set_parameter(from, "xbzrle-cache-size", 33554432);
>+ migrate_set_parameter_int(from, "xbzrle-cache-size", 33554432);
>
> migrate_set_capability(from, "xbzrle", "true");
> migrate_set_capability(to, "xbzrle", "true");
>@@ -963,7 +964,7 @@ static void test_xbzrle(const char *uri)
> wait_for_migration_pass(from);
>
> /* 300ms should converge */
>- migrate_set_parameter(from, "downtime-limit", 300);
>+ migrate_set_parameter_int(from, "downtime-limit", 300);
>
> if (!got_stop) {
> qtest_qmp_eventwait(from, "STOP");
>@@ -999,9 +1000,9 @@ static void test_precopy_tcp(void)
> * machine, so also set the downtime.
> */
> /* 1 ms should make it not converge*/
>- migrate_set_parameter(from, "downtime-limit", 1);
>+ migrate_set_parameter_int(from, "downtime-limit", 1);
> /* 1GB/s */
>- migrate_set_parameter(from, "max-bandwidth", 1000000000);
>+ migrate_set_parameter_int(from, "max-bandwidth", 1000000000);
>
> /* Wait for the first serial output from the source */
> wait_for_serial("src_serial");
>@@ -1013,7 +1014,7 @@ static void test_precopy_tcp(void)
> wait_for_migration_pass(from);
>
> /* 300ms should converge */
>- migrate_set_parameter(from, "downtime-limit", 300);
>+ migrate_set_parameter_int(from, "downtime-limit", 300);
>
> if (!got_stop) {
> qtest_qmp_eventwait(from, "STOP");
>--
>2.21.0
>
--
Wei Yang
Help you, Help me
next prev parent reply other threads:[~2019-05-20 6:44 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-15 12:15 [Qemu-devel] [PATCH v3 0/8] WIP: Multifd compression support Juan Quintela
2019-05-15 12:15 ` [Qemu-devel] [PATCH v3 1/8] migration: fix multifd_recv event typo Juan Quintela
2019-05-17 17:25 ` Dr. David Alan Gilbert
2019-05-20 6:38 ` Wei Yang
2019-05-15 12:15 ` [Qemu-devel] [PATCH v3 2/8] migration-test: rename parameter to parameter_int Juan Quintela
2019-05-20 6:43 ` Wei Yang [this message]
2019-05-15 12:15 ` [Qemu-devel] [PATCH v3 3/8] tests: Add migration multifd test Juan Quintela
2019-05-20 2:03 ` Wei Yang
2019-06-10 9:20 ` Juan Quintela
2019-05-20 6:48 ` Wei Yang
2019-06-10 9:23 ` Juan Quintela
2019-05-15 12:15 ` [Qemu-devel] [PATCH v3 4/8] migration-test: introduce functions to handle string parameters Juan Quintela
2019-05-15 12:15 ` [Qemu-devel] [PATCH v3 5/8] migration: Add multifd-compress parameter Juan Quintela
2019-05-15 15:34 ` Markus Armbruster
2019-06-10 9:38 ` Juan Quintela
2019-05-20 7:11 ` Wei Yang
2019-06-10 9:41 ` Juan Quintela
2019-05-20 12:53 ` Wei Yang
2019-06-10 9:42 ` Juan Quintela
2019-05-20 21:32 ` Wei Yang
2019-06-10 9:45 ` Juan Quintela
2019-05-15 12:15 ` [Qemu-devel] [PATCH v3 6/8] migration: Make none operations into its own structure Juan Quintela
2019-05-21 2:47 ` Wei Yang
2019-06-10 9:54 ` Juan Quintela
2019-05-29 16:34 ` Dr. David Alan Gilbert
2019-06-10 9:54 ` Juan Quintela
2019-06-12 11:54 ` Juan Quintela
2019-05-15 12:15 ` [Qemu-devel] [PATCH v3 7/8] multifd: Add zlib compression support Juan Quintela
2019-05-21 3:07 ` Wei Yang
2019-06-11 16:50 ` Juan Quintela
2019-05-29 16:48 ` Dr. David Alan Gilbert
2019-06-11 16:46 ` Juan Quintela
2019-05-15 12:15 ` [Qemu-devel] [PATCH v3 8/8] multifd: rest of zlib compression Juan Quintela
2019-05-21 3:11 ` Wei Yang
2019-06-11 16:54 ` Juan Quintela
2019-05-29 17:15 ` Dr. David Alan Gilbert
2019-06-12 8:33 ` Juan Quintela
2019-05-20 6:35 ` [Qemu-devel] [PATCH v3 0/8] WIP: Multifd compression support Wei Yang
2019-06-10 14:27 ` Eric Blake
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=20190520064312.GC6718@richard \
--to=richardw.yang@linux.intel.com \
--cc=armbru@redhat.com \
--cc=dgilbert@redhat.com \
--cc=lvivier@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
--cc=thuth@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).