[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 7/9] tests/qtest: capture RESUME events during migration
From: |
Juan Quintela |
Subject: |
Re: [PATCH v3 7/9] tests/qtest: capture RESUME events during migration |
Date: |
Thu, 01 Jun 2023 14:31:13 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) |
Daniel P. Berrangé <berrange@redhat.com> wrote:
> When running migration tests we monitor for a STOP event so we can skip
> redundant waits. This will be needed for the RESUME event too shortly.
>
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
> tests/qtest/migration-helpers.c | 12 ++++++++++++
> tests/qtest/migration-helpers.h | 2 ++
> tests/qtest/migration-test.c | 5 +++++
> 3 files changed, 19 insertions(+)
>
> diff --git a/tests/qtest/migration-helpers.c b/tests/qtest/migration-helpers.c
> index 884d8a2e07..d50b565967 100644
> --- a/tests/qtest/migration-helpers.c
> +++ b/tests/qtest/migration-helpers.c
> @@ -35,6 +35,18 @@ bool migrate_watch_for_stop(QTestState *who, const char
> *name,
> return false;
> }
>
> +bool migrate_watch_for_resume(QTestState *who, const char *name,
> + QDict *event, void *opaque)
> +{
> + bool *seen = opaque;
> +
> + if (g_str_equal(name, "RESUME")) {
> + *seen = true;
> + }
> +
> + return false;
> +}
> +
I think I am not understanding this.
Can we wait for both RESUME and STOP events?
Or do you want an implementation that can only look for one event?
Later, Juan.