@samitouri / QOSamiQemu / commits / 3dd28d65d0

tests/qtest/migration: Remove multifd compression hook

Take advantage of the default compression method for multifd being "none" and remove the common compression hook. Signed-off-by: Fabiano Rosas <farosas@suse.de> Reviewed-by: Peter Xu <peterx@redhat.com> Link: https://lore.kernel.org/r/20260505160915.25558-10-farosas@suse.de Signed-off-by: Peter Xu <peterx@redhat.com>

Fabiano Rosas committed May 5, 2026 at 13:09 UTC 3dd28d65d052fc87d65347a3e88e372083ba8c69
4 files changed +8 -89
tests/qtest/migration/framework.c
-9
@@ -1063,15 +1063,6 @@ finish:
1063 migrate_end(from, to, args->result == MIG_TEST_SUCCEED);
1064 }
1065
1066 -void *migrate_hook_start_precopy_tcp_multifd_common(QTestState *from,
1067 - QTestState *to,
1068 - const char *method)
1069 -{
1070 - migrate_set_parameter_str(from, "multifd-compression", method);
1071 - migrate_set_parameter_str(to, "multifd-compression", method);
1072 - return NULL;
1073 -}
1074 -
1066 QTestMigrationState *get_src(void)
1067 {
1068 return &src_state;
tests/qtest/migration/framework.h
-3
@@ -242,9 +242,6 @@ void test_postcopy_recovery_common(MigrateCommon *args,
242 int test_precopy_common(MigrateCommon *args);
243 void test_precopy_unix_common(MigrateCommon *args);
244 void test_file_common(MigrateCommon *args, bool stop_src);
245 -void *migrate_hook_start_precopy_tcp_multifd_common(QTestState *from,
246 - QTestState *to,
247 - const char *method);
245
246 typedef struct QTestMigrationState QTestMigrationState;
247 QTestMigrationState *get_src(void);
tests/qtest/migration/precopy-tests.c
-11
@@ -322,18 +322,10 @@ static void test_auto_converge(char *name, MigrateCommon *args)
322 migrate_end(from, to, true);
323 }
324
325 -static void *
326 -migrate_hook_start_precopy_tcp_multifd(QTestState *from,
327 - QTestState *to)
328 -{
329 - return migrate_hook_start_precopy_tcp_multifd_common(from, to, "none");
330 -}
331 -
325 static void *
326 migrate_hook_start_precopy_tcp_multifd_zero_page_legacy(QTestState *from,
327 QTestState *to)
328 {
336 - migrate_hook_start_precopy_tcp_multifd_common(from, to, "none");
329 migrate_set_parameter_str(from, "zero-page-detection", "legacy");
330 return NULL;
331 }
@@ -342,14 +334,12 @@ static void *
334 migrate_hook_start_precopy_tcp_multifd_no_zero_page(QTestState *from,
335 QTestState *to)
336 {
345 - migrate_hook_start_precopy_tcp_multifd_common(from, to, "none");
337 migrate_set_parameter_str(from, "zero-page-detection", "none");
338 return NULL;
339 }
340
341 static void test_multifd_tcp_uri_none(char *name, MigrateCommon *args)
342 {
352 - args->start_hook = migrate_hook_start_precopy_tcp_multifd;
343 /*
344 * Multifd is more complicated than most of the features, it
345 * directly takes guest page buffers when sending, make sure
@@ -394,7 +384,6 @@ static void test_multifd_tcp_no_zero_page(char *name, MigrateCommon *args)
384
385 static void test_multifd_tcp_channels_none(char *name, MigrateCommon *args)
386 {
397 - args->start_hook = migrate_hook_start_precopy_tcp_multifd;
387 args->live = true;
388 args->connect_channels = ("[ { 'channel-type': 'main',"
389 " 'addr': { 'transport': 'socket',"
tests/qtest/migration/tls-tests.c
+8 -66
@@ -593,67 +593,9 @@ static void test_precopy_tcp_tls_x509_reject_anon_client(char *name,
593 }
594 #endif /* CONFIG_TASN1 */
595
596 -static void *
597 -migrate_hook_start_multifd_tcp_tls_psk_match(QTestState *from,
598 - QTestState *to)
599 -{
600 - migrate_hook_start_precopy_tcp_multifd_common(from, to, "none");
601 - return migrate_hook_start_tls_psk_match(from, to);
602 -}
603 -
604 -static void *
605 -migrate_hook_start_multifd_tcp_tls_psk_mismatch(QTestState *from,
606 - QTestState *to)
607 -{
608 - migrate_hook_start_precopy_tcp_multifd_common(from, to, "none");
609 - return migrate_hook_start_tls_psk_mismatch(from, to);
610 -}
611 -
612 -#ifdef CONFIG_TASN1
613 -static void *
614 -migrate_hook_start_multifd_tls_x509_default_host(QTestState *from,
615 - QTestState *to)
616 -{
617 - migrate_hook_start_precopy_tcp_multifd_common(from, to, "none");
618 - return migrate_hook_start_tls_x509_default_host(from, to);
619 -}
620 -
621 -static void *
622 -migrate_hook_start_multifd_tls_x509_override_host(QTestState *from,
623 - QTestState *to)
624 -{
625 - migrate_hook_start_precopy_tcp_multifd_common(from, to, "none");
626 - return migrate_hook_start_tls_x509_override_host(from, to);
627 -}
628 -
629 -static void *
630 -migrate_hook_start_multifd_tls_x509_mismatch_host(QTestState *from,
631 - QTestState *to)
632 -{
633 - migrate_hook_start_precopy_tcp_multifd_common(from, to, "none");
634 - return migrate_hook_start_tls_x509_mismatch_host(from, to);
635 -}
636 -
637 -static void *
638 -migrate_hook_start_multifd_tls_x509_allow_anon_client(QTestState *from,
639 - QTestState *to)
640 -{
641 - migrate_hook_start_precopy_tcp_multifd_common(from, to, "none");
642 - return migrate_hook_start_tls_x509_allow_anon_client(from, to);
643 -}
644 -
645 -static void *
646 -migrate_hook_start_multifd_tls_x509_reject_anon_client(QTestState *from,
647 - QTestState *to)
648 -{
649 - migrate_hook_start_precopy_tcp_multifd_common(from, to, "none");
650 - return migrate_hook_start_tls_x509_reject_anon_client(from, to);
651 -}
652 -#endif /* CONFIG_TASN1 */
653 -
596 static void test_multifd_tcp_tls_psk_match(char *name, MigrateCommon *args)
597 {
656 - args->start_hook = migrate_hook_start_multifd_tcp_tls_psk_match;
598 + args->start_hook = migrate_hook_start_tls_psk_match;
599 args->end_hook = migrate_hook_end_tls_psk;
600
601 args->start.caps[MIGRATION_CAPABILITY_MULTIFD] = true;
@@ -663,7 +605,7 @@ static void test_multifd_tcp_tls_psk_match(char *name, MigrateCommon *args)
605
606 static void test_multifd_tcp_tls_psk_mismatch(char *name, MigrateCommon *args)
607 {
666 - args->start_hook = migrate_hook_start_multifd_tcp_tls_psk_mismatch;
608 + args->start_hook = migrate_hook_start_tls_psk_mismatch;
609 args->end_hook = migrate_hook_end_tls_psk;
610 args->result = MIG_TEST_FAIL;
611
@@ -676,7 +618,7 @@ static void test_multifd_tcp_tls_psk_mismatch(char *name, MigrateCommon *args)
618 static void test_multifd_postcopy_tcp_tls_psk_match(char *name,
619 MigrateCommon *args)
620 {
679 - args->start_hook = migrate_hook_start_multifd_tcp_tls_psk_match;
621 + args->start_hook = migrate_hook_start_tls_psk_match;
622 args->end_hook = migrate_hook_end_tls_psk;
623
624 args->start.caps[MIGRATION_CAPABILITY_MULTIFD] = true;
@@ -689,7 +631,7 @@ static void test_multifd_postcopy_tcp_tls_psk_match(char *name,
631 static void test_multifd_tcp_tls_x509_default_host(char *name,
632 MigrateCommon *args)
633 {
692 - args->start_hook = migrate_hook_start_multifd_tls_x509_default_host;
634 + args->start_hook = migrate_hook_start_tls_x509_default_host;
635 args->end_hook = migrate_hook_end_tls_x509;
636
637 args->start.caps[MIGRATION_CAPABILITY_MULTIFD] = true;
@@ -700,7 +642,7 @@ static void test_multifd_tcp_tls_x509_default_host(char *name,
642 static void test_multifd_tcp_tls_x509_override_host(char *name,
643 MigrateCommon *args)
644 {
703 - args->start_hook = migrate_hook_start_multifd_tls_x509_override_host;
645 + args->start_hook = migrate_hook_start_tls_x509_override_host;
646 args->end_hook = migrate_hook_end_tls_x509;
647
648 args->start.caps[MIGRATION_CAPABILITY_MULTIFD] = true;
@@ -724,7 +666,7 @@ static void test_multifd_tcp_tls_x509_mismatch_host(char *name,
666 * to load migration state, and thus just aborts the migration
667 * without exiting.
668 */
727 - args->start_hook = migrate_hook_start_multifd_tls_x509_mismatch_host;
669 + args->start_hook = migrate_hook_start_tls_x509_mismatch_host;
670 args->end_hook = migrate_hook_end_tls_x509;
671 args->result = MIG_TEST_FAIL;
672
@@ -737,7 +679,7 @@ static void test_multifd_tcp_tls_x509_mismatch_host(char *name,
679 static void test_multifd_tcp_tls_x509_allow_anon_client(char *name,
680 MigrateCommon *args)
681 {
740 - args->start_hook = migrate_hook_start_multifd_tls_x509_allow_anon_client;
682 + args->start_hook = migrate_hook_start_tls_x509_allow_anon_client;
683 args->end_hook = migrate_hook_end_tls_x509;
684
685 args->start.caps[MIGRATION_CAPABILITY_MULTIFD] = true;
@@ -748,7 +690,7 @@ static void test_multifd_tcp_tls_x509_allow_anon_client(char *name,
690 static void test_multifd_tcp_tls_x509_reject_anon_client(char *name,
691 MigrateCommon *args)
692 {
751 - args->start_hook = migrate_hook_start_multifd_tls_x509_reject_anon_client;
693 + args->start_hook = migrate_hook_start_tls_x509_reject_anon_client;
694 args->end_hook = migrate_hook_end_tls_x509;
695 args->result = MIG_TEST_FAIL;
696