From nobody Sun Feb 8 17:14:34 2026 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 ARC-Seal: i=1; a=rsa-sha256; t=1559909080; cv=none; d=zoho.com; s=zohoarc; b=eBDfbWaF6IZk8m2nLVGPUXBsozPdMLpiIDPY6Up+5Y91HByYyTQdoi6WqL3ypIVxcOdjbNOkZuzU7v0QzxC1XE0VFACLxjENgRbc2LSamHygRVUzhyMuZrU+J7z/v1c0SLpqjaz6Ub7Fq2kmBfbdYZ9fS4Najq/yrfOvcxS4+HI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1559909080; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=VjaWFab3WR7/9HfXrcyy7OLgaeC4ZhDWtgWPOkERxy4=; b=gGxCdE7J/QmxDyYFXbIi+nHDGuwUxc9owEc2UqTXdDBNQmyxLMS5TokHDubFmnpkD5sxA5/aXlyGUrLFvj3pgUv/fIC/CI27CP5zdrbDaEAYmvTvvLjR8rp7UmVdrnoPSGn4zFKrwF3diMtXTZKKWAVMrZKImnf9v4X0R2lEi4Q= ARC-Authentication-Results: i=1; mx.zoho.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 header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1559909080699106.40253694752948; Fri, 7 Jun 2019 05:04:40 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B7EF0307D95F; Fri, 7 Jun 2019 12:04:30 +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 7FD8F82EF4; Fri, 7 Jun 2019 12:04:28 +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 0C3CB1806B15; Fri, 7 Jun 2019 12:04:24 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x57C1NBj014790 for ; Fri, 7 Jun 2019 08:01:23 -0400 Received: by smtp.corp.redhat.com (Postfix) id 8FC187FA32; Fri, 7 Jun 2019 12:01:23 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.229]) by smtp.corp.redhat.com (Postfix) with ESMTP id 178B118394 for ; Fri, 7 Jun 2019 12:01:22 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Fri, 7 Jun 2019 14:01:18 +0200 Message-Id: <7019919eee075ce13f726c459bc815ee9041ae5c.1559908820.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 3/4] tests: Allow QMP schema testing in qemuMonitorTestNewFromFileFull 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: , 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.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Fri, 07 Jun 2019 12:04:39 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Pass in the schema data from the caller if QMP schema testing is desired. Signed-off-by: Peter Krempa --- tests/qemucapabilitiestest.c | 3 ++- tests/qemuhotplugtest.c | 2 +- tests/qemumonitortestutils.c | 7 +++++-- tests/qemumonitortestutils.h | 3 ++- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/tests/qemucapabilitiestest.c b/tests/qemucapabilitiestest.c index ac9ab6bfce..67f57a4fdc 100644 --- a/tests/qemucapabilitiestest.c +++ b/tests/qemucapabilitiestest.c @@ -82,7 +82,8 @@ testQemuCaps(const void *opaque) data->dataDir, data->base, data->archName) < 0) goto cleanup; - if (!(mon =3D qemuMonitorTestNewFromFileFull(repliesFile, &data->drive= r, NULL))) + if (!(mon =3D qemuMonitorTestNewFromFileFull(repliesFile, &data->drive= r, NULL, + NULL))) goto cleanup; if (qemuProcessQMPInitMonitor(qemuMonitorTestGetMonitor(mon)) < 0) diff --git a/tests/qemuhotplugtest.c b/tests/qemuhotplugtest.c index fbf488c54c..08f00b9c72 100644 --- a/tests/qemuhotplugtest.c +++ b/tests/qemuhotplugtest.c @@ -435,7 +435,7 @@ testQemuHotplugCpuPrepare(const char *test, virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_QUERY_HOTPLUGGABLE_CPUS); if (!(data->mon =3D qemuMonitorTestNewFromFileFull(data->file_json_mon= itor, - &driver, data->vm))) + &driver, data->vm, NU= LL))) goto error; priv->mon =3D qemuMonitorTestGetMonitor(data->mon); diff --git a/tests/qemumonitortestutils.c b/tests/qemumonitortestutils.c index 0de9048243..8d7c503c6e 100644 --- a/tests/qemumonitortestutils.c +++ b/tests/qemumonitortestutils.c @@ -1396,6 +1396,7 @@ qemuMonitorTestFullAddItem(qemuMonitorTestPtr test, * @fileName: File name to load monitor replies from * @driver: qemu driver object * @vm: domain object (may be null if it's not needed by the test) + * @qmpschema: QMP schema data hash table if QMP checking is required * * Create a JSON test monitor simulator object and fill it with expected c= ommand * sequence and replies specified in @fileName. @@ -1409,7 +1410,8 @@ qemuMonitorTestFullAddItem(qemuMonitorTestPtr test, qemuMonitorTestPtr qemuMonitorTestNewFromFileFull(const char *fileName, virQEMUDriverPtr driver, - virDomainObjPtr vm) + virDomainObjPtr vm, + virHashTablePtr qmpschema) { qemuMonitorTestPtr ret =3D NULL; char *jsonstr =3D NULL; @@ -1423,7 +1425,8 @@ qemuMonitorTestNewFromFileFull(const char *fileName, if (virTestLoadFile(fileName, &jsonstr) < 0) return NULL; - if (!(ret =3D qemuMonitorTestNew(true, driver->xmlopt, vm, driver, NUL= L, NULL))) + if (!(ret =3D qemuMonitorTestNew(true, driver->xmlopt, vm, driver, NUL= L, + qmpschema))) goto cleanup; tmp =3D jsonstr; diff --git a/tests/qemumonitortestutils.h b/tests/qemumonitortestutils.h index d2520e08a4..8461c80caa 100644 --- a/tests/qemumonitortestutils.h +++ b/tests/qemumonitortestutils.h @@ -90,7 +90,8 @@ qemuMonitorTestPtr qemuMonitorTestNewFromFile(const char = *fileName, bool simple); qemuMonitorTestPtr qemuMonitorTestNewFromFileFull(const char *fileName, virQEMUDriverPtr driver, - virDomainObjPtr vm); + virDomainObjPtr vm, + virHashTablePtr qmpschem= a); qemuMonitorTestPtr qemuMonitorTestNewAgent(virDomainXMLOptionPtr xmlopt); --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list