[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v6 9/9] migration: adding test case for modified QAPI syntax
From: |
Het Gala |
Subject: |
[PATCH v6 9/9] migration: adding test case for modified QAPI syntax |
Date: |
Tue, 6 Jun 2023 10:15:57 +0000 |
Adding multifd tcp common test case for modified QAPI syntax defined.
Suggested-by: Aravind Retnakaran <aravind.retnakaran@nutanix.com>
Signed-off-by: Het Gala <het.gala@nutanix.com>
---
tests/qtest/migration-test.c | 45 ++++++++++++++++++++++++++++++++++++
1 file changed, 45 insertions(+)
diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c
index b0c355bbd9..310484f6d5 100644
--- a/tests/qtest/migration-test.c
+++ b/tests/qtest/migration-test.c
@@ -2059,6 +2059,32 @@ test_migrate_precopy_tcp_multifd_start_common(QTestState
*from,
return NULL;
}
+static void *
+test_migrate_precopy_tcp_multifd_start_new_syntax_common(QTestState *from,
+ QTestState *to,
+ const char *method)
+{
+ migrate_set_parameter_int(from, "multifd-channels", 16);
+ migrate_set_parameter_int(to, "multifd-channels", 16);
+
+ migrate_set_parameter_str(from, "multifd-compression", method);
+ migrate_set_parameter_str(to, "multifd-compression", method);
+
+ migrate_set_capability(from, "multifd", true);
+ migrate_set_capability(to, "multifd", true);
+
+ /* Start incoming migration from the 1st socket */
+ qtest_qmp_assert_success(to, "{ 'execute': 'migrate-incoming',"
+ " 'arguments': { "
+ " 'channels': [ { 'channeltype': 'main',"
+ " 'addr': { 'transport': 'socket',"
+ " 'type': 'inet',"
+ " 'host': '127.0.0.1',"
+ " 'port': '0' } } ] } }");
+
+ return NULL;
+}
+
static void *
test_migrate_precopy_tcp_multifd_start(QTestState *from,
QTestState *to)
@@ -2066,6 +2092,14 @@ test_migrate_precopy_tcp_multifd_start(QTestState *from,
return test_migrate_precopy_tcp_multifd_start_common(from, to, "none");
}
+static void *
+test_migrate_precopy_tcp_multifd_new_syntax_start(QTestState *from,
+ QTestState *to)
+{
+ return test_migrate_precopy_tcp_multifd_start_new_syntax_common(from,
+ to, "none");
+}
+
static void *
test_migrate_precopy_tcp_multifd_zlib_start(QTestState *from,
QTestState *to)
@@ -2097,6 +2131,15 @@ static void test_multifd_tcp_none(void)
test_precopy_common(&args);
}
+static void test_multifd_tcp_new_syntax_none(void)
+{
+ MigrateCommon args = {
+ .listen_uri = "defer",
+ .start_hook = test_migrate_precopy_tcp_multifd_new_syntax_start,
+ };
+ test_precopy_common(&args);
+}
+
static void test_multifd_tcp_zlib(void)
{
MigrateCommon args = {
@@ -2778,6 +2821,8 @@ int main(int argc, char **argv)
}
qtest_add_func("/migration/multifd/tcp/plain/none",
test_multifd_tcp_none);
+ qtest_add_func("/migration/multifd/tcp/plain/none",
+ test_multifd_tcp_new_syntax_none);
/*
* This test is flaky and sometimes fails in CI and otherwise:
* don't run unless user opts in via environment variable.
--
2.22.3
- [PATCH v6 0/9] migration: Modify 'migrate' and 'migrate-incoming' QAPI commands for migration, Het Gala, 2023/06/06
- [PATCH v6 1/9] migration: introduced 'MigrateAddress' in QAPI for migration wire protocol., Het Gala, 2023/06/06
- [PATCH v6 2/9] migration: convert uri parameter into 'MigrateAddress' struct, Het Gala, 2023/06/06
- [PATCH v6 4/9] migration: convert rdma backend to accept MigrateAddress struct, Het Gala, 2023/06/06
- [PATCH v6 3/9] migration: convert socket backend to accept MigrateAddress struct, Het Gala, 2023/06/06
- [PATCH v6 5/9] migration: convert exec backend to accept MigrateAddress struct., Het Gala, 2023/06/06
- [PATCH v6 6/9] migration: modified migration QAPIs to accept 'channels' argument for migration, Het Gala, 2023/06/06
- [PATCH v6 9/9] migration: adding test case for modified QAPI syntax,
Het Gala <=
- [PATCH v6 8/9] migration: Introduced MigrateChannelList struct to migration code flow., Het Gala, 2023/06/06
- [PATCH v6 7/9] migration: modify migration_channels_and_uri_compatible() to incorporate newer migration QAPI syntax, Het Gala, 2023/06/06