"Dr. David Alan Gilbert" <dgilb...@redhat.com> wrote: > * Juan Quintela (quint...@redhat.com) wrote: >> Signed-off-by: Juan Quintela <quint...@redhat.com> >> --- >> tests/migration-test.c | 27 ++++++++++++++++++++++++--- >> 1 file changed, 24 insertions(+), 3 deletions(-) >> >> diff --git a/tests/migration-test.c b/tests/migration-test.c >> index c429a13403..be598d3257 100644 >> --- a/tests/migration-test.c >> +++ b/tests/migration-test.c >> @@ -354,17 +354,37 @@ static void cleanup(const char *filename) >> g_free(path); >> } >> >> -static void migrate_set_downtime(QTestState *who, const char *value) >> +static void migrate_check_parameter(QTestState *who, const char *parameter, >> + const char *value) >> +{ >> + QDict *rsp, *rsp_return; >> + const char *result; >> + >> + rsp = wait_command(who, "{ 'execute': 'query-migrate-parameters' }"); >> + rsp_return = qdict_get_qdict(rsp, "return"); >> + result = g_strdup_printf("%" PRId64, >> + qdict_get_try_int(rsp_return, parameter, -1)); >> + g_assert_cmpstr(result, ==, value); >> + QDECREF(rsp); >> +} >> + >> +static void migrate_set_downtime(QTestState *who, const double value) >> { >> QDict *rsp; >> gchar *cmd; >> + char *expected; >> + int64_t result_int; >> >> cmd = g_strdup_printf("{ 'execute': 'migrate_set_downtime'," >> - "'arguments': { 'value': %s } }", value); >> + "'arguments': { 'value': %g } }", value); > > I wonder if that will hit any FP representation problems for some > values?
This is a deprecated function, so ..... Thanks, Juan.