From: Fabiano Rosas <farosas@suse.de>
To: Peter Xu <peterx@redhat.com>
Cc: qemu-devel@nongnu.org, "Peter Maydell" <peter.maydell@linaro.org>,
"Daniel P . Berrangé" <berrange@redhat.com>,
"Alex Bennée" <alex.bennee@linaro.org>,
"Laurent Vivier" <lvivier@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>
Subject: Re: [PATCH v2 19/22] tests/qtest/migration: Add migration-test-smoke
Date: Wed, 18 Dec 2024 15:13:08 -0300 [thread overview]
Message-ID: <87h670vozv.fsf@suse.de> (raw)
In-Reply-To: <Z2MKesakYn3fn2ue@x1n>
Peter Xu <peterx@redhat.com> writes:
> On Wed, Nov 13, 2024 at 04:46:27PM -0300, Fabiano Rosas wrote:
>> diff --git a/tests/qtest/migration-test-smoke.c b/tests/qtest/migration-test-smoke.c
>> new file mode 100644
>> index 0000000000..ff2d72881f
>> --- /dev/null
>> +++ b/tests/qtest/migration-test-smoke.c
>> @@ -0,0 +1,39 @@
>> +/* SPDX-License-Identifier: GPL-2.0-or-later */
>> +
>> +#include "qemu/osdep.h"
>> +#include "libqtest.h"
>> +#include "migration/test-framework.h"
>> +#include "qemu/module.h"
>> +
>> +int main(int argc, char **argv)
>> +{
>> + MigrationTestEnv *env;
>> + int ret;
>> +
>> + g_test_init(&argc, &argv, NULL);
>> + env = migration_get_env();
>> + module_call_init(MODULE_INIT_QOM);
>> +
>> + if (env->has_kvm) {
>> + g_test_message(
>> + "Smoke tests already run as part of the full suite on KVM hosts");
>> + goto out;
>> + }
>
> So the "smoke" here is almost "tcg".. and if i want to run a smoke test on
> a kvm-enabled host, it's noop.. which isn't easy to understand why.
>
> If to rethink our goal, we have two requirements:
>
> (1) We want to categorize migration tests, so some are quick, some are
> slow, some might be flacky. Maybe more, but it's about putting one
> test into only one bucket, and there're >1 buckets.
It's true that the smoke test should never have slow or flaky tests, but
we can't use this categorization for anything else. IOW, what you
describe here is not a goal. If a test is found to be slow we put it
under slow and it will only run with -m slow/thorough, that's it. We can
just ignore this.
>
> (2) We want to run only a small portion of tests on tcg, more tests on
> kvm.
Yes. Guests are fast with KVM and slow with TCG (generally) and the KVM
hosts are the ones where it's actually important to ensure all migration
features work OK. Non-KVM will only care about save/restore of
snapshots. Therefore we don't need to have all tests running with TCG,
only the smoke set.
And "smoke set" is arbitrary, not tied to speed, but of course no slow
tests please (which already happens because we don't pass -m slow to
migration-test-smoke).
>
> Ideally, we don't need two separate main test files, do we?
>
> I mean, we can do (1) with the existing migration-test.c, with the help of
> either gtest's "-m" or something we invent. The only unfortunate part is
> qtest only have quick/slow, afaiu the "thorough" mode is the same as
> "slow".. while we don't yet have real "perf" tests. It means we only have
> two buckets if we want to reuse gtest's "-m".
>
> Maybe it's enough? If not, we can implement >2 categories in whatever
> form, either custom argv/argc cmdline, or env variable.
>
> Then, if we always categorize one test (let me try to not reuse glib's
> terms to be clear) into any of: FAST|NORMAL|SLOW|..., then we have a single
It's either normal or slow. Because we only know a test is only after it
bothers us.
> migration-test that have different level of tests. We can invoke
> "migration-test --mode FAST" if kvm is not supported, and invoke the same
> "migration-test --mode SLOW" if kvm is supported.
This is messy due to how qtest/meson.build works. Having two tests is
the clean change. Otherwise we'll have to add "if migration-test" or
create artificial test names to be able to restrict the arguments that
are passed to the test per arch.
I also *think* we cannot have anything extra in argv because gtester
expects to be able to parse those.
>
> Would this be nicer? At least we can still run a pretty fast smoke / FAST
> test even on kvm. Basically, untangle accel v.s. "test category".
We could just remove the restriction from migration-test-smoke if that's
an issue.
next prev parent reply other threads:[~2024-12-18 18:17 UTC|newest]
Thread overview: 55+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-13 19:46 [PATCH v2 00/22] tests/qtest: migration-test refactoring Fabiano Rosas
2024-11-13 19:46 ` [PATCH v2 01/22] tests/qtest/migration: Fix indentations Fabiano Rosas
2024-11-13 19:46 ` [PATCH v2 02/22] tests/qtest/migration: Standardize hook names Fabiano Rosas
2024-11-25 20:51 ` Peter Xu
2024-11-25 21:03 ` Fabiano Rosas
2024-11-13 19:46 ` [PATCH v2 03/22] tests/qtest/migration: Stop calling everything "test" Fabiano Rosas
2024-11-25 20:47 ` Peter Xu
2024-11-13 19:46 ` [PATCH v2 04/22] tests/migration: Disambiguate guestperf vs. a-b Fabiano Rosas
2024-11-21 21:05 ` Peter Xu
2024-11-13 19:46 ` [PATCH v2 05/22] tests/qtest/migration: Move bootfile code to its own file Fabiano Rosas
2024-11-13 19:46 ` [PATCH v2 06/22] tests/qtest/migration: Move qmp helpers to a separate file Fabiano Rosas
2024-11-21 23:00 ` Peter Xu
2024-11-13 19:46 ` [PATCH v2 07/22] tests/qtest/migration: Rename migration-helpers.c Fabiano Rosas
2024-11-21 23:04 ` Peter Xu
2024-11-13 19:46 ` [PATCH v2 08/22] tests/qtest/migration: Move ufd_version_check to utils Fabiano Rosas
2024-11-25 17:17 ` Peter Xu
2024-11-13 19:46 ` [PATCH v2 09/22] tests/qtest/migration: Move kvm_dirty_ring_supported " Fabiano Rosas
2024-11-25 17:18 ` Peter Xu
2024-11-13 19:46 ` [PATCH v2 10/22] tests/qtest/migration: Isolate test initialization Fabiano Rosas
2024-11-25 17:29 ` Peter Xu
2024-11-13 19:46 ` [PATCH v2 11/22] tests/qtest/migration: Move common test code Fabiano Rosas
2024-11-25 17:31 ` Peter Xu
2024-11-13 19:46 ` [PATCH v2 12/22] tests/qtest/migration: Split TLS tests from migration-test.c Fabiano Rosas
2024-11-25 17:48 ` Peter Xu
2024-11-13 19:46 ` [PATCH v2 13/22] tests/qtest/migration: Split compression " Fabiano Rosas
2024-11-25 17:50 ` Peter Xu
2024-11-13 19:46 ` [PATCH v2 14/22] tests/qtest/migration: Split postcopy tests Fabiano Rosas
2024-11-25 17:51 ` Peter Xu
2024-11-13 19:46 ` [PATCH v2 15/22] tests/qtest/migration: Split file tests Fabiano Rosas
2024-11-25 17:52 ` Peter Xu
2024-11-13 19:46 ` [PATCH v2 16/22] tests/qtest/migration: Split precopy tests Fabiano Rosas
2024-11-25 17:53 ` Peter Xu
2024-11-13 19:46 ` [PATCH v2 17/22] tests/qtest/migration: Split CPR tests Fabiano Rosas
2024-11-25 17:54 ` Peter Xu
2024-11-13 19:46 ` [PATCH v2 18/22] tests/qtest/migration: Split validation tests + misc Fabiano Rosas
2024-11-25 17:55 ` Peter Xu
2024-11-13 19:46 ` [PATCH v2 19/22] tests/qtest/migration: Add migration-test-smoke Fabiano Rosas
2024-12-18 17:46 ` Peter Xu
2024-12-18 18:13 ` Fabiano Rosas [this message]
2024-12-18 20:22 ` Peter Xu
2024-12-18 21:08 ` Fabiano Rosas
2024-12-18 22:04 ` Peter Xu
2024-12-19 15:38 ` Fabiano Rosas
2024-12-19 17:42 ` Peter Xu
2024-12-19 19:31 ` Fabiano Rosas
2024-12-20 15:18 ` Peter Xu
2024-12-20 15:34 ` Daniel P. Berrangé
2024-12-20 16:06 ` Peter Xu
2024-12-20 16:39 ` Fabiano Rosas
2024-11-13 19:46 ` [PATCH v2 20/22] tests/qtest/migration: Pick smoke tests Fabiano Rosas
2024-11-13 19:46 ` [PATCH v2 21/22] tests/qtest: Add support for check-qtest-<subsystem> Fabiano Rosas
2024-11-13 19:46 ` [PATCH v2 22/22] docs: Add migration tests documentation Fabiano Rosas
2024-11-25 20:58 ` [PATCH v2 00/22] tests/qtest: migration-test refactoring Peter Xu
2024-11-25 21:18 ` Fabiano Rosas
2024-11-25 21:23 ` Peter Xu
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=87h670vozv.fsf@suse.de \
--to=farosas@suse.de \
--cc=alex.bennee@linaro.org \
--cc=berrange@redhat.com \
--cc=lvivier@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=peterx@redhat.com \
--cc=qemu-devel@nongnu.org \
/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).