From nobody Fri May 3 13:41:44 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.24 as permitted sender) client-ip=209.132.183.24; envelope-from=libvir-list-bounces@redhat.com; helo=mx3-phx2.redhat.com; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.24 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; Return-Path: Received: from mx3-phx2.redhat.com (mx3-phx2.redhat.com [209.132.183.24]) by mx.zohomail.com with SMTPS id 1489606273548946.7499878127408; Wed, 15 Mar 2017 12:31:13 -0700 (PDT) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx3-phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v2FJRtEJ023705; Wed, 15 Mar 2017 15:27:55 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v2FJRrYj015297 for ; Wed, 15 Mar 2017 15:27:53 -0400 Received: from localhost.localdomain.com (ovpn-116-76.phx2.redhat.com [10.3.116.76]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v2FJRqag018059 for ; Wed, 15 Mar 2017 15:27:53 -0400 From: John Ferlan To: libvir-list@redhat.com Date: Wed, 15 Mar 2017 15:27:48 -0400 Message-Id: <20170315192749.24632-2-jferlan@redhat.com> In-Reply-To: <20170315192749.24632-1-jferlan@redhat.com> References: <20170315192749.24632-1-jferlan@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 1/2] conf: Alter error message for vHBA creation using parent wwnn/wwpn 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-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Commit id 'bb74a7ffe' added a fairly non specific message when providing only the or instead of provid= ing both wwnn and wwpn. This patch just modifies the message to be more specific about which was missing. Signed-off-by: John Ferlan --- src/conf/node_device_conf.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c index 3565aec..2b49f5c 100644 --- a/src/conf/node_device_conf.c +++ b/src/conf/node_device_conf.c @@ -1615,10 +1615,19 @@ virNodeDeviceDefParseXML(xmlXPathContextPtr ctxt, def->parent =3D virXPathString("string(./parent[1])", ctxt); def->parent_wwnn =3D virXPathString("string(./parent[1]/@wwnn)", ctxt); def->parent_wwpn =3D virXPathString("string(./parent[1]/@wwpn)", ctxt); - if ((def->parent_wwnn && !def->parent_wwpn) || - (!def->parent_wwnn && def->parent_wwpn)) { - virReportError(VIR_ERR_XML_ERROR, "%s", - _("must supply both wwnn and wwpn for parent")); + if (def->parent_wwnn && !def->parent_wwpn) { + virReportError(VIR_ERR_XML_ERROR, + _("when providing parent wwnn=3D'%s', the " + "wwpn must also be provided"), + def->parent_wwnn); + goto error; + } + + if (!def->parent_wwnn && def->parent_wwpn) { + virReportError(VIR_ERR_XML_ERROR, + _("when providing parent wwpn=3D'%s', the " + "wwnn must also be provided"), + def->parent_wwpn); goto error; } def->parent_fabric_wwn =3D virXPathString("string(./parent[1]/@fabric_= wwn)", --=20 2.9.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Fri May 3 13:41:44 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.37 as permitted sender) client-ip=209.132.183.37; envelope-from=libvir-list-bounces@redhat.com; helo=mx5-phx2.redhat.com; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.37 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; Return-Path: Received: from mx5-phx2.redhat.com (mx5-phx2.redhat.com [209.132.183.37]) by mx.zohomail.com with SMTPS id 1489606286767896.2080102601491; Wed, 15 Mar 2017 12:31:26 -0700 (PDT) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx5-phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v2FJS1Kv041729; Wed, 15 Mar 2017 15:28:01 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v2FJRsVw015303 for ; Wed, 15 Mar 2017 15:27:54 -0400 Received: from localhost.localdomain.com (ovpn-116-76.phx2.redhat.com [10.3.116.76]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v2FJRqah018059 for ; Wed, 15 Mar 2017 15:27:54 -0400 From: John Ferlan To: libvir-list@redhat.com Date: Wed, 15 Mar 2017 15:27:49 -0400 Message-Id: <20170315192749.24632-3-jferlan@redhat.com> In-Reply-To: <20170315192749.24632-1-jferlan@redhat.com> References: <20170315192749.24632-1-jferlan@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 2/2] test: Don't assume a configFile exists for Storage Pool tests 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-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Fix a "bug" in the storage pool test driver code which "assumed" testStoragePoolObjSetDefaults should fill in the configFile for both the Define/Create (persistent) and CreateXML (transient) pools by just VIR_FREE()'ing it during CreateXML. Because the configFile was filled in, during Destroy the pool wouldn't be free'd which could cause issues for future patches which add tests to validate vHBA creation for the storage pool using the same name. Signed-off-by: John Ferlan --- src/test/test_driver.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index cf7820a..361d62e 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -4440,6 +4440,12 @@ testStoragePoolCreateXML(virConnectPtr conn, pool =3D NULL; goto cleanup; } + + /* *SetDefaults fills this in for the persistent pools, but this + * would be a transient pool so remove it; otherwise, the Destroy + * code will not Remove the pool */ + VIR_FREE(pool->configFile); + pool->active =3D 1; =20 event =3D virStoragePoolEventLifecycleNew(pool->def->name, pool->def->= uuid, --=20 2.9.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list