[{"id":1767749,"web_url":"http://patchwork.ozlabs.org/comment/1767749/","msgid":"<124e3483-9b87-8ffe-0283-3c7e9dc29eb7@redhat.com>","list_archive_url":null,"date":"2017-09-13T10:01:42","subject":"Re: [Qemu-devel] [PATCH 3/4] libqtest: add qmp_device_add()","submitter":{"id":66152,"url":"http://patchwork.ozlabs.org/api/people/66152/","name":"Thomas Huth","email":"thuth@redhat.com"},"content":"On 13.09.2017 11:36, Peter Xu wrote:\n> Since we have qmp_device_del(), pair them up.\n> \n> Signed-off-by: Peter Xu <peterx@redhat.com>\n> ---\n>  tests/libqtest.c | 15 +++++++++++++++\n>  tests/libqtest.h |  9 +++++++++\n>  2 files changed, 24 insertions(+)\n> \n> diff --git a/tests/libqtest.c b/tests/libqtest.c\n> index a34d8c4..c7da962 100644\n> --- a/tests/libqtest.c\n> +++ b/tests/libqtest.c\n> @@ -925,6 +925,21 @@ QDict *qmp(const char *fmt, ...)\n>      return response;\n>  }\n>  \n> +void qmp_device_add(const char *args)\n\nI think it would be nicer to have a function with variable args here, so\nthat the callers do not have to do the g_strdup_printf() dance all over\nthe place. See e.g. my qtest_hot_plug_device() function in my patch\nhere: http://patchwork.ozlabs.org/patch/801487/\n\nIf you fix that, I don't mind if we finally go with my patch or with\nyours... If we decide to go with my patch, it would be nice to get some\nReviewed-bys for it. I think I could then send a PULL request for it,\nsince I've got some other test related patches in my queue and we do not\nhave a real maintainer for the tests directory...\n\n Thomas","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ext-mx02.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx02.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=thuth@redhat.com"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xscfL5ZZ8z9s76\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 13 Sep 2017 20:02:33 +1000 (AEST)","from localhost ([::1]:41306 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1ds4V3-0001vK-O5\n\tfor incoming@patchwork.ozlabs.org; Wed, 13 Sep 2017 06:02:29 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:36105)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <thuth@redhat.com>) id 1ds4UX-0001t5-WB\n\tfor qemu-devel@nongnu.org; Wed, 13 Sep 2017 06:02:03 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <thuth@redhat.com>) id 1ds4UT-0000zK-Up\n\tfor qemu-devel@nongnu.org; Wed, 13 Sep 2017 06:01:58 -0400","from mx1.redhat.com ([209.132.183.28]:58730)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <thuth@redhat.com>) id 1ds4UT-0000yF-Pv\n\tfor qemu-devel@nongnu.org; Wed, 13 Sep 2017 06:01:53 -0400","from smtp.corp.redhat.com\n\t(int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id B3967883AC\n\tfor <qemu-devel@nongnu.org>; Wed, 13 Sep 2017 10:01:52 +0000 (UTC)","from [10.36.116.123] (ovpn-116-123.ams2.redhat.com [10.36.116.123])\n\tby smtp.corp.redhat.com (Postfix) with ESMTPS id F3F4466FE0;\n\tWed, 13 Sep 2017 10:01:43 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com B3967883AC","To":"Peter Xu <peterx@redhat.com>, qemu-devel@nongnu.org","References":"<1505295366-25295-1-git-send-email-peterx@redhat.com>\n\t<1505295366-25295-4-git-send-email-peterx@redhat.com>","From":"Thomas Huth <thuth@redhat.com>","Message-ID":"<124e3483-9b87-8ffe-0283-3c7e9dc29eb7@redhat.com>","Date":"Wed, 13 Sep 2017 12:01:42 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.3.0","MIME-Version":"1.0","In-Reply-To":"<1505295366-25295-4-git-send-email-peterx@redhat.com>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-US","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.15","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.26]);\n\tWed, 13 Sep 2017 10:01:52 +0000 (UTC)","Content-Transfer-Encoding":"quoted-printable","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]","X-Received-From":"209.132.183.28","Subject":"Re: [Qemu-devel] [PATCH 3/4] libqtest: add qmp_device_add()","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"Paolo Bonzini <pbonzini@redhat.com>, Fam Zheng <famz@redhat.com>,\n\tMarkus Armbruster <armbru@redhat.com>, Gerd Hoffmann <kraxel@redhat.com>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}}]