qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Xu <peterx@redhat.com>
To: qemu-devel@nongnu.org
Cc: Juraj Marcin <jmarcin@redhat.com>,
	peterx@redhat.com, Pawel Zmarzly <pzmarzly0@gmail.com>,
	Fabiano Rosas <farosas@suse.de>,
	michel@michel-slm.name
Subject: [PATCH RFC] tests/migration-test: Add mapped-ram + ignore-shared test
Date: Tue, 25 Nov 2025 14:40:03 -0500	[thread overview]
Message-ID: <20251125194003.833842-1-peterx@redhat.com> (raw)

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



             reply	other threads:[~2025-11-25 19:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-25 19:40 Peter Xu [this message]
2025-11-25 21:40 ` [PATCH RFC] tests/migration-test: Add mapped-ram + ignore-shared test Fabiano Rosas
2025-11-26 12:16   ` Paweł Zmarzły

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=20251125194003.833842-1-peterx@redhat.com \
    --to=peterx@redhat.com \
    --cc=farosas@suse.de \
    --cc=jmarcin@redhat.com \
    --cc=michel@michel-slm.name \
    --cc=pzmarzly0@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /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).