Skip to content
Snippets Groups Projects
Commit 84b2c7e5 authored by Dr. David Alan Gilbert's avatar Dr. David Alan Gilbert Committed by Thomas Huth
Browse files

tests/migration: Print some debug on bad status


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.

Signed-off-by: default avatarDr. David Alan Gilbert <dgilbert@redhat.com>
Message-Id: <20191108104307.125020-1-dgilbert@redhat.com>
Reviewed-by: default avatarThomas Huth <thuth@redhat.com>
Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
parent 611aa4d0
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment