qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tests/migration: Print some debug on bad status
@ 2019-11-08 10:43 Dr. David Alan Gilbert (git)
  2019-11-08 11:49 ` Thomas Huth
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Dr. David Alan Gilbert (git) @ 2019-11-08 10:43 UTC (permalink / raw)
  To: qemu-devel, quintela, alex.bennee, thuth

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.

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);
-- 
2.23.0



^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-11-11 10:18 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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é
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).