On Wed, Nov 13, 2024 at 04:46:19PM -0300, Fabiano Rosas wrote:
> The migration tests have a set of core infrastructure routines. These
> are functions that are called by (almost) all tests and centralize the
> common operations of: starting migration on both sides, waiting for
> guests to boot, performing guest initialization and teardown, guest
> memory validation, etc.
> 
> Move this basic framework code (and a few static helpers) into a
> separate file. Leave only individual test functions (and their own
> static helpers) in migration-test.c.
> 
> Signed-off-by: Fabiano Rosas <faro...@suse.de>
> ---
>  tests/qtest/meson.build                |    1 +
>  tests/qtest/migration-test.c           | 1140 +-----------------------
>  tests/qtest/migration/bootfile.c       |    2 +-
>  tests/qtest/migration/bootfile.h       |    2 +-
>  tests/qtest/migration/test-framework.c |  969 ++++++++++++++++++++
>  tests/qtest/migration/test-framework.h |  216 +++++
>  6 files changed, 1201 insertions(+), 1129 deletions(-)
>  create mode 100644 tests/qtest/migration/test-framework.c
>  create mode 100644 tests/qtest/migration/test-framework.h
> 
> diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build
> index b9f70ac32f..bdb9512510 100644
> --- a/tests/qtest/meson.build
> +++ b/tests/qtest/meson.build
> @@ -332,6 +332,7 @@ tpmemu_files = ['tpm-emu.c', 'tpm-util.c', 'tpm-tests.c']
>  
>  migration_files = [files(
>    'migration/bootfile.c',
> +  'migration/test-framework.c',

Nit: considering your previous ways of renaming things (where you tend to
drop "test" prefixes all over the places), maybe framework.c suites more.

Acked-by: Peter Xu <pet...@redhat.com>

-- 
Peter Xu


Reply via email to