[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
- [Qemu-devel] [PATCH 0/4] qtest: fix "device_del" out-of-order events, Peter Xu, 2017/09/13
- [Qemu-devel] [PATCH 1/4] libqtest: add qmp_device_del(), Peter Xu, 2017/09/13
- [Qemu-devel] [PATCH 2/4] tests: use qmp_device_del() where proper, Peter Xu, 2017/09/13
- [Qemu-devel] [PATCH 3/4] libqtest: add qmp_device_add(), Peter Xu, 2017/09/13
- Re: [Qemu-devel] [PATCH 3/4] libqtest: add qmp_device_add(),
Thomas Huth <=
- [Qemu-devel] [PATCH 4/4] tests: use qmp_device_add() where proper, Peter Xu, 2017/09/13
- Re: [Qemu-devel] [PATCH 0/4] qtest: fix "device_del" out-of-order events, Thomas Huth, 2017/09/13