[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:37:37 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) |
Daniel P. Berrangé <berrange@redhat.com> wrote:
> On Thu, Jun 01, 2023 at 02:31:13PM +0200, Juan Quintela wrote:
>> 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?
>
> For the purpose of the migration test we only need the STOP event
> on the src and the RESUME event on the dst. While I could have made
> it track both STOP and RESUME events on both src & dst, I figured
> it was overkill.
Fair enough.