From 9d47929034eb8f3e67411926bdd1e8246d2797ed Mon Sep 17 00:00:00 2001 From: Fabiano Rosas Date: Wed, 12 Jul 2023 16:07:37 -0300 Subject: tests/qtest: migration: Expose migrate_set_capability The following patch will make use of this function from within migrate-helpers.c, so move it there. Reviewed-by: Juan Quintela Reviewed-by: Thomas Huth Reviewed-by: Peter Xu Signed-off-by: Fabiano Rosas Signed-off-by: Juan Quintela Message-ID: <20230712190742.22294-2-farosas@suse.de> --- tests/qtest/migration-helpers.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'tests/qtest/migration-helpers.c') diff --git a/tests/qtest/migration-helpers.c b/tests/qtest/migration-helpers.c index be00c52d00..2df198c99e 100644 --- a/tests/qtest/migration-helpers.c +++ b/tests/qtest/migration-helpers.c @@ -70,6 +70,17 @@ void migrate_qmp(QTestState *who, const char *uri, const char *fmt, ...) "{ 'execute': 'migrate', 'arguments': %p}", args); } +void migrate_set_capability(QTestState *who, const char *capability, + bool value) +{ + qtest_qmp_assert_success(who, + "{ 'execute': 'migrate-set-capabilities'," + "'arguments': { " + "'capabilities': [ { " + "'capability': %s, 'state': %i } ] } }", + capability, value); +} + /* * Note: caller is responsible to free the returned object via * qobject_unref() after use -- cgit 1.4.1