qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/42] Migration test refactoring
@ 2023-06-08 22:49 Juan Quintela
  2023-06-08 22:49 ` [PATCH 01/42] migration-test: Be consistent for ppc Juan Quintela
                   ` (41 more replies)
  0 siblings, 42 replies; 76+ messages in thread
From: Juan Quintela @ 2023-06-08 22:49 UTC (permalink / raw)
  To: qemu-devel
  Cc: Paolo Bonzini, Laurent Vivier, Thomas Huth, Peter Xu,
	Peter Maydell, Juan Quintela, Daniel P . Berrangé,
	Leonardo Bras

Hi

This series do a lot of much neededs cleanups and fixes to migration-test:

- We make source and target machines coherent/constent
- We make all command line options consistent
- We split test_migrate_start() and test_migrate_end() into:

  * guest_start() from from and to.  It is the same function, just
    defines the basic options.  I am open to renaming it to
    guest_define() or anything else that people can came with.

  * guest_destroy(), you have guessed it, right?

  * guest_realize() after guest_start() and adding any options we
    need, we just create the guest.  We use the same function from
    source and target, making inconsistencies disapear.

- uri: right now it is a mess, we can have:
  * uri created with migration_start()
  * or listen_uri
  * or connect_uri
  * or by hand
  now we just setup to->uri, and we get the migrate uri automatically from there.

- we were creating bootfile for each migration test.  Change the code
  so we only create it once for the whole migration test.

- Introduce GuestState.  Using QTestState directly means that we can
  add state by guest, making it abuse local variables.  Now we move
  all guest state into GuestState.

- Apart from test found by Fabiano, we had another problems with
  multifd + cancel:

  * We didn't wait for "to" guest to finish before we launch second
    target guest "to2".  We fixed it by destroying "to" before
    launching "to2".

  * We reused "dest_serial" filename from "to" and "to2", so in a very
    loaded host, it could be that we contact with the wrong vm, and we
    never end.

  * I change the code so the serial filename is dependent on guest
    name, that made changing the interface:
    wait_for_serial("dest_serial") to
    wait_for_relial(to) (or to2 or ...) so we can't fail.

- we move the global event variables to GuestState, so no more
  got_src_stop or got_dst_resume, we just check
    who->got_event

- create a function from migrate-incoming, so now we do:
  migrate_incoming(uri) and it does what we want/expect.

- vcpu_dirty_limit is not related to migration at all, just is easier
  to write with migration infrastructure.  Move all useful functions
  to migration-helpers.[ch] and split the test into
  vcpu-dirty-limit-test.c.  I think that we can declare that test slow.

- Now that guest_create/destry exist, we can "reuse" them in
  vcpu_dirty_limit test.

- The removal of files, like "migsocket" was flaky at least, i.e. not
  always removed.  "migsocket-recover" was not even tried to remove.
  New code just remove them by default.

- MigrationStart is gone, instead of creating that flags, I just call
  functions that do that function.

- if no uri is given for a target guest, it launches with -incoming
  defer, that should be the default.

ToDo:

- Tests shouldn't really use QMP, if we need QMP, we should hide it
  behind a c function.  Almost everything is there now, except things
  like "reuse".

- I think we should split auto-converge test:
  * we are not testing migration there, we are testing vcpu slowdown
  * the test is really slow, see documentation why we can't make it much faster.

- I still need to make test faster with stoping switchover.

Please, review.

