Skip to contentSkip to conversation

tests/migration-test: Add mapped-ram + ignore-shared test

RFC PATCH In review Peter Xu 3 participants 3 messages Nov 25, 2025 – Nov 26, 2025

lore
Share & tools
lore

Peter Xu

author
#0 lore raw

RFC PATCH 1/1 tests/migration-test: Add mapped-ram + ignore-shared test

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.

---

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(+)
tests/qtest/migration/file-tests.c +18 -0
index 4d78ce0855..ab1b477bdf 100644
@@ -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);
 
Signature · 1 line
2.50.1
Acked-by on v1 1/1
#1 lore raw
Quoted 25 lines · Peter Xu

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.

---

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(+)
tests/qtest/migration/file-tests.c +0 -0
index 4d78ce0855..ab1b477bdf 100644

tests/qtest/migration/file-tests.c static void test_precopy_file_mapped_ram(void) · line 140

Quoted 4 lines
tests/qtest/migration/file-tests.c +1 -0
@@ -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)

s/share/shared/

#2 lore raw
Quoted 3 lines
Quoted 1 line · Peter Xu

Pawel, feel free to take this with your fix when repost, or I'll manage.

Copied into V2 of my patch.