From: Fabiano Rosas <farosas@suse.de>
To: qemu-devel@nongnu.org
Cc: berrange@redhat.com, armbru@redhat.com,
Peter Xu <peterx@redhat.com>, Claudio Fontana <cfontana@suse.de>,
Thomas Huth <thuth@redhat.com>,
Laurent Vivier <lvivier@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>
Subject: [PATCH v5 11/23] tests/qtest/migration: Add tests for mapped-ram file-based migration
Date: Wed, 28 Feb 2024 12:21:15 -0300 [thread overview]
Message-ID: <20240228152127.18769-12-farosas@suse.de> (raw)
In-Reply-To: <20240228152127.18769-1-farosas@suse.de>
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Fabiano Rosas <farosas@suse.de>
---
tests/qtest/migration-test.c | 59 ++++++++++++++++++++++++++++++++++++
1 file changed, 59 insertions(+)
diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c
index 83512bce85..64a26009e9 100644
--- a/tests/qtest/migration-test.c
+++ b/tests/qtest/migration-test.c
@@ -2200,6 +2200,14 @@ static void *test_mode_reboot_start(QTestState *from, QTestState *to)
return NULL;
}
+static void *migrate_mapped_ram_start(QTestState *from, QTestState *to)
+{
+ migrate_set_capability(from, "mapped-ram", true);
+ migrate_set_capability(to, "mapped-ram", true);
+
+ return NULL;
+}
+
static void test_mode_reboot(void)
{
g_autofree char *uri = g_strdup_printf("file:%s/%s", tmpfs,
@@ -2214,6 +2222,32 @@ static void test_mode_reboot(void)
test_file_common(&args, true);
}
+static void test_precopy_file_mapped_ram_live(void)
+{
+ g_autofree char *uri = g_strdup_printf("file:%s/%s", tmpfs,
+ FILE_TEST_FILENAME);
+ MigrateCommon args = {
+ .connect_uri = uri,
+ .listen_uri = "defer",
+ .start_hook = migrate_mapped_ram_start,
+ };
+
+ test_file_common(&args, false);
+}
+
+static void test_precopy_file_mapped_ram(void)
+{
+ g_autofree char *uri = g_strdup_printf("file:%s/%s", tmpfs,
+ FILE_TEST_FILENAME);
+ MigrateCommon args = {
+ .connect_uri = uri,
+ .listen_uri = "defer",
+ .start_hook = migrate_mapped_ram_start,
+ };
+
+ test_file_common(&args, true);
+}
+
static void test_precopy_tcp_plain(void)
{
MigrateCommon args = {
@@ -2462,6 +2496,13 @@ static void *migrate_precopy_fd_file_start(QTestState *from, QTestState *to)
return NULL;
}
+static void *migrate_fd_file_mapped_ram_start(QTestState *from, QTestState *to)
+{
+ migrate_mapped_ram_start(from, to);
+
+ return migrate_precopy_fd_file_start(from, to);
+}
+
static void test_migrate_precopy_fd_file(void)
{
MigrateCommon args = {
@@ -2472,6 +2513,17 @@ static void test_migrate_precopy_fd_file(void)
};
test_file_common(&args, true);
}
+
+static void test_migrate_precopy_fd_file_mapped_ram(void)
+{
+ MigrateCommon args = {
+ .listen_uri = "defer",
+ .connect_uri = "fd:fd-mig",
+ .start_hook = migrate_fd_file_mapped_ram_start,
+ .finish_hook = test_migrate_fd_finish_hook
+ };
+ test_file_common(&args, true);
+}
#endif /* _WIN32 */
static void do_test_validate_uuid(MigrateStart *args, bool should_fail)
@@ -3509,6 +3561,11 @@ int main(int argc, char **argv)
migration_test_add("/migration/mode/reboot", test_mode_reboot);
}
+ migration_test_add("/migration/precopy/file/mapped-ram",
+ test_precopy_file_mapped_ram);
+ migration_test_add("/migration/precopy/file/mapped-ram/live",
+ test_precopy_file_mapped_ram_live);
+
#ifdef CONFIG_GNUTLS
migration_test_add("/migration/precopy/unix/tls/psk",
test_precopy_unix_tls_psk);
@@ -3570,6 +3627,8 @@ int main(int argc, char **argv)
test_migrate_precopy_fd_socket);
migration_test_add("/migration/precopy/fd/file",
test_migrate_precopy_fd_file);
+ migration_test_add("/migration/precopy/fd/file/mapped-ram",
+ test_migrate_precopy_fd_file_mapped_ram);
#endif
migration_test_add("/migration/validate_uuid", test_validate_uuid);
migration_test_add("/migration/validate_uuid_error",
--
2.35.3
next prev parent reply other threads:[~2024-02-28 15:22 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-28 15:21 [PATCH v5 00/23] migration: File based migration with multifd and mapped-ram Fabiano Rosas
2024-02-28 15:21 ` [PATCH v5 01/23] migration/multifd: Cleanup multifd_recv_sync_main Fabiano Rosas
2024-02-29 1:26 ` Peter Xu
2024-02-28 15:21 ` [PATCH v5 02/23] io: add and implement QIO_CHANNEL_FEATURE_SEEKABLE for channel file Fabiano Rosas
2024-02-28 15:21 ` [PATCH v5 03/23] io: Add generic pwritev/preadv interface Fabiano Rosas
2024-02-28 15:21 ` [PATCH v5 04/23] io: implement io_pwritev/preadv for QIOChannelFile Fabiano Rosas
2024-02-28 15:21 ` [PATCH v5 05/23] io: fsync before closing a file channel Fabiano Rosas
2024-02-28 15:21 ` [PATCH v5 06/23] migration/qemu-file: add utility methods for working with seekable channels Fabiano Rosas
2024-02-28 15:21 ` [PATCH v5 07/23] migration/ram: Introduce 'mapped-ram' migration capability Fabiano Rosas
2024-02-29 2:10 ` Peter Xu
2024-02-28 15:21 ` [PATCH v5 08/23] migration: Add mapped-ram URI compatibility check Fabiano Rosas
2024-02-28 15:21 ` [PATCH v5 09/23] migration/ram: Add outgoing 'mapped-ram' migration Fabiano Rosas
2024-02-28 15:21 ` [PATCH v5 10/23] migration/ram: Add incoming " Fabiano Rosas
2024-02-28 15:21 ` Fabiano Rosas [this message]
2024-02-28 15:21 ` [PATCH v5 12/23] migration/multifd: Rename MultiFDSend|RecvParams::data to compress_data Fabiano Rosas
2024-02-28 15:21 ` [PATCH v5 13/23] migration/multifd: Decouple recv method from pages Fabiano Rosas
2024-02-28 15:21 ` [PATCH v5 14/23] migration/multifd: Allow multifd without packets Fabiano Rosas
2024-02-29 2:20 ` Peter Xu
2024-02-28 15:21 ` [PATCH v5 15/23] migration/multifd: Allow receiving pages " Fabiano Rosas
2024-02-29 2:28 ` Peter Xu
2024-02-28 15:21 ` [PATCH v5 16/23] migration/multifd: Add a wrapper for channels_created Fabiano Rosas
2024-02-29 2:29 ` Peter Xu
2024-02-28 15:21 ` [PATCH v5 17/23] migration/multifd: Add outgoing QIOChannelFile support Fabiano Rosas
2024-02-29 2:44 ` Peter Xu
2024-02-29 3:33 ` Peter Xu
2024-02-29 14:27 ` Fabiano Rosas
2024-02-29 14:34 ` Daniel P. Berrangé
2024-03-01 0:08 ` Peter Xu
2024-02-28 15:21 ` [PATCH v5 18/23] migration/multifd: Add incoming " Fabiano Rosas
2024-02-29 2:53 ` Peter Xu
2024-02-28 15:21 ` [PATCH v5 19/23] migration/multifd: Prepare multifd sync for mapped-ram migration Fabiano Rosas
2024-02-29 3:16 ` Peter Xu
2024-02-29 13:19 ` Fabiano Rosas
2024-03-01 0:15 ` Peter Xu
2024-02-28 15:21 ` [PATCH v5 20/23] migration/multifd: Support outgoing mapped-ram stream format Fabiano Rosas
2024-02-28 15:21 ` [PATCH v5 21/23] migration/multifd: Support incoming " Fabiano Rosas
2024-02-29 3:23 ` Peter Xu
2024-02-28 15:21 ` [PATCH v5 22/23] migration/multifd: Add mapped-ram support to fd: URI Fabiano Rosas
2024-02-29 3:31 ` Peter Xu
2024-02-28 15:21 ` [PATCH v5 23/23] tests/qtest/migration: Add a multifd + mapped-ram migration test 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=20240228152127.18769-12-farosas@suse.de \
--to=farosas@suse.de \
--cc=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=cfontana@suse.de \
--cc=lvivier@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peterx@redhat.com \
--cc=qemu-devel@nongnu.org \
--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).