From nobody Mon Apr 29 18:39:47 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1500586924419294.1967305381065; Thu, 20 Jul 2017 14:42:04 -0700 (PDT) Received: from localhost ([::1]:40090 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dYJCt-0007Af-5x for importer@patchew.org; Thu, 20 Jul 2017 17:42:03 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56958) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dYJB9-00062X-1e for qemu-devel@nongnu.org; Thu, 20 Jul 2017 17:40:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dYJB8-0000aa-02 for qemu-devel@nongnu.org; Thu, 20 Jul 2017 17:40:15 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45594) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dYJB7-0000aK-Mo for qemu-devel@nongnu.org; Thu, 20 Jul 2017 17:40:13 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 92FB361BB4; Thu, 20 Jul 2017 21:40:12 +0000 (UTC) Received: from red.redhat.com (ovpn-120-37.rdu2.redhat.com [10.10.120.37]) by smtp.corp.redhat.com (Postfix) with ESMTP id EE2007C1EE; Thu, 20 Jul 2017 21:40:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 92FB361BB4 Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=eblake@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 92FB361BB4 From: Eric Blake To: qemu-devel@nongnu.org Date: Thu, 20 Jul 2017 16:40:05 -0500 Message-Id: <20170720214008.28494-2-eblake@redhat.com> In-Reply-To: <20170720214008.28494-1-eblake@redhat.com> References: <20170720214008.28494-1-eblake@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Thu, 20 Jul 2017 21:40:12 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v2 1/4] tests: Enhance qobject output to cover partial visit X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: armbru@redhat.com, Michael Roth Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Add a test that proves (at least when run under valgrind) that we are correctly handling allocated memory even when a visit is aborted in the middle for whatever other reason. See commit f24582d "qapi: fix double free in qmp_output_visitor_cleanup()" for a fix that was lacking testsuite exposure prior to this patch. Signed-off-by: Eric Blake --- v2: tweak partial alternate visit --- tests/test-qobject-output-visitor.c | 42 +++++++++++++++++++++++++++++++++= +++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/tests/test-qobject-output-visitor.c b/tests/test-qobject-outpu= t-visitor.c index 749c54065f..ce2fb8f368 100644 --- a/tests/test-qobject-output-visitor.c +++ b/tests/test-qobject-output-visitor.c @@ -1,7 +1,7 @@ /* * QObject Output Visitor unit-tests. * - * Copyright (C) 2011-2016 Red Hat Inc. + * Copyright (C) 2011-2017 Red Hat Inc. * * Authors: * Luiz Capitulino @@ -251,6 +251,44 @@ static void test_visitor_out_struct_errors(TestOutputV= isitorData *data, } +static void test_visitor_out_partial_visit(TestOutputVisitorData *data, + const void *unused) +{ + /* Various checks that a mid-visit abort doesn't leak or double-free. = */ + const char *str =3D "hi"; + Error *err =3D NULL; + UserDefAlternate uda =3D { + .type =3D QTYPE_QDICT, + .u.udfu =3D { .integer =3D 1, + .string =3D (char *) "bye", + .enum1 =3D -1 } /* intentionally bad */ + }; + UserDefAlternate *obj =3D &uda; + + /* Abort within a nested object with no data members */ + visit_start_struct(data->ov, NULL, NULL, 0, &error_abort); + visit_start_struct(data->ov, "nested", NULL, 0, &error_abort); + visitor_reset(data); + + /* Abort in the middle of a list of strings */ + visit_start_list(data->ov, "list", NULL, 0, &error_abort); + visit_type_str(data->ov, NULL, (char **)&str, &error_abort); + visit_type_str(data->ov, NULL, (char **)&str, &error_abort); + visitor_reset(data); + + /* + * Abort in the middle of an alternate, due to bad "enum1" + * discriminator value. Since alternates don't support virtual + * visits, we perform a real one, relying on our knowledge that + * visit_type_UserDefAlternate() calls visit_start_alternate() + * under the hood. + */ + visit_type_UserDefAlternate(data->ov, NULL, &obj, &err); + error_free_or_abort(&err); + visitor_reset(data); +} + + static void test_visitor_out_list(TestOutputVisitorData *data, const void *unused) { @@ -815,6 +853,8 @@ int main(int argc, char **argv) &out_visitor_data, test_visitor_out_struct_nes= ted); output_visitor_test_add("/visitor/output/struct-errors", &out_visitor_data, test_visitor_out_struct_err= ors); + output_visitor_test_add("/visitor/output/partial-visit", + &out_visitor_data, test_visitor_out_partial_vi= sit); output_visitor_test_add("/visitor/output/list", &out_visitor_data, test_visitor_out_list); output_visitor_test_add("/visitor/output/any", --=20 2.13.3 From nobody Mon Apr 29 18:39:47 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 150058692489637.02228886066314; Thu, 20 Jul 2017 14:42:04 -0700 (PDT) Received: from localhost ([::1]:40091 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dYJCt-0007As-J1 for importer@patchew.org; Thu, 20 Jul 2017 17:42:03 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56962) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dYJB9-00062c-D0 for qemu-devel@nongnu.org; Thu, 20 Jul 2017 17:40:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dYJB8-0000az-MK for qemu-devel@nongnu.org; Thu, 20 Jul 2017 17:40:15 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50676) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dYJB8-0000aV-GT for qemu-devel@nongnu.org; Thu, 20 Jul 2017 17:40:14 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7B42765739; Thu, 20 Jul 2017 21:40:13 +0000 (UTC) Received: from red.redhat.com (ovpn-120-37.rdu2.redhat.com [10.10.120.37]) by smtp.corp.redhat.com (Postfix) with ESMTP id C2F9E7C1F9; Thu, 20 Jul 2017 21:40:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 7B42765739 Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=eblake@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 7B42765739 From: Eric Blake To: qemu-devel@nongnu.org Date: Thu, 20 Jul 2017 16:40:06 -0500 Message-Id: <20170720214008.28494-3-eblake@redhat.com> In-Reply-To: <20170720214008.28494-1-eblake@redhat.com> References: <20170720214008.28494-1-eblake@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Thu, 20 Jul 2017 21:40:13 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v2 2/4] qapi: Visitor documentation tweak X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: armbru@redhat.com, Michael Roth Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Make it clear that the name parameter to visit_start_struct() has the same semantics as for visit_start_int(). Signed-off-by: Eric Blake Reviewed-by: Markus Armbruster --- v2: tweak wording to avoid overloaded 'OBJ' --- include/qapi/visitor.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/include/qapi/visitor.h b/include/qapi/visitor.h index 74768aabda..8243fa271f 100644 --- a/include/qapi/visitor.h +++ b/include/qapi/visitor.h @@ -60,13 +60,13 @@ * visitors are declared here; the remaining visitors are generated in * qapi-visit.h. * - * The @name parameter of visit_type_FOO() describes the relation - * between this QAPI value and its parent container. When visiting - * the root of a tree, @name is ignored; when visiting a member of an - * object, @name is the key associated with the value; when visiting a - * member of a list, @name is NULL; and when visiting the member of an - * alternate, @name should equal the name used for visiting the - * alternate. + * The @name parameter of visit_type_FOO() and visit_start_BAR() + * describes the relation between this QAPI value and its parent + * container. When visiting the root of a tree, @name is ignored; + * when visiting a member of an object, @name is the key associated + * with the value; when visiting a member of a list, @name is NULL; + * and when visiting the member of an alternate, @name should equal + * the name used for visiting the alternate. * * The visit_type_FOO() functions expect a non-null @obj argument; * they allocate *@obj during input visits, leave it unchanged on --=20 2.13.3 From nobody Mon Apr 29 18:39:47 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1500586923250640.0738090660914; Thu, 20 Jul 2017 14:42:03 -0700 (PDT) Received: from localhost ([::1]:40089 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dYJCr-000791-Qk for importer@patchew.org; Thu, 20 Jul 2017 17:42:01 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56977) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dYJBA-00062k-6h for qemu-devel@nongnu.org; Thu, 20 Jul 2017 17:40:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dYJB9-0000bQ-En for qemu-devel@nongnu.org; Thu, 20 Jul 2017 17:40:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56184) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dYJB9-0000av-8I for qemu-devel@nongnu.org; Thu, 20 Jul 2017 17:40:15 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 36E3112B6 for ; Thu, 20 Jul 2017 21:40:14 +0000 (UTC) Received: from red.redhat.com (ovpn-120-37.rdu2.redhat.com [10.10.120.37]) by smtp.corp.redhat.com (Postfix) with ESMTP id B367A7C1EE; Thu, 20 Jul 2017 21:40:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 36E3112B6 Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=eblake@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 36E3112B6 From: Eric Blake To: qemu-devel@nongnu.org Date: Thu, 20 Jul 2017 16:40:07 -0500 Message-Id: <20170720214008.28494-4-eblake@redhat.com> In-Reply-To: <20170720214008.28494-1-eblake@redhat.com> References: <20170720214008.28494-1-eblake@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Thu, 20 Jul 2017 21:40:14 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v2 3/4] qtest: Avoid passing raw strings through hmp() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: armbru@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" The next patch will add __attribute__((__format__)) to hmp(), which in turn causes gcc to warn about non-literal format strings. Rather than risk an arbitrary string containing % being mis-handled, always pass variable strings along with a %s format. It also makes it easier to prove correctness locally, rather than auditing all the source strings. Signed-off-by: Eric Blake Reviewed-by: Markus Armbruster --- tests/test-hmp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test-hmp.c b/tests/test-hmp.c index d77b3c8710..0af066487c 100644 --- a/tests/test-hmp.c +++ b/tests/test-hmp.c @@ -80,7 +80,7 @@ static void test_commands(void) if (verbose) { fprintf(stderr, "\t%s\n", hmp_cmds[i]); } - response =3D hmp(hmp_cmds[i]); + response =3D hmp("%s", hmp_cmds[i]); g_free(response); } @@ -103,7 +103,7 @@ static void test_info_commands(void) if (verbose) { fprintf(stderr, "\t%s\n", info); } - resp =3D hmp(info); + resp =3D hmp("%s", info); g_free(resp); /* And move forward to the next line */ info =3D strchr(endp + 1, '\n'); --=20 2.13.3 From nobody Mon Apr 29 18:39:47 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1500587054086515.0663439338103; Thu, 20 Jul 2017 14:44:14 -0700 (PDT) Received: from localhost ([::1]:40100 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dYJEy-0000m0-PA for importer@patchew.org; Thu, 20 Jul 2017 17:44:12 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56988) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dYJBB-000647-IX for qemu-devel@nongnu.org; Thu, 20 Jul 2017 17:40:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dYJBA-0000cN-9d for qemu-devel@nongnu.org; Thu, 20 Jul 2017 17:40:17 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45642) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dYJBA-0000bM-0t for qemu-devel@nongnu.org; Thu, 20 Jul 2017 17:40:16 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id F1458624DF for ; Thu, 20 Jul 2017 21:40:14 +0000 (UTC) Received: from red.redhat.com (ovpn-120-37.rdu2.redhat.com [10.10.120.37]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6C9827C1EE; Thu, 20 Jul 2017 21:40:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com F1458624DF Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=eblake@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com F1458624DF From: Eric Blake To: qemu-devel@nongnu.org Date: Thu, 20 Jul 2017 16:40:08 -0500 Message-Id: <20170720214008.28494-5-eblake@redhat.com> In-Reply-To: <20170720214008.28494-1-eblake@redhat.com> References: <20170720214008.28494-1-eblake@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Thu, 20 Jul 2017 21:40:15 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v2 4/4] qtest: Document calling conventions X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: armbru@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" We have two flavors of vararg usage in qtest; make it clear that qmp() has different semantics than hmp(), and let the compiler enforce that hmp() is used correctly. However, qmp() (and friends) only accept a subset of printf flags look-alikes (namely, those that our JSON parser understands), and what is worse, qmp("true") (the JSON keyword 'true') is different from qmp("%s", "true") (the JSON string '"true"'), so marking those as printf-like would produce more harm from bogus warnings than it helps (we may have made a mistake in previously marking qobject_from_jsonf(), but this patch is not addressing that). Signed-off-by: Eric Blake --- v2: several comment tweaks, explain why qmp() can't be marked --- tests/libqtest.h | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/tests/libqtest.h b/tests/libqtest.h index 38bc1e9953..ae57282130 100644 --- a/tests/libqtest.h +++ b/tests/libqtest.h @@ -50,7 +50,8 @@ void qtest_quit(QTestState *s); /** * qtest_qmp_discard_response: * @s: #QTestState instance to operate on. - * @fmt...: QMP message to send to qemu + * @fmt...: QMP message to send to qemu; formats arguments through + * json-lexer.c (only understands '%((l|ll|I64)?d|[ipsf])'). * * Sends a QMP message to QEMU and consumes the response. */ @@ -59,7 +60,8 @@ void qtest_qmp_discard_response(QTestState *s, const char= *fmt, ...); /** * qtest_qmp: * @s: #QTestState instance to operate on. - * @fmt...: QMP message to send to qemu + * @fmt...: QMP message to send to qemu; formats arguments through + * json-lexer.c (only understands '%((l|ll|I64)?d|[ipsf])'). * * Sends a QMP message to QEMU and returns the response. */ @@ -68,7 +70,8 @@ QDict *qtest_qmp(QTestState *s, const char *fmt, ...); /** * qtest_async_qmp: * @s: #QTestState instance to operate on. - * @fmt...: QMP message to send to qemu + * @fmt...: QMP message to send to qemu; formats arguments through + * json-lexer.c (only understands '%((l|ll|I64)?d|[ipsf])'). * * Sends a QMP message to QEMU and leaves the response in the stream. */ @@ -134,7 +137,7 @@ QDict *qtest_qmp_eventwait_ref(QTestState *s, const cha= r *event); /** * qtest_hmp: * @s: #QTestState instance to operate on. - * @fmt...: HMP command to send to QEMU + * @fmt...: HMP command to send to QEMU, formats arguments like vsprintf(). * * Send HMP command to QEMU via QMP's human-monitor-command. * QMP events are discarded. @@ -535,7 +538,8 @@ static inline void qtest_end(void) /** * qmp: - * @fmt...: QMP message to send to qemu + * @fmt...: QMP message to send to qemu; formats arguments through + * json-lexer.c (only understands '%((l|ll|I64)?d|[ipsf])'). * * Sends a QMP message to QEMU and returns the response. */ @@ -543,7 +547,8 @@ QDict *qmp(const char *fmt, ...); /** * qmp_async: - * @fmt...: QMP message to send to qemu + * @fmt...: QMP message to send to qemu; formats arguments through + * json-lexer.c (only understands '%((l|ll|I64)?d|[ipsf])'). * * Sends a QMP message to QEMU and leaves the response in the stream. */ @@ -551,7 +556,8 @@ void qmp_async(const char *fmt, ...); /** * qmp_discard_response: - * @fmt...: QMP message to send to qemu + * @fmt...: QMP message to send to qemu; formats arguments through + * json-lexer.c (only understands '%((l|ll|I64)?d|[ipsf])'). * * Sends a QMP message to QEMU and consumes the response. */ @@ -592,7 +598,7 @@ static inline QDict *qmp_eventwait_ref(const char *even= t) /** * hmp: - * @fmt...: HMP command to send to QEMU + * @fmt...: HMP command to send to QEMU, formats arguments like vsprintf(). * * Send HMP command to QEMU via QMP's human-monitor-command. * --=20 2.13.3