diff options
| author | Prasad Pandit <pjp@fedoraproject.org> | 2025-04-11 17:15:33 +0530 |
|---|---|---|
| committer | Peter Xu <peterx@redhat.com> | 2025-05-02 11:09:36 -0400 |
| commit | 115cec9d663c1a2f5a73df4a5ca02b3a676e8a2a (patch) | |
| tree | af7cb5ae7e53cdd204dfa1ce50a6181f61fe3127 /tests/qtest/migration/framework.h | |
| parent | ad8d82ffbb8b8034f58a570911e6e9c6328c9384 (diff) | |
| download | focaccia-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/framework.h')
| -rw-r--r-- | tests/qtest/migration/framework.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/qtest/migration/framework.h b/tests/qtest/migration/framework.h index e4a11870f6..01e425e64e 100644 --- a/tests/qtest/migration/framework.h +++ b/tests/qtest/migration/framework.h @@ -12,6 +12,7 @@ #define TEST_FRAMEWORK_H #include "libqtest.h" +#include <qapi/qapi-types-migration.h> #define FILE_TEST_FILENAME "migfile" #define FILE_TEST_OFFSET 0x1000 @@ -120,6 +121,13 @@ typedef struct { /* Do not connect to target monitor and qtest sockets in qtest_init */ bool defer_target_connect; + + /* + * Migration capabilities to be set in both source and + * destination. For unilateral capabilities, use + * migration_set_capabilities(). + */ + bool caps[MIGRATION_CAPABILITY__MAX]; } MigrateStart; typedef enum PostcopyRecoveryFailStage { @@ -207,7 +215,6 @@ typedef struct { /* Postcopy specific fields */ void *postcopy_data; - bool postcopy_preempt; PostcopyRecoveryFailStage postcopy_recovery_fail_stage; } MigrateCommon; |