From: Fabiano Rosas <farosas@suse.de>
To: qemu-devel@nongnu.org
Cc: "Juan Quintela" <quintela@redhat.com>,
"Peter Xu" <peterx@redhat.com>,
"Steve Sistare" <steven.sistare@oracle.com>,
"Daniel P . Berrangé" <berrange@redhat.com>,
"Thomas Huth" <thuth@redhat.com>,
"Laurent Vivier" <lvivier@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Leonardo Bras" <leobras@redhat.com>
Subject: [PATCH v5 1/6] tests/qtest: migration: Expose migrate_set_capability
Date: Wed, 12 Jul 2023 16:07:37 -0300 [thread overview]
Message-ID: <20230712190742.22294-2-farosas@suse.de> (raw)
In-Reply-To: <20230712190742.22294-1-farosas@suse.de>
The following patch will make use of this function from within
migrate-helpers.c, so move it there.
Reviewed-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Fabiano Rosas <farosas@suse.de>
---
tests/qtest/migration-helpers.c | 11 +++++++++++
tests/qtest/migration-helpers.h | 3 +++
tests/qtest/migration-test.c | 11 -----------
3 files changed, 14 insertions(+), 11 deletions(-)
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
diff --git a/tests/qtest/migration-helpers.h b/tests/qtest/migration-helpers.h
index 009e250e90..484d7c960f 100644
--- a/tests/qtest/migration-helpers.h
+++ b/tests/qtest/migration-helpers.h
@@ -23,6 +23,9 @@ bool migrate_watch_for_resume(QTestState *who, const char *name,
G_GNUC_PRINTF(3, 4)
void migrate_qmp(QTestState *who, const char *uri, const char *fmt, ...);
+void migrate_set_capability(QTestState *who, const char *capability,
+ bool value);
+
QDict *migrate_query(QTestState *who);
QDict *migrate_query_not_failed(QTestState *who);
diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c
index c61a3162b4..9f147ac542 100644
--- a/tests/qtest/migration-test.c
+++ b/tests/qtest/migration-test.c
@@ -571,17 +571,6 @@ static void migrate_cancel(QTestState *who)
qtest_qmp_assert_success(who, "{ 'execute': 'migrate_cancel' }");
}
-static 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);
-}
-
static void migrate_postcopy_start(QTestState *from, QTestState *to)
{
qtest_qmp_assert_success(from, "{ 'execute': 'migrate-start-postcopy' }");
--
2.35.3
next prev parent reply other threads:[~2023-07-12 19:08 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-12 19:07 [PATCH v5 0/6] migration: Test the new "file:" migration Fabiano Rosas
2023-07-12 19:07 ` Fabiano Rosas [this message]
2023-07-12 19:07 ` [PATCH v5 2/6] tests/qtest: migration: Add migrate_incoming_qmp helper Fabiano Rosas
2023-10-04 14:11 ` Juan Quintela
2023-07-12 19:07 ` [PATCH v5 3/6] tests/qtest: migration: Use migrate_incoming_qmp where appropriate Fabiano Rosas
2023-07-12 19:07 ` [PATCH v5 4/6] migration: Set migration status early in incoming side Fabiano Rosas
2023-10-04 14:12 ` Juan Quintela
2023-07-12 19:07 ` [PATCH v5 5/6] tests/qtest: migration: Add support for negative testing of qmp_migrate Fabiano Rosas
2023-07-12 19:07 ` [PATCH v5 6/6] tests/qtest: migration-test: Add tests for file-based migration Fabiano Rosas
2023-07-19 20:08 ` Peter Xu
2023-08-22 12:04 ` [PATCH v5 0/6] migration: Test the new "file:" migration Claudio Fontana
2023-10-04 14:16 ` Juan Quintela
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230712190742.22294-2-farosas@suse.de \
--to=farosas@suse.de \
--cc=berrange@redhat.com \
--cc=leobras@redhat.com \
--cc=lvivier@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peterx@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
--cc=steven.sistare@oracle.com \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).