The generic libqtest library functions should not use functions that
require the global_qtest variable.
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <
20190813093047.27948-5-thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
QObject *qobj;
QString *qstr;
const char *mname;
+ QTestState *qts;
- qtest_start("-machine none");
- response = qmp("{ 'execute': 'query-machines' }");
+ qts = qtest_init("-machine none");
+ response = qtest_qmp(qts, "{ 'execute': 'query-machines' }");
g_assert(response);
list = qdict_get_qlist(response, "return");
g_assert(list);
}
}
- qtest_end();
+ qtest_quit(qts);
qobject_unref(response);
}