[Qemu-devel] [PATCH] fixup! vhost-user-test: create a main loop per TestServer

Paolo Bonzini posted 1 patch 6 years, 8 months ago
Failed in applying to current master (apply log)
tests/vhost-user-test.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[Qemu-devel] [PATCH] fixup! vhost-user-test: create a main loop per TestServer
Posted by Paolo Bonzini 6 years, 8 months ago
Fix a hang that is only latent until qgraph is merged.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 tests/vhost-user-test.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/vhost-user-test.c b/tests/vhost-user-test.c
index 33030e0..527d3b3 100644
--- a/tests/vhost-user-test.c
+++ b/tests/vhost-user-test.c
@@ -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);
 }
 
-- 
1.8.3.1


Re: [Qemu-devel] [PATCH] fixup! vhost-user-test: create a main loop per TestServer
Posted by Michael S. Tsirkin 6 years, 8 months ago
On Wed, Feb 20, 2019 at 04:47:01PM +0100, Paolo Bonzini wrote:
> Fix a hang that is only latent until qgraph is merged.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

I squashed this in, thanks!

> ---
>  tests/vhost-user-test.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/vhost-user-test.c b/tests/vhost-user-test.c
> index 33030e0..527d3b3 100644
> --- a/tests/vhost-user-test.c
> +++ b/tests/vhost-user-test.c
> @@ -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);
>  }
>  
> -- 
> 1.8.3.1