From patchwork Wed Apr 17 14:57:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cole Robinson X-Patchwork-Id: 162403 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp5596688jan; Wed, 17 Apr 2019 07:59:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqzDVU3FJac552+Pv8cQBjyOZLb5lLsai2EJ8ycmP+GdsZ+PBqX/O1gJdgUw92i1cCZAEiTU X-Received: by 2002:ac8:3687:: with SMTP id a7mr70962753qtc.284.1555513151778; Wed, 17 Apr 2019 07:59:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555513151; cv=none; d=google.com; s=arc-20160816; b=s60H8Xjrf0pgUsjvoDY/jmh3hqQnQQR7txBxJEZtWF1LRxkT54lByqBnL/y2Yf77VG SsjZrZ75ViuGiy7RWNSXPjUhDahwMYwqaAknRc/ZJSOk6HNE08mKOgdVTi/sUy7ztGdk wYoh2DTyaWCeqlZZpqLgRB6PMZoZUSOodRRBaIU9QXAAnjLrJNkv1WsjLQoRmmBZyyid 6RHmnyq+DrKkW7pAY8o9ApAJM25NCaERkYdGrGXJjeTIPT3l2Uyf6Z0COO/4jzPkY4LN oIQRBo2Dl/IObYU6ikjkOcdhMQwXTFW2bG9AdobP3aKiAAalKBN83R3ZxLI7NkTEO/Bf gByw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :delivered-to; bh=l61Y6FVHnFxv+IsUADI2lGA3bDTZhx4sX8+OooMe250=; b=RGwWjZGVuPcbqdZIOztolecoJvmaiccg2FV+ul+fiXx/E4LqpgmJx96QtR8uDASOwg k+AeqnAEuRB6EqYIljVXsueQSsPcb7I0pFEgGjY58FR7qgHWEPxpd8LnjeFWawcsyEGO z9aAIbiF7meTyGWRLl6uL1Oajyv7gTU8l859wQG/AB07xLT7Terl5GGj3ePyryPdvS5L WzVXlvl0L/oQcfxs+K27aeBnaSkCTHHR86K12jUYzNK+HmRVFlusuEUus9tj4ORKQKrA EHv96RCXn/rlrKoPghMMNIt0xUrNGlyhSFcki6WbQJ0j/mFD8uKaPzP+kFbVdgFXtmzL hl/w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com. [209.132.183.28]) by mx.google.com with ESMTPS id k17si1013225qtp.263.2019.04.17.07.59.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Apr 2019 07:59:11 -0700 (PDT) Received-SPF: pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; Authentication-Results: mx.google.com; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com 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) Delivered-To: libvirt-list@redhat.com 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: , 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) 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(-) -- 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list 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 = testDomainDefNamespaceParse, .free = testDomainDefNamespaceFree, }; + virDomainDefParserConfig config = { + .features = 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; if (testDriverInitialize() < 0) @@ -398,7 +406,7 @@ testDriverNew(void) if (!(ret = virObjectLockableNew(testDriverClass))) return NULL; - if (!(ret->xmlopt = virDomainXMLOptionNew(NULL, NULL, &ns, NULL, NULL)) || + if (!(ret->xmlopt = virDomainXMLOptionNew(&config, NULL, &ns, NULL, NULL)) || !(ret->eventState = virObjectEventStateNew()) || !(ret->ifaces = virInterfaceObjListNew()) || !(ret->domains = virDomainObjListNew()) || From patchwork Wed Apr 17 14:57:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cole Robinson X-Patchwork-Id: 162402 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp5595939jan; Wed, 17 Apr 2019 07:58:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqxyfVjpcLuF8e3a1wS2IjCwHJTGv34HnsKQ7S3vxiTbqLp4ke/jMB6nuz3i4lyd1cXFTya9 X-Received: by 2002:ac8:268d:: with SMTP id 13mr72972433qto.53.1555513102041; Wed, 17 Apr 2019 07:58:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555513102; cv=none; d=google.com; s=arc-20160816; b=qlTWlSJoI4O7eAIvUjgQgXUfPv53zU1y1rVPUOOdVe/CJDtDMju/IY3QvmgsA9DXZW PrkFxLkTRNNmx5eoqU/5Pkvt8JCUu+SC6bZZgEvBetnJGXAm3/JuCUzP2xBF8kWscY3g re1YZGXytixiyP3CsAJ5+oaim+BqqqfIcwbFCFNSPfowtiVPgR+MNO3KsEmUfJ5XdILQ VL61YRL2NdhjRItayDWklMqITOVFE5RSumunGSEstHNXLTj1eFMXTRQk7nXEXa4tC+fN Mb0Zdh56brtXy1h7EFxTy6VPt0ohX/KcqZFK8foZ1iSmd0YgpB5KO1qrdIOXU/tSs3rA bdSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :delivered-to; bh=Vy7yhhMyrdq+cVJmzyfNl1/ZoH5kP5H7m7Kw12FE7vI=; b=Hrs7yuoo3k70+55LRFGNYrlU0k9vkRRKdKiK4anc9IVGIvkzgHCmBGXS5sOeKvMvhZ ziyxqxWwOrXfx2ubMNuIaFegdaTybVPsSn3Fgvi6CkHuGaFbQxZJfJpBfduUQwlhGsXj Cr6qWbdIqOKBIow4kUiaoL7DAy2n+garyyotpq/EVeKp5wzpPIycy3gzr8i3ELPqLZvs 2UlFh3dYj4BEfMswHjEgNdyFS3BG4YkW9eFJDsclIIKcq9j17SKSX37CBQ8nCv0dsaOJ 4/XpeA8GKW816KOR/satUxOFNyKNvEjdE7Qe6Rf7aRRF584TQDdgDQ+3/fCtROcIaffo o1oA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com. [209.132.183.28]) by mx.google.com with ESMTPS id w30si7077013qtj.58.2019.04.17.07.58.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Apr 2019 07:58:22 -0700 (PDT) Received-SPF: pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; Authentication-Results: mx.google.com; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com 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) Delivered-To: libvirt-list@redhat.com 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: , 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) 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(-) -- 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list 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; } - if (!def->os.loader->path && + if (def->os.loader && + !def->os.loader->path && def->os.firmware == VIR_DOMAIN_OS_DEF_FIRMWARE_NONE) { virReportError(VIR_ERR_XML_DETAIL, "%s", _("no loader path specified and firmware auto selection 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 virVMXDomainDefParserConfig = { .domainPostParseCallback = virVMXDomainDefPostParse, .features = (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), }; struct virVMXDomainDefNamespaceData {