summaryrefslogtreecommitdiffstats
path: root/tests/qtest
diff options
context:
space:
mode:
authorXuzhou Cheng2022-10-28 06:57:32 +0200
committerThomas Huth2022-10-28 14:32:09 +0200
commitf2d063e61ee2026700ab44bef967f663e976bec8 (patch)
tree24a026a7d29b72d4bdaf9a3bf17643346f6e650c /tests/qtest
parenttests/qtest: libqtest: Introduce qtest_wait_qemu() (diff)
downloadqemu-f2d063e61ee2026700ab44bef967f663e976bec8.tar.gz
qemu-f2d063e61ee2026700ab44bef967f663e976bec8.tar.xz
qemu-f2d063e61ee2026700ab44bef967f663e976bec8.zip
tests/qtest: migration-test: Make sure QEMU process "to" exited after migration is canceled
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.cheng@windriver.com> Signed-off-by: Bin Meng <bin.meng@windriver.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20221028045736.679903-8-bin.meng@windriver.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'tests/qtest')
-rw-r--r--tests/qtest/migration-test.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c
index 28a06d8170..d2eb107f0c 100644
--- a/tests/qtest/migration-test.c
+++ b/tests/qtest/migration-test.c
@@ -2141,6 +2141,10 @@ static void test_multifd_tcp_cancel(void)
migrate_cancel(from);
+ /* Make sure QEMU process "to" exited */
+ qtest_set_expected_status(to, EXIT_FAILURE);
+ qtest_wait_qemu(to);
+
args = (MigrateStart){
.only_target = true,
};