Juan Quintela (42):
  migration-test: Be consistent for ppc
  migration-test: Make ignore_stderr regular with other options
  migration-test: simplify shmem_opts handling
  migration-test: Make machine_opts regular with other options
  migration-test: Create arch_opts
  migration-test: machine_opts is really arch specific
  migration-test: Create kvm_opts
  migration-test: bootpath is the same for all tests and for all archs
  migration-test: Add bootfile_create/delete() functions
  migration-test: dirtylimit checks for x86_64 arch before
  migration-test: Update test_ignore_shared to use args
  migration-test: Enable back ignore-shared test
  migration-test: Check for shared memory like for everything else
  migration-test: test_migrate_start() always return 0
  migration-test: migrate_postcopy_prepare() always return 0
  migration-test: Create do_migrate()
  migration-test: Introduce GuestState
  migration-test: Create guest before calling do_test_validate_uuid()
  migration-test: Create guest before calling test_precopy_common()
  migration-test: Create guest before calling test_postcopy_common()
  migration-test: Move common guest code to guest_create()
  migration-test: Create guest_use_dirty_log()
  migration-test: Move serial to GuestState
  migration-test: Re-enable multifd_cancel test
  migration-test: We were not waiting for "target" to finish
  migration-test: create guest_use_shmem()
  migration-test: Create guest_extra_opts()
  migration-test: Create guest_hide_stderr()
  migration-test: Create the migration unix socket by guest
  migration-test: Hooks also need GuestState
  migration-test: Preffer to->uri to uri parameter for migration
  migration-test: Create guest_set_uri()
  migration-test: Remove connect_uri
  migration-test: Use new schema for all tests that use unix sockets
  migration-test: Set uri for tcp tests with guest_set_uri()
  migration-test: Remove unused listen_uri
  migration-test: Create get_event GuestState variable
  migration-test: Create guest_realize()
  migration-test: Unfold test_migrate_end() into three functions
  migration-test: Create migrate_incoming() function
  migration-test: Move functions to migration-helpers.c
  migration-test: Split vcpu-dirty-limit-test

 MAINTAINERS                         |    3 +-
 tests/qtest/migration-helpers.h     |   39 +
 tests/qtest/migration-helpers.c     |  242 +++++
 tests/qtest/migration-test.c        | 1525 +++++++++------------------
 tests/qtest/vcpu-dirty-limit-test.c |  310 ++++++
 tests/qtest/meson.build             |    5 +-
 6 files changed, 1113 insertions(+), 1011 deletions(-)
 create mode 100644 tests/qtest/vcpu-dirty-limit-test.c


base-commit: 45ae97993a75f975f1a01d25564724c7e10a543f
prerequisite-patch-id: f95418b6f47019ec82d47aac8ba5247775f503a3
-- 
2.40.1



^ permalink raw reply	[flat|nested] 76+ messages in thread

end of thread, other threads:[~2023-06-21 21:54 UTC | newest]

