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 <[email protected]> Cc: Fabiano Rosas <[email protected]> Cc: [email protected] Signed-off-by: Peter Xu <[email protected]> --- 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
