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>
This commit is contained in:
parent
7faccdc3e7
commit
1f90d79711
@ -369,37 +369,20 @@ static void migrate_check_parameter(QTestState *who, const char *parameter,
|
|||||||
QDECREF(rsp);
|
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);
|
|
||||||
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;
|
QDict *rsp;
|
||||||
gchar *cmd;
|
gchar *cmd;
|
||||||
|
|
||||||
cmd = g_strdup_printf("{ 'execute': 'migrate_set_speed',"
|
cmd = g_strdup_printf("{ 'execute': 'migrate-set-parameters',"
|
||||||
"'arguments': { 'value': %s } }", value);
|
"'arguments': { '%s': %s } }",
|
||||||
|
parameter, value);
|
||||||
rsp = qtest_qmp(who, cmd);
|
rsp = qtest_qmp(who, cmd);
|
||||||
g_free(cmd);
|
g_free(cmd);
|
||||||
g_assert(qdict_haskey(rsp, "return"));
|
g_assert(qdict_haskey(rsp, "return"));
|
||||||
QDECREF(rsp);
|
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,
|
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
|
* quickly, but that it doesn't complete precopy even on a slow
|
||||||
* machine, so also set the downtime.
|
* machine, so also set the downtime.
|
||||||
*/
|
*/
|
||||||
migrate_set_speed(from, "100000000");
|
migrate_set_parameter(from, "max-bandwidth", "100000000");
|
||||||
migrate_set_downtime(from, 0.001);
|
migrate_set_parameter(from, "downtime-limit", "1");
|
||||||
|
|
||||||
/* Wait for the first serial output from the source */
|
/* Wait for the first serial output from the source */
|
||||||
wait_for_serial("src_serial");
|
wait_for_serial("src_serial");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user