[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 23/30] qtest/migration-tests.c: use "-incoming defer" for postcopy
From: |
Juan Quintela |
Subject: |
[PULL 23/30] qtest/migration-tests.c: use "-incoming defer" for postcopy tests |
Date: |
Thu, 22 Jun 2023 04:13:13 +0200 |
From: Wei Wang <wei.w.wang@intel.com>
The Postcopy preempt capability is expected to be set before incoming
starts, so change the postcopy tests to start with deferred incoming and
call migrate-incoming after the cap has been set.
Why the existing tests (without this patch) didn't fail?
There could be two reasons:
1) "backlog" specifies the number of pending connections. As long as the
server accepts the connections faster than the clients side connecting,
connection will succeed. For the preempt test, it uses only 2 channels,
so very likely to not have pending connections.
2) per my tests (on kernel 6.2), the number of pending connections allowed
is actually "backlog + 1", which is 2 in this case.
That said, the implementation of socket_start_incoming_migration_internal
expects "migrate defer" to be used, and for safety, change the test to
work with the expected usage.
Signed-off-by: Wei Wang <wei.w.wang@intel.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Message-ID: <20230606101910.20456-3-wei.w.wang@intel.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
tests/qtest/migration-test.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c
index e3e7d54216..c694685923 100644
--- a/tests/qtest/migration-test.c
+++ b/tests/qtest/migration-test.c
@@ -1161,10 +1161,10 @@ static int migrate_postcopy_prepare(QTestState
**from_ptr,
QTestState **to_ptr,
MigrateCommon *args)
{
- g_autofree char *uri = g_strdup_printf("unix:%s/migsocket", tmpfs);
+ g_autofree char *uri = NULL;
QTestState *from, *to;
- if (test_migrate_start(&from, &to, uri, &args->start)) {
+ if (test_migrate_start(&from, &to, "defer", &args->start)) {
return -1;
}
@@ -1183,9 +1183,13 @@ static int migrate_postcopy_prepare(QTestState
**from_ptr,
migrate_ensure_non_converge(from);
+ qtest_qmp_assert_success(to, "{ 'execute': 'migrate-incoming',"
+ " 'arguments': { 'uri': 'tcp:127.0.0.1:0' }}");
+
/* Wait for the first serial output from the source */
wait_for_serial("src_serial");
+ uri = migrate_get_socket_address(to, "socket-address");
migrate_qmp(from, uri, "{}");
wait_for_migration_pass(from);
--
2.40.1
- [PULL 09/30] migration: Implement dirty-limit convergence algo, (continued)
- [PULL 09/30] migration: Implement dirty-limit convergence algo, Juan Quintela, 2023/06/21
- [PULL 12/30] migration-test: Make machine_opts regular with other options, Juan Quintela, 2023/06/21
- [PULL 11/30] migration-test: Be consistent for ppc, Juan Quintela, 2023/06/21
- [PULL 13/30] migration-test: Create arch_opts, Juan Quintela, 2023/06/21
- [PULL 14/30] migration-test: machine_opts is really arch specific, Juan Quintela, 2023/06/21
- [PULL 18/30] migration-test: dirtylimit checks for x86_64 arch before, Juan Quintela, 2023/06/21
- [PULL 10/30] migration: Extend query-migrate to provide dirty page limit info, Juan Quintela, 2023/06/21
- [PULL 17/30] migration-test: Add bootfile_create/delete() functions, Juan Quintela, 2023/06/21
- [PULL 21/30] migration: Refactor repeated call of yank_unregister_instance, Juan Quintela, 2023/06/21
- [PULL 19/30] migration-test: simplify shmem_opts handling, Juan Quintela, 2023/06/21
- [PULL 23/30] qtest/migration-tests.c: use "-incoming defer" for postcopy tests,
Juan Quintela <=
- [PULL 15/30] migration-test: Create kvm_opts, Juan Quintela, 2023/06/21
- [PULL 20/30] migration: Update error description whenever migration fails, Juan Quintela, 2023/06/21
- [PULL 16/30] migration-test: bootpath is the same for all tests and for all archs, Juan Quintela, 2023/06/21
- [PULL 25/30] migration: Change qemu_file_transferred to noflush, Juan Quintela, 2023/06/21
- [PULL 22/30] migration: enforce multifd and postcopy preempt to be set before incoming, Juan Quintela, 2023/06/21
- [PULL 24/30] qemu-file: Rename qemu_file_transferred_ fast -> noflush, Juan Quintela, 2023/06/21
- [PULL 26/30] migration: Use qemu_file_transferred_noflush() for block migration., Juan Quintela, 2023/06/21
- [PULL 28/30] qemu-file: Simplify qemu_file_shutdown(), Juan Quintela, 2023/06/21
- [PULL 27/30] qemu_file: Make qemu_file_is_writable() static, Juan Quintela, 2023/06/21