Thread overview: 76+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-08 22:49 [PATCH 00/42] Migration test refactoring Juan Quintela
2023-06-08 22:49 ` [PATCH 01/42] migration-test: Be consistent for ppc Juan Quintela
2023-06-20 14:54   ` Peter Xu
2023-06-20 19:27     ` Laurent Vivier
2023-06-20 19:42       ` Peter Xu
2023-06-08 22:49 ` [PATCH 02/42] migration-test: Make ignore_stderr regular with other options Juan Quintela
2023-06-20 14:59   ` Peter Xu
2023-06-21 10:20     ` Juan Quintela
2023-06-08 22:49 ` [PATCH 03/42] migration-test: simplify shmem_opts handling Juan Quintela
2023-06-20 15:02   ` Peter Xu
2023-06-21  9:42     ` Juan Quintela
2023-06-21 13:15       ` Peter Xu
2023-06-08 22:49 ` [PATCH 04/42] migration-test: Make machine_opts regular with other options Juan Quintela
2023-06-20 15:03   ` Peter Xu
2023-06-08 22:49 ` [PATCH 05/42] migration-test: Create arch_opts Juan Quintela
2023-06-20 15:06   ` Peter Xu
2023-06-08 22:49 ` [PATCH 06/42] migration-test: machine_opts is really arch specific Juan Quintela
2023-06-20 15:07   ` Peter Xu
2023-06-08 22:49 ` [PATCH 07/42] migration-test: Create kvm_opts Juan Quintela
2023-06-20 15:07   ` Peter Xu
2023-06-08 22:49 ` [PATCH 08/42] migration-test: bootpath is the same for all tests and for all archs Juan Quintela
2023-06-20 15:11   ` Peter Xu
2023-06-08 22:49 ` [PATCH 09/42] migration-test: Add bootfile_create/delete() functions Juan Quintela
2023-06-20 15:17   ` Peter Xu
2023-06-08 22:49 ` [PATCH 10/42] migration-test: dirtylimit checks for x86_64 arch before Juan Quintela
2023-06-20 15:18   ` Peter Xu
2023-06-08 22:49 ` [PATCH 11/42] migration-test: Update test_ignore_shared to use args Juan Quintela
2023-06-20 15:21   ` Peter Xu
2023-06-21  9:58     ` Juan Quintela
2023-06-08 22:49 ` [PATCH 12/42] migration-test: Enable back ignore-shared test Juan Quintela
2023-06-20 15:27   ` Peter Xu
2023-06-21 19:38     ` Juan Quintela
2023-06-21 19:53       ` Peter Xu
2023-06-21 20:37         ` Juan Quintela
2023-06-21 21:53         ` Juan Quintela
2023-06-08 22:49 ` [PATCH 13/42] migration-test: Check for shared memory like for everything else Juan Quintela
2023-06-20 15:32   ` Peter Xu
2023-06-21 10:07     ` Juan Quintela
2023-06-21 13:14       ` Peter Xu
2023-06-21 18:56         ` Juan Quintela
2023-06-08 22:49 ` [PATCH 14/42] migration-test: test_migrate_start() always return 0 Juan Quintela
2023-06-20 15:35   ` Peter Xu
2023-06-08 22:49 ` [PATCH 15/42] migration-test: migrate_postcopy_prepare() " Juan Quintela
2023-06-20 15:36   ` Peter Xu
2023-06-08 22:49 ` [PATCH 16/42] migration-test: Create do_migrate() Juan Quintela
2023-06-20 15:53   ` Peter Xu
2023-06-21 10:30     ` Juan Quintela
2023-06-08 22:49 ` [PATCH 17/42] migration-test: Introduce GuestState Juan Quintela
2023-06-08 22:49 ` [PATCH 18/42] migration-test: Create guest before calling do_test_validate_uuid() Juan Quintela
2023-06-08 22:49 ` [PATCH 19/42] migration-test: Create guest before calling test_precopy_common() Juan Quintela
2023-06-08 22:49 ` [PATCH 20/42] migration-test: Create guest before calling test_postcopy_common() Juan Quintela
2023-06-08 22:49 ` [PATCH 21/42] migration-test: Move common guest code to guest_create() Juan Quintela
2023-06-08 22:49 ` [PATCH 22/42] migration-test: Create guest_use_dirty_log() Juan Quintela
2023-06-08 22:49 ` [PATCH 23/42] migration-test: Move serial to GuestState Juan Quintela
2023-06-08 22:49 ` [PATCH 24/42] migration-test: Re-enable multifd_cancel test Juan Quintela
2023-06-09  7:53   ` Daniel P. Berrangé
2023-06-09 10:22     ` Juan Quintela
2023-06-09 10:40       ` Daniel P. Berrangé
2023-06-08 22:49 ` [PATCH 25/42] migration-test: We were not waiting for "target" to finish Juan Quintela
2023-06-08 22:49 ` [PATCH 26/42] migration-test: create guest_use_shmem() Juan Quintela
2023-06-08 22:49 ` [PATCH 27/42] migration-test: Create guest_extra_opts() Juan Quintela
2023-06-08 22:49 ` [PATCH 28/42] migration-test: Create guest_hide_stderr() Juan Quintela
2023-06-08 22:49 ` [PATCH 29/42] migration-test: Create the migration unix socket by guest Juan Quintela
2023-06-08 22:49 ` [PATCH 30/42] migration-test: Hooks also need GuestState Juan Quintela
2023-06-08 22:49 ` [PATCH 31/42] migration-test: Preffer to->uri to uri parameter for migration Juan Quintela
2023-06-08 22:49 ` [PATCH 32/42] migration-test: Create guest_set_uri() Juan Quintela
2023-06-08 22:49 ` [PATCH 33/42] migration-test: Remove connect_uri Juan Quintela
2023-06-08 22:49 ` [PATCH 34/42] migration-test: Use new schema for all tests that use unix sockets Juan Quintela
2023-06-08 22:49 ` [PATCH 35/42] migration-test: Set uri for tcp tests with guest_set_uri() Juan Quintela
2023-06-08 22:49 ` [PATCH 36/42] migration-test: Remove unused listen_uri Juan Quintela
2023-06-08 22:49 ` [PATCH 37/42] migration-test: Create get_event GuestState variable Juan Quintela
2023-06-08 22:49 ` [PATCH 38/42] migration-test: Create guest_realize() Juan Quintela
2023-06-08 22:49 ` [PATCH 39/42] migration-test: Unfold test_migrate_end() into three functions Juan Quintela
2023-06-08 22:49 ` [PATCH 40/42] migration-test: Create migrate_incoming() function Juan Quintela
2023-06-08 22:49 ` [PATCH 41/42] migration-test: Move functions to migration-helpers.c Juan Quintela
2023-06-08 22:49 ` [PATCH 42/42] migration-test: Split vcpu-dirty-limit-test Juan Quintela

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).