From: Xuzhou Cheng <xuzhou.ch...@windriver.com> Make sure QEMU process "to" exited before launching another target for migration in the test_multifd_tcp_cancel case.
Signed-off-by: Xuzhou Cheng <xuzhou.ch...@windriver.com> Signed-off-by: Bin Meng <bin.m...@windriver.com> --- (no changes since v3) Changes in v3: - Add a usleep(1) in the busy wait loop Changes in v2: - Change to a busy wait after migration is canceled tests/qtest/migration-test.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index ef4427ff4d..e5ba0e21d2 100644 --- a/tests/qtest/migration-test.c +++ b/tests/qtest/migration-test.c @@ -2140,6 +2140,10 @@ static void test_multifd_tcp_cancel(void) wait_for_migration_pass(from); migrate_cancel(from); + /* Make sure QEMU process "to" exited */ + while (qtest_probe_child(to)) { + usleep(1); + } args = (MigrateStart){ .only_target = true, -- 2.34.1