Skip to contentSkip to conversation

fixup! vhost-user-test: create a main loop per TestServer

PATCH In review Paolo Bonzini 2 participants 2 messages Feb 20, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fixup! vhost-user-test: create a main loop per TestServer

Fix a hang that is only latent until qgraph is merged.

---
 tests/vhost-user-test.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tests/vhost-user-test.c +2 -2
index 33030e0..527d3b3 100644
@@ -557,8 +557,6 @@ static void test_server_free(TestServer *server)
     while (g_main_context_pending(NULL)) {
         g_main_context_iteration(NULL, TRUE);
     }
-    g_main_loop_unref(server->loop);
-    g_main_context_unref(server->context);
 
     qemu_chr_fe_deinit(&server->chr, true);
 
@@ -580,6 +578,8 @@ static void test_server_free(TestServer *server)
     g_assert(server->bus);
     qpci_free_pc(server->bus);
 
+    g_main_loop_unref(server->loop);
+    g_main_context_unref(server->context);
     g_free(server);
 }
 
Signature · 1 line
1.8.3.1
#1 lore raw
Quoted 3 lines · Paolo Bonzini

Fix a hang that is only latent until qgraph is merged.

I squashed this in, thanks!

Quoted 28 lines
---
 tests/vhost-user-test.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tests/vhost-user-test.c +2 -2
index 33030e0..527d3b3 100644
@@ -557,8 +557,6 @@ static void test_server_free(TestServer *server)
     while (g_main_context_pending(NULL)) {
         g_main_context_iteration(NULL, TRUE);
     }
-    g_main_loop_unref(server->loop);
-    g_main_context_unref(server->context);
 
     qemu_chr_fe_deinit(&server->chr, true);
 
@@ -580,6 +578,8 @@ static void test_server_free(TestServer *server)
     g_assert(server->bus);
     qpci_free_pc(server->bus);
 
+    g_main_loop_unref(server->loop);
+    g_main_context_unref(server->context);
     g_free(server);
 }
 
Signature · 1 line
1.8.3.1