From patchwork Fri Jan 8 03:50:05 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cole Robinson X-Patchwork-Id: 59317 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp311115lbb; Thu, 7 Jan 2016 19:53:21 -0800 (PST) X-Received: by 10.28.18.21 with SMTP id 21mr19221678wms.11.1452225200289; Thu, 07 Jan 2016 19:53:20 -0800 (PST) Return-Path: Received: from mx4-phx2.redhat.com (mx4-phx2.redhat.com. [209.132.183.25]) by mx.google.com with ESMTPS id r186si24645034wmb.16.2016.01.07.19.53.19 (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 07 Jan 2016 19:53:20 -0800 (PST) Received-SPF: pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.25 as permitted sender) client-ip=209.132.183.25; Authentication-Results: mx.google.com; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.25 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx4-phx2.redhat.com (8.13.8/8.13.8) with ESMTP id u083p5vm015009; Thu, 7 Jan 2016 22:51:05 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id u083oJX2005777 for ; Thu, 7 Jan 2016 22:50:19 -0500 Received: from colepc.redhat.com (ovpn-113-33.phx2.redhat.com [10.3.113.33]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u083oBtg030219; Thu, 7 Jan 2016 22:50:19 -0500 From: Cole Robinson To: libvirt-list@redhat.com Date: Thu, 7 Jan 2016 22:50:05 -0500 Message-Id: In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 11/12] tests: qemuxml2xml: Wire up QEMUCaps 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: , MIME-Version: 1.0 Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com Future changes will make some of these tests dependent on specific QEMUCaps flags, so wire up the basic handling. --- tests/qemuxml2xmltest.c | 11 +++++++++++ 1 file changed, 11 insertions(+) -- 2.5.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index c0270d4..32c9fed 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -37,6 +37,8 @@ struct testInfo { char *outInactiveName; char *outInactiveFile; + + virQEMUCapsPtr qemuCaps; }; static int @@ -216,6 +218,8 @@ testInfoFree(struct testInfo *info) VIR_FREE(info->outInactiveName); VIR_FREE(info->outInactiveFile); + + virObjectUnref(info->qemuCaps); } @@ -225,6 +229,13 @@ testInfoSet(struct testInfo *info, bool different, int when) { + if (!(info->qemuCaps = virQEMUCapsNew())) + goto error; + + if (qemuTestCapsCacheInsert(driver.qemuCapsCache, name, + info->qemuCaps) < 0) + goto error; + if (virAsprintf(&info->inName, "%s/qemuxml2argvdata/qemuxml2argv-%s.xml", abs_srcdir, name) < 0) goto error;