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 v3 1/6] tests/qtest: migration: Expose migrate_set_capability
Date: Fri, 30 Jun 2023 18:28:57 -0300 [thread overview]
Message-ID: <20230630212902.19925-2-farosas@suse.de> (raw)
In-Reply-To: <20230630212902.19925-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>
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 18bcfc04a6..df17bf431f 100644
--- a/tests/qtest/migration-test.c
+++ b/tests/qtest/migration-test.c
@@ -472,17 +472,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-06-30 21:30 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-30 21:28 [PATCH v3 0/6] migration: Test the new "file:" migration Fabiano Rosas
2023-06-30 21:28 ` Fabiano Rosas [this message]
2023-07-06 18:39 ` [PATCH v3 1/6] tests/qtest: migration: Expose migrate_set_capability Peter Xu
2023-06-30 21:28 ` [PATCH v3 2/6] tests/qtest: migration: Add migrate_incoming_qmp helper Fabiano Rosas
2023-07-06 18:38 ` Peter Xu
2023-06-30 21:28 ` [PATCH v3 3/6] tests/qtest: migration: Use migrate_incoming_qmp where appropriate Fabiano Rosas
2023-07-06 18:38 ` Peter Xu
2023-06-30 21:29 ` [PATCH v3 4/6] migration: Set migration status early in incoming side Fabiano Rosas
2023-07-06 18:40 ` Peter Xu
2023-06-30 21:29 ` [PATCH v3 5/6] tests/qtest: migration: Add support for negative testing of qmp_migrate Fabiano Rosas
2023-07-06 18:49 ` Peter Xu
2023-06-30 21:29 ` [PATCH v3 6/6] tests/qtest: migration-test: Add tests for file-based migration Fabiano Rosas
2023-07-06 18:49 ` Peter Xu
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=20230630212902.19925-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).