qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 3/4] libqtest: add qmp_device_add()


From: Thomas Huth
Subject: Re: [Qemu-devel] [PATCH 3/4] libqtest: add qmp_device_add()
Date: Wed, 13 Sep 2017 12:01:42 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0

On 13.09.2017 11:36, Peter Xu wrote:
> Since we have qmp_device_del(), pair them up.
> 
> Signed-off-by: Peter Xu <address@hidden>
> ---
>  tests/libqtest.c | 15 +++++++++++++++
>  tests/libqtest.h |  9 +++++++++
>  2 files changed, 24 insertions(+)
> 
> diff --git a/tests/libqtest.c b/tests/libqtest.c
> index a34d8c4..c7da962 100644
> --- a/tests/libqtest.c
> +++ b/tests/libqtest.c
> @@ -925,6 +925,21 @@ QDict *qmp(const char *fmt, ...)
>      return response;
>  }
>  
> +void qmp_device_add(const char *args)

I think it would be nicer to have a function with variable args here, so
that the callers do not have to do the g_strdup_printf() dance all over
the place. See e.g. my qtest_hot_plug_device() function in my patch
here: http://patchwork.ozlabs.org/patch/801487/

If you fix that, I don't mind if we finally go with my patch or with
yours... If we decide to go with my patch, it would be nice to get some
Reviewed-bys for it. I think I could then send a PULL request for it,
since I've got some other test related patches in my queue and we do not
have a real maintainer for the tests directory...

 Thomas



reply via email to

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