[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 20/42] migration-test: Create guest before calling test_postcopy_
From: |
Juan Quintela |
Subject: |
[PATCH 20/42] migration-test: Create guest before calling test_postcopy_common() |
Date: |
Fri, 9 Jun 2023 00:49:21 +0200 |
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
tests/qtest/migration-test.c | 26 +++++++++++++++++---------
1 file changed, 17 insertions(+), 9 deletions(-)
diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c
index 528dc571ef..a18b3ce1e2 100644
--- a/tests/qtest/migration-test.c
+++ b/tests/qtest/migration-test.c
@@ -1230,11 +1230,9 @@ static void migrate_postcopy_complete(GuestState *from,
GuestState *to,
test_migrate_end(from, to, true);
}
-static void test_postcopy_common(MigrateCommon *args)
+static void test_postcopy_common(GuestState *from, GuestState *to,
+ MigrateCommon *args)
{
- GuestState *from = guest_create("source");
- GuestState *to = guest_create("target");
-
migrate_postcopy_prepare(from, to, args);
migrate_postcopy_start(from->qs, to->qs);
migrate_postcopy_complete(from, to, args);
@@ -1242,49 +1240,59 @@ static void test_postcopy_common(MigrateCommon *args)
static void test_postcopy(void)
{
+ GuestState *from = guest_create("source");
+ GuestState *to = guest_create("target");
MigrateCommon args = { };
- test_postcopy_common(&args);
+ test_postcopy_common(from, to, &args);
}
static void test_postcopy_compress(void)
{
+ GuestState *from = guest_create("source");
+ GuestState *to = guest_create("target");
MigrateCommon args = {
.start_hook = test_migrate_compress_start
};
- test_postcopy_common(&args);
+ test_postcopy_common(from, to, &args);
}
static void test_postcopy_preempt(void)
{
+ GuestState *from = guest_create("source");
+ GuestState *to = guest_create("target");
MigrateCommon args = {
.postcopy_preempt = true,
};
- test_postcopy_common(&args);
+ test_postcopy_common(from, to, &args);
}
#ifdef CONFIG_GNUTLS
static void test_postcopy_tls_psk(void)
{
+ GuestState *from = guest_create("source");
+ GuestState *to = guest_create("target");
MigrateCommon args = {
.start_hook = test_migrate_tls_psk_start_match,
.finish_hook = test_migrate_tls_psk_finish,
};
- test_postcopy_common(&args);
+ test_postcopy_common(from, to, &args);
}
static void test_postcopy_preempt_tls_psk(void)
{
+ GuestState *from = guest_create("source");
+ GuestState *to = guest_create("target");
MigrateCommon args = {
.postcopy_preempt = true,
.start_hook = test_migrate_tls_psk_start_match,
.finish_hook = test_migrate_tls_psk_finish,
};
- test_postcopy_common(&args);
+ test_postcopy_common(from, to, &args);
}
#endif
--
2.40.1
- [PATCH 10/42] migration-test: dirtylimit checks for x86_64 arch before, (continued)
- [PATCH 10/42] migration-test: dirtylimit checks for x86_64 arch before, Juan Quintela, 2023/06/08
- [PATCH 11/42] migration-test: Update test_ignore_shared to use args, Juan Quintela, 2023/06/08
- [PATCH 12/42] migration-test: Enable back ignore-shared test, Juan Quintela, 2023/06/08
- [PATCH 13/42] migration-test: Check for shared memory like for everything else, Juan Quintela, 2023/06/08
- [PATCH 15/42] migration-test: migrate_postcopy_prepare() always return 0, Juan Quintela, 2023/06/08
- [PATCH 14/42] migration-test: test_migrate_start() always return 0, Juan Quintela, 2023/06/08
- [PATCH 16/42] migration-test: Create do_migrate(), Juan Quintela, 2023/06/08
- [PATCH 17/42] migration-test: Introduce GuestState, Juan Quintela, 2023/06/08
- [PATCH 18/42] migration-test: Create guest before calling do_test_validate_uuid(), Juan Quintela, 2023/06/08
- [PATCH 19/42] migration-test: Create guest before calling test_precopy_common(), Juan Quintela, 2023/06/08
- [PATCH 20/42] migration-test: Create guest before calling test_postcopy_common(),
Juan Quintela <=
- [PATCH 21/42] migration-test: Move common guest code to guest_create(), Juan Quintela, 2023/06/08
- [PATCH 22/42] migration-test: Create guest_use_dirty_log(), Juan Quintela, 2023/06/08
- [PATCH 23/42] migration-test: Move serial to GuestState, Juan Quintela, 2023/06/08
- [PATCH 24/42] migration-test: Re-enable multifd_cancel test, Juan Quintela, 2023/06/08
- [PATCH 26/42] migration-test: create guest_use_shmem(), Juan Quintela, 2023/06/08
- [PATCH 29/42] migration-test: Create the migration unix socket by guest, Juan Quintela, 2023/06/08
- [PATCH 25/42] migration-test: We were not waiting for "target" to finish, Juan Quintela, 2023/06/08