From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Fabiano Rosas <farosas@suse.de>
Cc: qemu-devel@nongnu.org, "Peter Xu" <peterx@redhat.com>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Alex Bennée" <alex.bennee@linaro.org>,
"Thomas Huth" <thuth@redhat.com>,
"Laurent Vivier" <lvivier@redhat.com>
Subject: Re: [PATCH 1/4] tests/qtest: Add check-migration
Date: Thu, 17 Oct 2024 16:09:16 +0100 [thread overview]
Message-ID: <ZxEonPy5m1DjQ3CM@redhat.com> (raw)
In-Reply-To: <20241017143211.17771-2-farosas@suse.de>
On Thu, Oct 17, 2024 at 11:32:08AM -0300, Fabiano Rosas wrote:
> Add two new targets, check-migration and check-migration-quick to
> allow dividing migration tests into a quick set and a slow set. With
> this it'll be possible to reduce the amount of migration tests that
> run by default as part of 'make check'.
>
> Keep under the 'migration-quick' suite only a few tests to serve as
> sanity check for every build and move the rest under the 'migration'
> suite.
I don't think we should need to have separate make targets
for each speed. I would expect users to be able to run
$ make check SPEED=thorough
$ make check-qtest SPEED=thorough
which is how we document doing this for functional tests.
If we want a way to let users more easily run individual
(or a subset of) qtest suites, how about we allow for
some filtering along the lines of:
$ make check-qtest QTESTS=migration-test
as adding top level make-check-<blah> targets for each
different subset maintainers might want isn't scalable.
>
> Signed-off-by: Fabiano Rosas <farosas@suse.de>
> ---
> meson.build | 6 +++---
> tests/Makefile.include | 2 ++
> tests/qtest/meson.build | 47 +++++++++++++++++++++++++++++++++--------
> 3 files changed, 43 insertions(+), 12 deletions(-)
>
> diff --git a/meson.build b/meson.build
> index 4ea1984fc5..92d38691f9 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -3,9 +3,9 @@ project('qemu', ['c'], meson_version: '>=1.1.0',
> 'b_staticpic=false', 'stdsplit=false', 'optimization=2', 'b_pie=true'],
> version: files('VERSION'))
>
> -add_test_setup('quick', exclude_suites: ['slow', 'thorough'], is_default: true)
> -add_test_setup('slow', exclude_suites: ['thorough'], env: ['G_TEST_SLOW=1', 'SPEED=slow'])
> -add_test_setup('thorough', env: ['G_TEST_SLOW=1', 'SPEED=thorough'])
> +add_test_setup('quick', exclude_suites: ['slow', 'thorough', 'migration'], is_default: true)
> +add_test_setup('slow', exclude_suites: ['thorough', 'migration-quick'], env: ['G_TEST_SLOW=1', 'SPEED=slow'])
> +add_test_setup('thorough', exclude_suites: ['migration-quick'], env: ['G_TEST_SLOW=1', 'SPEED=thorough'])
>
> meson.add_postconf_script(find_program('scripts/symlink-install-tree.py'))
>
> diff --git a/tests/Makefile.include b/tests/Makefile.include
> index 010369bd3a..79c1350bfb 100644
> --- a/tests/Makefile.include
> +++ b/tests/Makefile.include
> @@ -11,6 +11,8 @@ check-help:
> @echo " $(MAKE) check-qtest Run qtest tests"
> @echo " $(MAKE) check-functional Run python-based functional tests"
> @echo " $(MAKE) check-functional-TARGET Run functional tests for a given target"
> + @echo " $(MAKE) check-migration-quick Run a small set of migration tests"
> + @echo " $(MAKE) check-migration Run all migration tests"
> @echo " $(MAKE) check-unit Run qobject tests"
> @echo " $(MAKE) check-qapi-schema Run QAPI schema tests"
> @echo " $(MAKE) check-block Run block tests"
> diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build
> index b207e38696..27a802474a 100644
> --- a/tests/qtest/meson.build
> +++ b/tests/qtest/meson.build
> @@ -406,14 +406,43 @@ foreach dir : target_dirs
> test: executable(test, src, dependencies: deps)
> }
> endif
> - test('qtest-@0@/@1@'.format(target_base, test),
> - qtest_executables[test],
> - depends: [test_deps, qtest_emulator, emulator_modules],
> - env: qtest_env,
> - args: ['--tap', '-k'],
> - protocol: 'tap',
> - timeout: slow_qtests.get(test, 60),
> - priority: slow_qtests.get(test, 60),
> - suite: ['qtest', 'qtest-' + target_base])
> +
> + # The migration-test test runs several slow sub-tests. Add it to
> + # two separate targets, one for executing a few tests
> + # (migration-quick) and another for executing the full set
> + # (migration). This is done to reduce the amount of tests that run
> + # via make check.
> + if test == 'migration-test'
> + foreach opts : [
> + {
> + 'test-args': ['--tap', '-k', '-m', 'slow'],
> + 'test-suite': ['migration']
> + },
> + {
> + 'test-args': ['--tap', '-k', '-m', 'quick'],
> + 'test-suite': ['migration-quick']
> + }]
> +
> + test(target_base,
> + qtest_executables[test],
> + depends: [test_deps, qtest_emulator, emulator_modules],
> + env: qtest_env,
> + args: opts['test-args'],
> + protocol: 'tap',
> + timeout: slow_qtests.get(test, 60),
> + priority: slow_qtests.get(test, 60),
> + suite: opts['test-suite'])
> + endforeach
> + else
> + test('qtest-@0@/@1@'.format(target_base, test),
> + qtest_executables[test],
> + depends: [test_deps, qtest_emulator, emulator_modules],
> + env: qtest_env,
> + args: ['--tap', '-k'],
> + protocol: 'tap',
> + timeout: slow_qtests.get(test, 60),
> + priority: slow_qtests.get(test, 60),
> + suite: ['qtest', 'qtest-' + target_base])
> + endif
> endforeach
> endforeach
> --
> 2.35.3
>
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
next prev parent reply other threads:[~2024-10-17 15:10 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-17 14:32 [PATCH 0/4] tests/qtest: Move the bulk of migration tests into a separate target Fabiano Rosas
2024-10-17 14:32 ` [PATCH 1/4] tests/qtest: Add check-migration Fabiano Rosas
2024-10-17 15:09 ` Daniel P. Berrangé [this message]
2024-10-17 14:32 ` [PATCH 2/4] docs: Add migration tests documentation Fabiano Rosas
2024-10-17 14:32 ` [PATCH 3/4] tests/qtest/migration: Move tests into g_test_slow() Fabiano Rosas
2024-10-17 14:32 ` [PATCH 4/4] ci: Add check-migration-quick to the clang job Fabiano Rosas
2024-10-17 14:57 ` Daniel P. Berrangé
2024-10-17 16:29 ` Fabiano Rosas
2024-10-18 9:01 ` Daniel P. Berrangé
2024-10-18 9:46 ` Peter Maydell
2024-10-18 10:00 ` Daniel P. Berrangé
2024-10-18 10:09 ` Peter Maydell
2024-10-18 10:38 ` Alex Bennée
2024-10-18 13:51 ` Fabiano Rosas
2024-10-18 13:54 ` Daniel P. Berrangé
2024-10-18 14:28 ` Fabiano Rosas
2024-10-18 14:33 ` Daniel P. Berrangé
2024-10-18 13:51 ` Fabiano Rosas
2024-10-18 14:21 ` Daniel P. Berrangé
2024-10-18 14:47 ` Fabiano Rosas
2024-10-18 15:25 ` Peter Maydell
2024-10-18 16:12 ` Daniel P. Berrangé
2024-10-21 14:55 ` Daniel P. Berrangé
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZxEonPy5m1DjQ3CM@redhat.com \
--to=berrange@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=farosas@suse.de \
--cc=lvivier@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=peterx@redhat.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).