tests/qtest/migration: Do proper cleanup in the dirty_limit test
authorFabiano Rosas <farosas@suse.de>
Mon, 9 Dec 2024 20:44:22 +0000 (17:44 -0300)
committerFabiano Rosas <farosas@suse.de>
Thu, 2 Jan 2025 19:00:50 +0000 (16:00 -0300)
The dirty_limit test does two migrations in a row and is leaking the
first 'to' instance. Do proper cleanup.

Reviewed-by: Peter Xu <peterx@redhat.com>
Message-Id: <20241209204427.17763-2-farosas@suse.de>
Signed-off-by: Fabiano Rosas <farosas@suse.de>
tests/qtest/migration/precopy-tests.c

index b709d9051d0d5fcf2ade9c20f157a4eca4820340..23599b29ee28968cc8fe1b02640742ccd6e1ac03 100644 (file)
@@ -877,6 +877,11 @@ static void test_dirty_limit(void)
     migrate_cancel(from);
     wait_for_migration_status(from, "cancelled", NULL);
 
+    /* destination always fails after cancel */
+    migration_event_wait(to, "failed");
+    qtest_set_expected_status(to, EXIT_FAILURE);
+    qtest_quit(to);
+
     /* Check if dirty limit throttle switched off, set timeout 1ms */
     do {
         throttle_us_per_full =