tests/qtest/migration: Fix slow test dirty_limit
After the referenced commit, the incoming side doesn't exit automatically after a failure. Tests that expect the destination to fail should use -incoming defer, issue QMP migrate-incoming, wait for the failure event and issue QMP quit. Fix the dirty_limit test which wasn't updated properly. Fixes: 4e8c4dda97 ("tests/qtest/migration: Force exit-on-error=false") Reported-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com> Link: https://lore.kernel.org/qemu-devel/20260326164405.1626-1-farosas@suse.de Signed-off-by: Fabiano Rosas <farosas@suse.de>
Fabiano Rosas committed
Mar 26, 2026 at 13:44 UTC
6f33b6eebb7d406871150b0285c36454a1b4d0d3
1 file changed
+2
-2
tests/qtest/migration/precopy-tests.c
+2
-2
@@ -1070,11 +1070,10 @@ static void test_dirty_limit(char *name, MigrateCommon *args)
1070
args->start.hide_stderr = true;
1071
args->start.use_dirty_ring = true;
1072
1073
- args->listen_uri = uri;
1073
args->connect_uri = uri;
1074
1075
/* Start src, dst vm */
1077
- if (migrate_start(&from, &to, args->listen_uri, &args->start)) {
1076
+ if (migrate_start(&from, &to, "defer", &args->start)) {
1077
return;
1078
}
1079
@@ -1082,6 +1081,7 @@ static void test_dirty_limit(char *name, MigrateCommon *args)
1081
migrate_dirty_limit_wait_showup(from, dirtylimit_period, dirtylimit_value);
1082
1083
/* Start migrate */
1084
+ migrate_incoming_qmp(to, args->connect_uri, NULL, "{}");
1085
migrate_qmp(from, to, args->connect_uri, NULL, "{}");
1086
1087
/* Wait for dirty limit throttle begin */