From patchwork Sat Jan 9 00:13:25 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cole Robinson X-Patchwork-Id: 59423 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp861015lbb; Fri, 8 Jan 2016 16:16:46 -0800 (PST) X-Received: by 10.194.79.37 with SMTP id g5mr24199664wjx.89.1452298606622; Fri, 08 Jan 2016 16:16:46 -0800 (PST) Return-Path: Received: from mx5-phx2.redhat.com (mx5-phx2.redhat.com. [209.132.183.37]) by mx.google.com with ESMTPS id h68si2517432wmi.58.2016.01.08.16.16.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 08 Jan 2016 16:16:46 -0800 (PST) Received-SPF: pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.37 as permitted sender) client-ip=209.132.183.37; Authentication-Results: mx.google.com; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.37 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 mx5-phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u090EG6s058139; Fri, 8 Jan 2016 19:14:16 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id u090DXUG002894 for ; Fri, 8 Jan 2016 19:13:33 -0500 Received: from colepc.redhat.com (ovpn-113-33.phx2.redhat.com [10.3.113.33]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u090DSuF014481; Fri, 8 Jan 2016 19:13:32 -0500 From: Cole Robinson To: libvirt-list@redhat.com Date: Fri, 8 Jan 2016 19:13:25 -0500 Message-Id: <93bd7526f661f2d25fdb31155782b3895428baf0.1452298382.git.crobinso@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 6/6] 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. Flags will be added in future patches. --- 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 9482f6c..ab20fca 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -32,6 +32,8 @@ struct testInfo { char *inName; char *outActiveName; char *outInactiveName; + + virQEMUCapsPtr qemuCaps; }; static int @@ -171,6 +173,8 @@ testInfoFree(struct testInfo *info) VIR_FREE(info->inName); VIR_FREE(info->outActiveName); VIR_FREE(info->outInactiveName); + + virObjectUnref(info->qemuCaps); } @@ -180,6 +184,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;