From nobody Sun May 19 07:53:00 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1531396746656210.93508695658954; Thu, 12 Jul 2018 04:59:06 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 91EDC3082147; Thu, 12 Jul 2018 11:59:04 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A0FF3BED66; Thu, 12 Jul 2018 11:59:03 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 19D2418037ED; Thu, 12 Jul 2018 11:59:02 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w6CBwlfW022330 for ; Thu, 12 Jul 2018 07:58:47 -0400 Received: by smtp.corp.redhat.com (Postfix) id B56C72156898; Thu, 12 Jul 2018 11:58:47 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id 373AA2156889; Thu, 12 Jul 2018 11:58:47 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Thu, 12 Jul 2018 13:58:39 +0200 Message-Id: <134f9df74b23466a5e9023b9f8742aed22862e82.1531396605.git.pkrempa@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Cc: Peter Krempa Subject: [libvirt] [PATCH 1/6] tests: qemuschema: Fix copy-paste error in function name X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.27 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Thu, 12 Jul 2018 11:59:05 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" s/testQEMUSchemaValidateArrayBuiltin/testQEMUSchemaValidateBuiltin/ Signed-off-by: Peter Krempa Reviewed-by: J=EF=BF=BDn Tomko --- tests/testutilsqemuschema.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/testutilsqemuschema.c b/tests/testutilsqemuschema.c index 1cec5265e1..fb22803a22 100644 --- a/tests/testutilsqemuschema.c +++ b/tests/testutilsqemuschema.c @@ -28,9 +28,9 @@ testQEMUSchemaValidateRecurse(virJSONValuePtr obj, virBufferPtr debug); static int -testQEMUSchemaValidateArrayBuiltin(virJSONValuePtr obj, - virJSONValuePtr root, - virBufferPtr debug) +testQEMUSchemaValidateBuiltin(virJSONValuePtr obj, + virJSONValuePtr root, + virBufferPtr debug) { const char *t =3D virJSONValueObjectGetString(root, "json-type"); const char *s =3D NULL; @@ -476,7 +476,7 @@ testQEMUSchemaValidateRecurse(virJSONValuePtr obj, const char *t =3D virJSONValueObjectGetString(root, "meta-type"); if (STREQ_NULLABLE(t, "builtin")) { - return testQEMUSchemaValidateArrayBuiltin(obj, root, debug); + return testQEMUSchemaValidateBuiltin(obj, root, debug); } else if (STREQ_NULLABLE(t, "object")) { return testQEMUSchemaValidateObject(obj, root, schema, debug); } else if (STREQ_NULLABLE(t, "enum")) { --=20 2.16.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun May 19 07:53:00 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1531396810521477.6843677642519; Thu, 12 Jul 2018 05:00:10 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 44E1C882FF; Thu, 12 Jul 2018 12:00:08 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EDCE719490; Thu, 12 Jul 2018 12:00:07 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 720503F7FA; Thu, 12 Jul 2018 12:00:07 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w6CBwmfn022335 for ; Thu, 12 Jul 2018 07:58:48 -0400 Received: by smtp.corp.redhat.com (Postfix) id 7E8D92156898; Thu, 12 Jul 2018 11:58:48 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id F40332156889; Thu, 12 Jul 2018 11:58:47 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Thu, 12 Jul 2018 13:58:40 +0200 Message-Id: <88dbd1020b8bb786528a451d784d0bd4688f8add.1531396605.git.pkrempa@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Cc: Peter Krempa Subject: [libvirt] [PATCH 2/6] tests: qemuschema: Add line break to debug message X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Thu, 12 Jul 2018 12:00:09 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Message stating which schema replies file is being used would be squashed with other messages. Signed-off-by: Peter Krempa Reviewed-by: J=EF=BF=BDn Tomko --- tests/testutilsqemuschema.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/testutilsqemuschema.c b/tests/testutilsqemuschema.c index fb22803a22..aa846e1e79 100644 --- a/tests/testutilsqemuschema.c +++ b/tests/testutilsqemuschema.c @@ -539,7 +539,7 @@ testQEMUSchemaGetLatest(void) return NULL; } - VIR_TEST_DEBUG("replies file: '%s'", capsLatestFile); + VIR_TEST_DEBUG("replies file: '%s'\n", capsLatestFile); if (virTestLoadFile(capsLatestFile, &capsLatest) < 0) goto cleanup; --=20 2.16.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun May 19 07:53:00 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1531396768261586.1078281008561; Thu, 12 Jul 2018 04:59:28 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 061DC308214E; Thu, 12 Jul 2018 11:59:27 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C76DE3001A47; Thu, 12 Jul 2018 11:59:26 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 7648818037EC; Thu, 12 Jul 2018 11:59:26 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w6CBwnbO022343 for ; Thu, 12 Jul 2018 07:58:49 -0400 Received: by smtp.corp.redhat.com (Postfix) id 489242156891; Thu, 12 Jul 2018 11:58:49 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id BD5AB2156889; Thu, 12 Jul 2018 11:58:48 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Thu, 12 Jul 2018 13:58:41 +0200 Message-Id: <4b9a0a315d71cbfb06b9c8077d5a690d2ab39723.1531396605.git.pkrempa@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Cc: Peter Krempa Subject: [libvirt] [PATCH 3/6] tests: qemumonitorutils: Don't crash on wrong monitor command X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.26 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Thu, 12 Jul 2018 11:59:27 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" virQEMUQAPISchemaPathGet returns success when a given schema path was not found but the returned object is set to NULL. This meant that we'd call testQEMUSchemaValidate with the schemaroot being NULL which lead to a crash if a mistyped monitor command was tested. Signed-off-by: Peter Krempa Reviewed-by: J=EF=BF=BDn Tomko --- tests/qemumonitortestutils.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/qemumonitortestutils.c b/tests/qemumonitortestutils.c index d857c381a4..15eba5898e 100644 --- a/tests/qemumonitortestutils.c +++ b/tests/qemumonitortestutils.c @@ -564,7 +564,8 @@ qemuMonitorTestProcessCommandDefaultValidate(qemuMonito= rTestPtr test, if (virAsprintf(&schemapath, "%s/arg-type", cmdname) < 0) goto cleanup; - if (virQEMUQAPISchemaPathGet(schemapath, test->qapischema, &schemaroot= ) < 0) { + if (virQEMUQAPISchemaPathGet(schemapath, test->qapischema, &schemaroot= ) < 0 || + !schemaroot) { if (qemuMonitorReportError(test, "command '%s' not found in QAPI schema", cmdname) =3D=3D 0) --=20 2.16.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun May 19 07:53:00 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1531396817911663.1440608170212; Thu, 12 Jul 2018 05:00:17 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 60CBE13AA7; Thu, 12 Jul 2018 12:00:16 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 190245D761; Thu, 12 Jul 2018 12:00:16 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 88ABA1800B71; Thu, 12 Jul 2018 12:00:15 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w6CBwoT5022355 for ; Thu, 12 Jul 2018 07:58:50 -0400 Received: by smtp.corp.redhat.com (Postfix) id 1150A2156891; Thu, 12 Jul 2018 11:58:50 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id 86CFC2156889; Thu, 12 Jul 2018 11:58:49 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Thu, 12 Jul 2018 13:58:42 +0200 Message-Id: <0b155fa1920f81d57e78422d271dd5e4041538c2.1531396605.git.pkrempa@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Cc: Peter Krempa Subject: [libvirt] [PATCH 4/6] tests: qemumonitorjson: Raise the necessary debug level for QAPI schema checks X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Thu, 12 Jul 2018 12:00:17 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" The debug output of the schema validator on success is not so interresting that it should be printed when basic debugging is enabled. Print it only when test debugging is set to 3 and more. Signed-off-by: Peter Krempa Reviewed-by: J=EF=BF=BDn Tomko --- tests/qemumonitorjsontest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index 9039cef423..fce2108932 100644 --- a/tests/qemumonitorjsontest.c +++ b/tests/qemumonitorjsontest.c @@ -2838,7 +2838,7 @@ testQAPISchema(const void *opaque) ret =3D 0; } - if (virTestGetDebug() || + if (virTestGetDebug() >=3D 3 || (ret < 0 && virTestGetVerbose())) { char *debugstr =3D virBufferContentAndReset(&debug); fprintf(stderr, "\n%s\n", debugstr); --=20 2.16.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun May 19 07:53:00 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1531396769825325.66561146571917; Thu, 12 Jul 2018 04:59:29 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 292E480F99; Thu, 12 Jul 2018 11:59:28 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E8BC516E4A; Thu, 12 Jul 2018 11:59:27 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 8F45C4A465; Thu, 12 Jul 2018 11:59:27 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w6CBwops022360 for ; Thu, 12 Jul 2018 07:58:51 -0400 Received: by smtp.corp.redhat.com (Postfix) id CEF292156899; Thu, 12 Jul 2018 11:58:50 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id 502A42156889; Thu, 12 Jul 2018 11:58:50 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Thu, 12 Jul 2018 13:58:43 +0200 Message-Id: <95d82ee539894b298f5b1461adabf06bf60ab284.1531396605.git.pkrempa@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Cc: Peter Krempa Subject: [libvirt] [PATCH 5/6] tests: qemumonitorjson: Fix schema testing of monitor commands X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Thu, 12 Jul 2018 11:59:28 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" The 'simpleFunc' data structure is overwritten by the code generated from the macros which initiate the tests. This means that most of the tests would get NULL 'schema' member which means that the schema validation would not take place. Signed-off-by: Peter Krempa Reviewed-by: J=EF=BF=BDn Tomko --- tests/qemumonitorjsontest.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index fce2108932..95b718ab37 100644 --- a/tests/qemumonitorjsontest.c +++ b/tests/qemumonitorjsontest.c @@ -2879,7 +2879,6 @@ mymain(void) ret =3D -1; goto cleanup; } - simpleFunc.schema =3D qapiData.schema; #define DO_TEST(name) \ if (virTestRun(# name, testQemuMonitorJSON ## name, driver.xmlopt) < 0= ) \ @@ -2887,7 +2886,9 @@ mymain(void) #define DO_TEST_SIMPLE(CMD, FNC, ...) \ simpleFunc =3D (testQemuMonitorJSONSimpleFuncData) {.cmd =3D CMD, .fun= c =3D FNC, \ - .xmlopt =3D driver.xmlopt, __VA_ARG= S__ }; \ + .xmlopt =3D driver.xmlopt, \ + .schema =3D qapiData.schema, \ + __VA_ARGS__ }; \ if (virTestRun(# FNC, testQemuMonitorJSONSimpleFunc, &simpleFunc) < 0)= \ ret =3D -1 --=20 2.16.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun May 19 07:53:00 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 153139682371391.91640480613455; Thu, 12 Jul 2018 05:00:23 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.25]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0BBF63082145; Thu, 12 Jul 2018 12:00:22 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CC9E12010CC9; Thu, 12 Jul 2018 12:00:21 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 7074B1800B88; Thu, 12 Jul 2018 12:00:21 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w6CBwpAp022365 for ; Thu, 12 Jul 2018 07:58:51 -0400 Received: by smtp.corp.redhat.com (Postfix) id 979AC2156898; Thu, 12 Jul 2018 11:58:51 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1908E2156891; Thu, 12 Jul 2018 11:58:50 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Thu, 12 Jul 2018 13:58:44 +0200 Message-Id: <50dceccd4d318646fae9c94fc2fd245be74ee706.1531396605.git.pkrempa@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Cc: Peter Krempa Subject: [libvirt] [PATCH 6/6] tests: qemumonitorjson: Do QMP schema validation for DO_TEST_GEN X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.25 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Thu, 12 Jul 2018 12:00:23 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Test some more QMP commands against the schema. Signed-off-by: Peter Krempa Reviewed-by: J=EF=BF=BDn Tomko --- tests/qemumonitorjsontest.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index 95b718ab37..e9b2632655 100644 --- a/tests/qemumonitorjsontest.c +++ b/tests/qemumonitorjsontest.c @@ -1297,7 +1297,7 @@ testQemuMonitorJSON ## funcName(const void *opaque) \ { \ const testQemuMonitorJSONSimpleFuncData *data =3D opaque; \ virDomainXMLOptionPtr xmlopt =3D data->xmlopt; \ - qemuMonitorTestPtr test =3D qemuMonitorTestNewSimple(true, xmlopt); \ + qemuMonitorTestPtr test =3D qemuMonitorTestNewSchema(xmlopt, data->sch= ema); \ const char *reply =3D data->reply; \ int ret =3D -1; \ \ @@ -2894,6 +2894,7 @@ mymain(void) #define DO_TEST_GEN(name, ...) \ simpleFunc =3D (testQemuMonitorJSONSimpleFuncData) {.xmlopt =3D driver= .xmlopt, \ + .schema =3D qapiData= .schema \ __VA_ARGS__ }; \ if (virTestRun(# name, testQemuMonitorJSON ## name, &simpleFunc) < 0) \ ret =3D -1 --=20 2.16.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list