qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RFC] tests/migration-test: Add mapped-ram + ignore-shared test
@ 2025-11-25 19:40 Peter Xu
  2025-11-25 21:40 ` Fabiano Rosas
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Xu @ 2025-11-25 19:40 UTC (permalink / raw)
  To: qemu-devel; +Cc: Juraj Marcin, peterx, Pawel Zmarzly, Fabiano Rosas, michel

It was broken, add a test for it.

NOTE: here we do not really need any shared memory blocks, enabling of both
of the features alone would cover the ramblock layout difference that the
bug triggers.

Cc: Pawel Zmarzly <pzmarzly0@gmail.com>
Cc: Fabiano Rosas <farosas@suse.de>
Cc: michel@michel-slm.name
Signed-off-by: Peter Xu <peterx@redhat.com>
---

RFC because currently master branch is broken with it, so need to merge
only after a proper fix lands.

Pawel, feel free to take this with your fix when repost, or I'll manage.
---
 tests/qtest/migration/file-tests.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/tests/qtest/migration/file-tests.c b/tests/qtest/migration/file-tests.c
index 4d78ce0855..ab1b477bdf 100644
--- a/tests/qtest/migration/file-tests.c
+++ b/tests/qtest/migration/file-tests.c
@@ -137,6 +137,22 @@ static void test_precopy_file_mapped_ram(void)
     test_file_common(&args, true);
 }
 
+static void test_precopy_file_mapped_ram_ignore_share(void)
+{
+    g_autofree char *uri = g_strdup_printf("file:%s/%s", tmpfs,
+                                           FILE_TEST_FILENAME);
+    MigrateCommon args = {
+        .connect_uri = uri,
+        .listen_uri = "defer",
+        .start = {
+            .caps[MIGRATION_CAPABILITY_MAPPED_RAM] = true,
+            .caps[MIGRATION_CAPABILITY_X_IGNORE_SHARED] = true,
+        },
+    };
+
+    test_file_common(&args, true);
+}
+
 static void test_multifd_file_mapped_ram_live(void)
 {
     g_autofree char *uri = g_strdup_printf("file:%s/%s", tmpfs,
@@ -324,6 +340,8 @@ void migration_test_add_file(MigrationTestEnv *env)
 
     migration_test_add("/migration/precopy/file/mapped-ram",
                        test_precopy_file_mapped_ram);
+    migration_test_add("/migration/precopy/file/mapped-ram/ignore-share",
+                       test_precopy_file_mapped_ram_ignore_share);
     migration_test_add("/migration/precopy/file/mapped-ram/live",
                        test_precopy_file_mapped_ram_live);
 
-- 
2.50.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-11-26 12:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-25 19:40 [PATCH RFC] tests/migration-test: Add mapped-ram + ignore-shared test Peter Xu
2025-11-25 21:40 ` Fabiano Rosas
2025-11-26 12:16   ` Paweł Zmarzły

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).