[Qemu-devel] [PATCH v3 06/13] test-char: unref chardev-udp after test

Anton Nefedov posted 13 patches 8 years, 8 months ago
There is a newer version of this series
[Qemu-devel] [PATCH v3 06/13] test-char: unref chardev-udp after test
Posted by Anton Nefedov 8 years, 8 months ago
this is only not a problem if the test is last in a suite,
otherwise it makes the following main_loop() calls to fail

Signed-off-by: Anton Nefedov <anton.nefedov@virtuozzo.com>
---
 tests/test-char.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/test-char.c b/tests/test-char.c
index f3b377f..d63d3d2 100644
--- a/tests/test-char.c
+++ b/tests/test-char.c
@@ -456,6 +456,8 @@ static void char_udp_test(void)
 
     close(sock);
     g_free(tmp);
+    qemu_chr_fe_deinit(&be);
+    object_unparent(OBJECT(chr));
 }
 
 static void char_file_test(void)
-- 
2.7.4


Re: [Qemu-devel] [PATCH v3 06/13] test-char: unref chardev-udp after test
Posted by Marc-André Lureau 8 years, 8 months ago
On Tue, May 30, 2017 at 6:06 PM Anton Nefedov <anton.nefedov@virtuozzo.com>
wrote:

> this is only not a problem if the test is last in a suite,
> otherwise it makes the following main_loop() calls to fail
>
> Signed-off-by: Anton Nefedov <anton.nefedov@virtuozzo.com>
>

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>

> ---
>  tests/test-char.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/tests/test-char.c b/tests/test-char.c
> index f3b377f..d63d3d2 100644
> --- a/tests/test-char.c
> +++ b/tests/test-char.c
> @@ -456,6 +456,8 @@ static void char_udp_test(void)
>
>      close(sock);
>      g_free(tmp);
> +    qemu_chr_fe_deinit(&be);
> +    object_unparent(OBJECT(chr));
>  }
>
>  static void char_file_test(void)
> --
> 2.7.4
>
>
> --
Marc-André Lureau