From: Fabiano Rosas <farosas@suse.de>
To: qemu-devel@nongnu.org
Cc: "Daniel P . Berrangé" <berrange@redhat.com>,
"Peter Xu" <peterx@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Thomas Huth" <thuth@redhat.com>,
"Juan Quintela" <quintela@redhat.com>,
"Leonardo Bras" <leobras@redhat.com>,
"Laurent Vivier" <lvivier@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>
Subject: [PATCH v2 3/4] tests/qtest/migration: Adapt tests to use older QEMUs
Date: Thu, 4 Jan 2024 14:18:56 -0300 [thread overview]
Message-ID: <20240104171857.20108-4-farosas@suse.de> (raw)
In-Reply-To: <20240104171857.20108-1-farosas@suse.de>
Add the 'since' annotations to recently added tests and adapt the
postcopy test to use the older "uri" API when needed.
Signed-off-by: Fabiano Rosas <farosas@suse.de>
---
tests/qtest/migration-test.c | 34 +++++++++++++++++++++++++++-------
1 file changed, 27 insertions(+), 7 deletions(-)
diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c
index 001470238b..599f51f978 100644
--- a/tests/qtest/migration-test.c
+++ b/tests/qtest/migration-test.c
@@ -1338,14 +1338,21 @@ static int migrate_postcopy_prepare(QTestState **from_ptr,
migrate_ensure_non_converge(from);
migrate_prepare_for_dirty_mem(from);
- qtest_qmp_assert_success(to, "{ 'execute': 'migrate-incoming',"
- " 'arguments': { "
- " 'channels': [ { 'channel-type': 'main',"
- " 'addr': { 'transport': 'socket',"
- " 'type': 'inet',"
- " 'host': '127.0.0.1',"
- " 'port': '0' } } ] } }");
+ /* New syntax was introduced in 8.2 */
+ if (migration_vercmp(to, "8.2") < 0) {
+ qtest_qmp_assert_success(to, "{ 'execute': 'migrate-incoming',"
+ " 'arguments': { "
+ " 'uri': 'tcp:127.0.0.1:0' } }");
+ } else {
+ qtest_qmp_assert_success(to, "{ 'execute': 'migrate-incoming',"
+ " 'arguments': { "
+ " 'channels': [ { 'channel-type': 'main',"
+ " 'addr': { 'transport': 'socket',"
+ " 'type': 'inet',"
+ " 'host': '127.0.0.1',"
+ " 'port': '0' } } ] } }");
+ }
/* Wait for the first serial output from the source */
wait_for_serial("src_serial");
@@ -1603,6 +1610,9 @@ static void test_postcopy_recovery_double_fail(void)
{
MigrateCommon args = {
.postcopy_recovery_test_fail = true,
+ .start = {
+ .since = "8.2",
+ },
};
test_postcopy_recovery_common(&args);
@@ -1665,6 +1675,7 @@ static void test_analyze_script(void)
{
MigrateStart args = {
.opts_source = "-uuid 11111111-1111-1111-1111-111111111111",
+ .since = "8.2",
};
QTestState *from, *to;
g_autofree char *uri = NULL;
@@ -2090,6 +2101,9 @@ static void test_precopy_file(void)
MigrateCommon args = {
.connect_uri = uri,
.listen_uri = "defer",
+ .start = {
+ .since = "8.2"
+ },
};
test_file_common(&args, true);
@@ -2134,6 +2148,9 @@ static void test_precopy_file_offset(void)
.connect_uri = uri,
.listen_uri = "defer",
.finish_hook = file_offset_finish_hook,
+ .start = {
+ .since = "8.2"
+ },
};
test_file_common(&args, false);
@@ -2148,6 +2165,9 @@ static void test_precopy_file_offset_bad(void)
.connect_uri = uri,
.listen_uri = "defer",
.result = MIG_TEST_QMP_ERROR,
+ .start = {
+ .since = "8.2"
+ },
};
test_file_common(&args, false);
--
2.35.3
next prev parent reply other threads:[~2024-01-04 17:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-04 17:18 [PATCH v2 0/4] migration & CI: Add a CI job for migration compat testing Fabiano Rosas
2024-01-04 17:18 ` [PATCH v2 1/4] tests/qtest: Add a helper to query the QEMU version Fabiano Rosas
2024-01-04 17:18 ` [PATCH v2 2/4] tests/qtest/migration: Add infrastructure to skip tests on older QEMUs Fabiano Rosas
2024-01-04 17:26 ` Daniel P. Berrangé
2024-01-04 17:53 ` Fabiano Rosas
2024-01-04 17:18 ` Fabiano Rosas [this message]
2024-01-04 17:18 ` [PATCH v2 4/4] ci: Add a migration compatibility test job Fabiano Rosas
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=20240104171857.20108-4-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=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.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).