Migration test refactoring
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest42 patches 33 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/42 | migration-test: Be consistent for ppctests/ | +1 | 3 replies | |
| 2/42 | migration-test: Make ignore_stderr regular with other optionstests/ | +4 | 2 replies | |
| 3/42 | migration-test: simplify shmem_opts handlingtests/ | +4 | 3 replies | |
| 4/42 | migration-test: Make machine_opts regular with other optionstests/ | +4 | 1 reply | |
| 5/42 | migration-test: Create arch_optstests/ | +13 | 1 reply | |
| 6/42 | migration-test: machine_opts is really arch specifictests/ | +5 | 1 reply | |
| 7/42 | migration-test: Create kvm_optstests/ | +7 | 1 reply | |
| 8/42 | migration-test: bootpath is the same for all tests and for all archstests/ | +9 | 1 reply | |
| 9/42 | migration-test: Add bootfile_create/delete() functionstests/ | +36 | 1 reply | |
| 10/42 | migration-test: dirtylimit checks for x86_64 arch beforetests/ | +1 | 1 reply | |
| 11/42 | migration-test: Update test_ignore_shared to use argstests/ | +4 | 2 replies | |
| 12/42 | migration-test: Enable back ignore-shared testtests/ | +1 | 5 replies | |
| 13/42 | migration-test: Check for shared memory like for everything elsetests/ | +12 | 4 replies | |
| 14/42 | migration-test: test_migrate_start() always return 0tests/ | +10 | 1 reply | |
| 15/42 | migration-test: migrate_postcopy_prepare() always return 0tests/ | +5 | 1 reply | |
| 16/42 | migration-test: Create do_migrate()tests/ | +21 | 2 replies | |
| 17/42 | migration-test: Introduce GuestStatetests/ | +180 | 0 replies | |
| 18/42 | migration-test: Create guest before calling do_test_validate_uuid()tests/ | +14 | 0 replies | |
| 19/42 | migration-test: Create guest before calling test_precopy_common()tests/ | +89 | 0 replies | |
| 20/42 | migration-test: Create guest before calling test_postcopy_common()tests/ | +17 | 0 replies | |
| 21/42 | migration-test: Move common guest code to guest_create()tests/ | +55 | 0 replies | |
| 22/42 | migration-test: Create guest_use_dirty_log()tests/ | +15 | 0 replies | |
| 23/42 | migration-test: Move serial to GuestStatetests/ | +37 | 0 replies | |
| 24/42 | migration-test: Re-enable multifd_cancel testtests/ | +2 | 3 replies | |
| 25/42 | migration-test: We were not waiting for "target" to finishtests/ | +2 | 0 replies | |
| 26/42 | migration-test: create guest_use_shmem()tests/ | +22 | 0 replies | |
| 27/42 | migration-test: Create guest_extra_opts()tests/ | +16 | 0 replies | |
| 28/42 | migration-test: Create guest_hide_stderr()tests/ | +54 | 0 replies | |
| 29/42 | migration-test: Create the migration unix socket by guesttests/ | +32 | 0 replies | |
| 30/42 | migration-test: Hooks also need GuestStatetests/ | +86 | 0 replies | |
| 31/42 | migration-test: Preffer to->uri to uri parameter for migrationtests/ | +15 | 0 replies | |
| 32/42 | migration-test: Create guest_set_uri()tests/ | +10 | 0 replies | |
| 33/42 | migration-test: Remove connect_uritests/ | +13 | 0 replies | |
| 34/42 | migration-test: Use new schema for all tests that use unix socketstests/ | +11 | 0 replies | |
| 35/42 | migration-test: Set uri for tcp tests with guest_set_uri()tests/ | +13 | 0 replies | |
| 36/42 | migration-test: Remove unused listen_uritests/ | +10 | 0 replies | |
| 37/42 | migration-test: Create get_event GuestState variabletests/ | +22 | 0 replies | |
| 38/42 | migration-test: Create guest_realize()tests/ | +54 | 0 replies | |
| 39/42 | migration-test: Unfold test_migrate_end() into three functionstests/ | +35 | 0 replies | |
| 40/42 | migration-test: Create migrate_incoming() functiontests/ | +11 | 0 replies | |
| 41/42 | migration-test: Move functions to migration-helpers.ctests/ tests/ tests/ | +281 | 0 replies | |
| 42/42 | migration-test: Split vcpu-dirty-limit-testMAINTAINERS tests/ tests/ +1 more | +316 | 0 replies |
Reviews trailers per patch
13 of 42 patches have a Reviewed-by or Acked-by.
| Patch | Peter Xu | Laurent Vivier |
|---|---|---|
| 1/42 | R-b | |
| 2/42 | ||
| 3/42 | R-b | |
| 4/42 | R-b | |
| 5/42 | R-b | |
| 6/42 | R-b | |
| 7/42 | R-b | |
| 8/42 | R-b | |
| 9/42 | R-b | |
| 10/42 | R-b | |
| 11/42 | R-b | |
| 12/42 | ||
| 13/42 | R-b | |
| 14/42 | R-b | |
| 15/42 | R-b | |
| 16/42 | ||
| 17/42 | ||
| 18/42 | ||
| 19/42 | ||
| 20/42 | ||
| 21/42 | ||
| 22/42 | ||
| 23/42 | ||
| 24/42 | ||
| 25/42 | ||
| 26/42 | ||
| 27/42 | ||
| 28/42 | ||
| 29/42 | ||
| 30/42 | ||
| 31/42 | ||
| 32/42 | ||
| 33/42 | ||
| 34/42 | ||
| 35/42 | ||
| 36/42 | ||
| 37/42 | ||
| 38/42 | ||
| 39/42 | ||
| 40/42 | ||
| 41/42 | ||
| 42/42 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 00/42] Migration test refactoring
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
Signature · 1 line
2.40.1