From nobody Sun May 5 16:37:31 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 ARC-Seal: i=1; a=rsa-sha256; t=1555513151; cv=none; d=zoho.com; s=zohoarc; b=hHNRsW3SzT001oTTAKZwWgjzDOXY9gK18nlQE1tV5AQf/j10Mh1eVsvJyfiW2f+NN2qdK7Q4x8M/nvebLLTQvwhNbDiRGYFc57lmjoKwIjqrq+Pn++fI9dEER76+GQF+UYU7rnljdgVqL9wiwkF9r8BmvDMfKWQizSYbRKP+3Xo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1555513151; 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=l61Y6FVHnFxv+IsUADI2lGA3bDTZhx4sX8+OooMe250=; b=CaXJtyA11mR/4wakXroCbtEQcIvMN6rti34NfGpFohceK9/JtVaKUS7D3Mg81tbfrSOk8WMI5wXKu5L+8RPEZ7QCeXdZX6Cqlf89PcPNMvFkgOW1cyL+XAESgUueaTc3QTsgKHAHwtooxCeViMO363ZnWT2HgfJNxtDVz/OuVwI= 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 1555513151971636.7965968413615; Wed, 17 Apr 2019 07:59:11 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0CD3D30BC65E; Wed, 17 Apr 2019 14:59:10 +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 D8F0360C61; Wed, 17 Apr 2019 14:59:09 +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 9C81E4ED28; Wed, 17 Apr 2019 14:59:09 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x3HEw85L002268 for ; Wed, 17 Apr 2019 10:58:08 -0400 Received: by smtp.corp.redhat.com (Postfix) id D21F6608C6; Wed, 17 Apr 2019 14:58:08 +0000 (UTC) Received: from worklaptop.redhat.com (ovpn-124-15.rdu2.redhat.com [10.10.124.15]) by smtp.corp.redhat.com (Postfix) with ESMTP id 044D6608C1; Wed, 17 Apr 2019 14:58:07 +0000 (UTC) From: Cole Robinson To: libvirt-list@redhat.com Date: Wed, 17 Apr 2019 10:57:55 -0400 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 1/2] test: match qemu VIR_DOMAIN_DEF_FEATURE* usage 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.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Wed, 17 Apr 2019 14:59:10 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Match the XML feature usage of the qemu driver, so the test driver doesn't reject things like . Particularly VIR_DOMAIN_DEF_FEATURE_NET_MODEL_STRING is needed to prevent regressions for test suite users with net model strings that aren't in the virDomainNetModel enum yet Signed-off-by: Cole Robinson --- src/test/test_driver.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index d5eecf4b7f..24c1dc5adf 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -390,6 +390,14 @@ testDriverNew(void) .parse =3D testDomainDefNamespaceParse, .free =3D testDomainDefNamespaceFree, }; + virDomainDefParserConfig config =3D { + .features =3D VIR_DOMAIN_DEF_FEATURE_MEMORY_HOTPLUG | + VIR_DOMAIN_DEF_FEATURE_OFFLINE_VCPUPIN | + VIR_DOMAIN_DEF_FEATURE_INDIVIDUAL_VCPUS | + VIR_DOMAIN_DEF_FEATURE_USER_ALIAS | + VIR_DOMAIN_DEF_FEATURE_FW_AUTOSELECT | + VIR_DOMAIN_DEF_FEATURE_NET_MODEL_STRING, + }; testDriverPtr ret; =20 if (testDriverInitialize() < 0) @@ -398,7 +406,7 @@ testDriverNew(void) if (!(ret =3D virObjectLockableNew(testDriverClass))) return NULL; =20 - if (!(ret->xmlopt =3D virDomainXMLOptionNew(NULL, NULL, &ns, NULL, NUL= L)) || + if (!(ret->xmlopt =3D virDomainXMLOptionNew(&config, NULL, &ns, NULL, = NULL)) || !(ret->eventState =3D virObjectEventStateNew()) || !(ret->ifaces =3D virInterfaceObjListNew()) || !(ret->domains =3D virDomainObjListNew()) || --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sun May 5 16:37:31 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 ARC-Seal: i=1; a=rsa-sha256; t=1555513102; cv=none; d=zoho.com; s=zohoarc; b=fQMxrKJgyeXWpkLLxQGPxNK0kG31dzBQ3a5Aw/q8Xuo4TGyq4M/t1GOPmwI3CNTKj10XtJ/ngNgYm2lLFvt4dhZKECcWOT9jEV0paqTWVONSyLGFgP+oJHlyzGl4VnFVQatXmM/+p1/OAojRkDydFTDI/4CAxkPJ877GbbCQP9k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1555513102; 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=Vy7yhhMyrdq+cVJmzyfNl1/ZoH5kP5H7m7Kw12FE7vI=; b=NIUHL/+voJsqP0F+oE2eHn5kULeYjhrn2yqeZpCjLAERkY5blTFLTwXau1zei7k2pB23lgRMt4zl72VEcAncmpNd3j9fzppgwoeqaGg5neh/LObBCkLf84DyMsTUybUoUS4m4PgTI2u4CQX5PHqQKB3qWV3KRwzQXDp8qKHCV20= 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 1555513102550477.7305849959472; Wed, 17 Apr 2019 07:58:22 -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 AC4E05946E; Wed, 17 Apr 2019 14:58:20 +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 7F2F319C77; Wed, 17 Apr 2019 14:58:20 +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 E453F181AC45; Wed, 17 Apr 2019 14:58:19 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x3HEw91W002284 for ; Wed, 17 Apr 2019 10:58:10 -0400 Received: by smtp.corp.redhat.com (Postfix) id EF12D608C8; Wed, 17 Apr 2019 14:58:09 +0000 (UTC) Received: from worklaptop.redhat.com (ovpn-124-15.rdu2.redhat.com [10.10.124.15]) by smtp.corp.redhat.com (Postfix) with ESMTP id 27F51608C2; Wed, 17 Apr 2019 14:58:09 +0000 (UTC) From: Cole Robinson To: libvirt-list@redhat.com Date: Wed, 17 Apr 2019 10:57:56 -0400 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 2/2] conf: Fix VIR_DOMAIN_DEF_FEATURE_FW_AUTOSELECT validation 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.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.39]); Wed, 17 Apr 2019 14:58:21 +0000 (UTC) Content-Type: text/plain; charset="utf-8" The check shouldn't be dependent on whether os->loader is set. Fix it, and add the XML feature to vmx.c which would start failing Signed-off-by: Cole Robinson --- src/conf/domain_conf.c | 6 ++---- src/vmx/vmx.c | 3 ++- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 51aa48f421..7c4a1ff7fa 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -6815,9 +6815,6 @@ static int virDomainDefOSValidate(const virDomainDef *def, virDomainXMLOptionPtr xmlopt) { - if (!def->os.loader) - return 0; - if (def->os.firmware && !(xmlopt->config.features & VIR_DOMAIN_DEF_FEATURE_FW_AUTOSELECT))= { virReportError(VIR_ERR_XML_DETAIL, "%s", @@ -6825,7 +6822,8 @@ virDomainDefOSValidate(const virDomainDef *def, return -1; } =20 - if (!def->os.loader->path && + if (def->os.loader && + !def->os.loader->path && def->os.firmware =3D=3D VIR_DOMAIN_OS_DEF_FIRMWARE_NONE) { virReportError(VIR_ERR_XML_DETAIL, "%s", _("no loader path specified and firmware auto selec= tion disabled")); diff --git a/src/vmx/vmx.c b/src/vmx/vmx.c index 35b83a2320..82418ceca2 100644 --- a/src/vmx/vmx.c +++ b/src/vmx/vmx.c @@ -555,7 +555,8 @@ static virDomainDefParserConfig virVMXDomainDefParserCo= nfig =3D { .domainPostParseCallback =3D virVMXDomainDefPostParse, .features =3D (VIR_DOMAIN_DEF_FEATURE_WIDE_SCSI | VIR_DOMAIN_DEF_FEATURE_NAME_SLASH | - VIR_DOMAIN_DEF_FEATURE_NO_BOOT_ORDER), + VIR_DOMAIN_DEF_FEATURE_NO_BOOT_ORDER | + VIR_DOMAIN_DEF_FEATURE_FW_AUTOSELECT), }; =20 struct virVMXDomainDefNamespaceData { --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list