diff options
author | Dr. David Alan Gilbert <dgilbert@redhat.com> | 2019-11-08 10:43:07 +0000 |
---|---|---|
committer | Thomas Huth <thuth@redhat.com> | 2019-11-11 14:24:46 +0100 |
commit | 84b2c7e59afc37e2146ae5ce3768cb8c439e979d (patch) | |
tree | b57b50f27f0f43cc9e93f2108f836ae9c56fc31a | |
parent | 611aa4d00d5cd1a1b5df964c45116fa571549b68 (diff) |
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: Dr. David Alan Gilbert <dgilbert@redhat.com>
Message-Id: <20191108104307.125020-1-dgilbert@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
-rw-r--r-- | tests/migration-test.c | 9 |
1 files 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); |