summary refs log tree commit diff stats
path: root/tests/qtest/migration/cpr-tests.c
diff options
context:
space:
mode:
authorPrasad Pandit <pjp@fedoraproject.org>2025-04-11 17:15:33 +0530
committerPeter Xu <peterx@redhat.com>2025-05-02 11:09:36 -0400
commit115cec9d663c1a2f5a73df4a5ca02b3a676e8a2a (patch)
treeaf7cb5ae7e53cdd204dfa1ce50a6181f61fe3127 /tests/qtest/migration/cpr-tests.c
parentad8d82ffbb8b8034f58a570911e6e9c6328c9384 (diff)
downloadfocaccia-qemu-115cec9d663c1a2f5a73df4a5ca02b3a676e8a2a.tar.gz
focaccia-qemu-115cec9d663c1a2f5a73df4a5ca02b3a676e8a2a.zip
tests/qtest/migration: consolidate set capabilities
Migration capabilities are set in multiple '.start_hook'
functions for various tests. Instead, consolidate setting
capabilities in 'migrate_start_set_capabilities()' function
which is called from the 'migrate_start()' function.
While simplifying the capabilities setting, it helps
to declutter the qtest sources.

Suggested-by: Fabiano Rosas <farosas@suse.de>
Signed-off-by: Prasad Pandit <pjp@fedoraproject.org>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Message-ID: <20250411114534.3370816-7-ppandit@redhat.com>
[fix open brace]
Signed-off-by: Fabiano Rosas <farosas@suse.de>
Diffstat (limited to 'tests/qtest/migration/cpr-tests.c')
-rw-r--r--tests/qtest/migration/cpr-tests.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/qtest/migration/cpr-tests.c b/tests/qtest/migration/cpr-tests.c
index 4758841824..5536e14610 100644
--- a/tests/qtest/migration/cpr-tests.c
+++ b/tests/qtest/migration/cpr-tests.c
@@ -24,9 +24,6 @@ static void *migrate_hook_start_mode_reboot(QTestState *from, QTestState *to)
     migrate_set_parameter_str(from, "mode", "cpr-reboot");
     migrate_set_parameter_str(to, "mode", "cpr-reboot");
 
-    migrate_set_capability(from, "x-ignore-shared", true);
-    migrate_set_capability(to, "x-ignore-shared", true);
-
     return NULL;
 }
 
@@ -39,6 +36,9 @@ static void test_mode_reboot(void)
         .connect_uri = uri,
         .listen_uri = "defer",
         .start_hook = migrate_hook_start_mode_reboot,
+        .start = {
+            .caps[MIGRATION_CAPABILITY_X_IGNORE_SHARED] = true,
+        },
     };
 
     test_file_common(&args, true);