All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: "Dr. David Alan Gilbert (git)" <dgilbert@redhat.com>,
	qemu-devel@nongnu.org, quintela@redhat.com,
	alex.bennee@linaro.org, thuth@redhat.com
Subject: Re: [PATCH] tests/migration: Print some debug on bad status
Date: Fri, 8 Nov 2019 13:01:41 +0100	[thread overview]
Message-ID: <40fc4179-31fa-b421-7a02-7d68b28a91a9@redhat.com> (raw)
In-Reply-To: <20191108104307.125020-1-dgilbert@redhat.com>

On 11/8/19 11:43 AM, Dr. David Alan Gilbert (git) wrote:
> From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
> 
> We're seeing occasional asserts in 'wait_for_migraiton_fail', that
> I can't reliably reproduce, and where the cores don't have any useful
> state.  Print the 'status' out, so we can see which unexpected state
> we're ending up in.

Back to the good remote printf() debugging :)

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>

> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
> ---
>   tests/migration-test.c | 9 +++++++--
>   1 file changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/migration-test.c b/tests/migration-test.c
> index 59f291c654..ac780dffda 100644
> --- a/tests/migration-test.c
> +++ b/tests/migration-test.c
> @@ -899,8 +899,13 @@ static void wait_for_migration_fail(QTestState *from, bool allow_active)
>   
>       do {
>           status = migrate_query_status(from);
> -        g_assert(!strcmp(status, "setup") || !strcmp(status, "failed") ||
> -                 (allow_active && !strcmp(status, "active")));
> +        bool result = !strcmp(status, "setup") || !strcmp(status, "failed") ||
> +                 (allow_active && !strcmp(status, "active"));
> +        if (!result) {
> +            fprintf(stderr, "%s: unexpected status status=%s allow_active=%d\n",
> +                    __func__, status, allow_active);
> +        }
> +        g_assert(result);
>           failed = !strcmp(status, "failed");
>           g_free(status);
>       } while (!failed);
> 


  parent reply	other threads:[~2019-11-08 12:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-08 10:43 [PATCH] tests/migration: Print some debug on bad status Dr. David Alan Gilbert (git)
2019-11-08 11:49 ` Thomas Huth
2019-11-08 12:01 ` Philippe Mathieu-Daudé [this message]
2019-11-08 17:46 ` no-reply
2019-11-08 18:38   ` Dr. David Alan Gilbert
2019-11-11 10:15     ` Jens Freimann
2019-11-08 17:47 ` no-reply

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=40fc4179-31fa-b421-7a02-7d68b28a91a9@redhat.com \
    --to=philmd@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=dgilbert@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.