qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 05/34] tests/test-qmp-cmds: Factor out qmp_dispatch() test


From: Markus Armbruster
Subject: Re: [PATCH v3 05/34] tests/test-qmp-cmds: Factor out qmp_dispatch() test helpers
Date: Mon, 16 Mar 2020 20:46:57 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

Marc-André Lureau <address@hidden> writes:

> Hi
>
> On Sun, Mar 15, 2020 at 3:48 PM Markus Armbruster <address@hidden> wrote:
>>
>> Checking the value of qmp_dispatch() is repetitive.  Factor out
>> helpers do_qmp_dispatch() and do_qmp_dispatch_error().  Without this,
>> the next commit would make things even more repetitive.
>>
>> Signed-off-by: Markus Armbruster <address@hidden>
>> ---
>>  tests/test-qmp-cmds.c | 72 +++++++++++++++++++++----------------------
>>  1 file changed, 35 insertions(+), 37 deletions(-)
>
> ASAN is unhappy:
>
> =================================================================
> ==1870336==ERROR: LeakSanitizer: detected memory leaks
>
> Indirect leak of 4120 byte(s) in 1 object(s) allocated from:
>     #0 0x7fcdc9b8be56 in __interceptor_calloc (/lib64/libasan.so.5+0x10de56)
>     #1 0x7fcdc998e3b0 in g_malloc0 (/lib64/libglib-2.0.so.0+0x573b0)
>     #2 0x560213f56dbb in test_dispatch_cmd_io
> /home/elmarco/src/qemu/tests/test-qmp-cmds.c:238
>     #3 0x7fcdc99b0a8d  (/lib64/libglib-2.0.so.0+0x79a8d)
[...]

Thanks!

Fixup to be squashed in here, with revert to be squashed into PATCH 07:

diff --git a/tests/test-qmp-cmds.c b/tests/test-qmp-cmds.c
index fb18475c7e..b31064b064 100644
--- a/tests/test-qmp-cmds.c
+++ b/tests/test-qmp-cmds.c
@@ -279,8 +279,6 @@ static void test_dispatch_cmd_io(void)
     g_assert(qnum_get_try_int(ret3, &val));
     g_assert_cmpint(val, ==, 66);
     qobject_unref(ret3);
-
-    qobject_unref(req);
 }
 
 /* test generated dealloc functions for generated types */




reply via email to

[Prev in Thread] Current Thread [Next in Thread]