[PATCH 1/6] tests/qtest/migration: Do proper cleanup in the dirty_limit test

Fabiano Rosas posted 6 patches 5 months ago
[PATCH 1/6] tests/qtest/migration: Do proper cleanup in the dirty_limit test
Posted by Fabiano Rosas 5 months ago
The dirty_limit test does two migrations in a row and is leaking the
first 'to' instance. Do proper cleanup.

Signed-off-by: Fabiano Rosas <farosas@suse.de>
---
 tests/qtest/migration-test.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c
index 74d3000198..c3d54f1236 100644
--- a/tests/qtest/migration-test.c
+++ b/tests/qtest/migration-test.c
@@ -3682,6 +3682,11 @@ static void test_migrate_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 =
-- 
2.35.3
Re: [PATCH 1/6] tests/qtest/migration: Do proper cleanup in the dirty_limit test
Posted by Peter Xu 5 months ago
On Mon, Dec 09, 2024 at 05:44:22PM -0300, Fabiano Rosas wrote:
> The dirty_limit test does two migrations in a row and is leaking the
> first 'to' instance. Do proper cleanup.
> 
> Signed-off-by: Fabiano Rosas <farosas@suse.de>

Reviewed-by: Peter Xu <peterx@redhat.com>

-- 
Peter Xu