diff options
author | Juan Quintela <quintela@redhat.com> | 2017-11-30 21:12:03 +0100 |
---|---|---|
committer | Dr. David Alan Gilbert <dgilbert@redhat.com> | 2018-02-06 10:55:13 +0000 |
commit | 1f90d797110a1e1800ba21cd79b6cd15318cb36a (patch) | |
tree | b317acf903a2b2ef34c54f2fb30f959fd2e22cec /tests | |
parent | 7faccdc3e761ce44d77f986065d4a0e1df5c8a01 (diff) |
tests: Remove deprecated migration tests commands
We move to use migration_set_parameter() for everything.
Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/migration-test.c | 33 |
1 files changed, 8 insertions, 25 deletions
diff --git a/tests/migration-test.c b/tests/migration-test.c index 799e24ebc6..0428d450df 100644 --- a/tests/migration-test.c +++ b/tests/migration-test.c @@ -369,37 +369,20 @@ static void migrate_check_parameter(QTestState *who, const char *parameter, QDECREF(rsp); } -static void migrate_set_downtime(QTestState *who, const double value) +static void migrate_set_parameter(QTestState *who, const char *parameter, + const char *value) { QDict *rsp; gchar *cmd; - char *expected; - int64_t result_int; - cmd = g_strdup_printf("{ 'execute': 'migrate_set_downtime'," - "'arguments': { 'value': %g } }", value); + cmd = g_strdup_printf("{ 'execute': 'migrate-set-parameters'," + "'arguments': { '%s': %s } }", + parameter, value); rsp = qtest_qmp(who, cmd); g_free(cmd); g_assert(qdict_haskey(rsp, "return")); QDECREF(rsp); - result_int = value * 1000L; - expected = g_strdup_printf("%" PRId64, result_int); - migrate_check_parameter(who, "downtime-limit", expected); - g_free(expected); -} - -static void migrate_set_speed(QTestState *who, const char *value) -{ - QDict *rsp; - gchar *cmd; - - cmd = g_strdup_printf("{ 'execute': 'migrate_set_speed'," - "'arguments': { 'value': %s } }", value); - rsp = qtest_qmp(who, cmd); - g_free(cmd); - g_assert(qdict_haskey(rsp, "return")); - QDECREF(rsp); - migrate_check_parameter(who, "max-bandwidth", value); + migrate_check_parameter(who, parameter, value); } static void migrate_set_capability(QTestState *who, const char *capability, @@ -530,8 +513,8 @@ static void test_migrate(void) * quickly, but that it doesn't complete precopy even on a slow * machine, so also set the downtime. */ - migrate_set_speed(from, "100000000"); - migrate_set_downtime(from, 0.001); + migrate_set_parameter(from, "max-bandwidth", "100000000"); + migrate_set_parameter(from, "downtime-limit", "1"); /* Wait for the first serial output from the source */ wait_for_serial("src_serial"); |