Daniel P. Berrangé <[email protected]> wrote:
> Change the migration test to use the new qtest event callback to watch
> for the stop event. This ensures that we only watch for the STOP event
> on the source QEMU. The previous code would set the single 'got_stop'
> flag when either source or dest QEMU got the STOP event.
>
> Signed-off-by: Daniel P. Berrangé <[email protected]>

Reviewed-by: Juan Quintela <[email protected]>

If you agreed with my proposed change to patch 1

> -bool got_stop;
> -
> -static void check_stop_event(QTestState *who)
> +bool migrate_watch_for_stop(QTestState *who, const char *name,
> +                            QDict *event, void *opaque)
>  {
> -    QDict *event = qtest_qmp_event_ref(who, "STOP");
> -    if (event) {
> -        got_stop = true;
> -        qobject_unref(event);
> +    bool *seen = opaque;
> +
> +    if (g_str_equal(name, "STOP")) {
> +        *seen = true;

You should
           return true;

here.

Later, Juan.


Reply via email to