From patchwork Thu Mar 14 14:43: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: 160336 Delivered-To: patch@linaro.org Received: by 2002:a02:5cc1:0:0:0:0:0 with SMTP id w62csp15594808jad; Thu, 14 Mar 2019 07:44:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqzuxMcjfbfXrfGEzZk9R82i/W7UMjZOx9Nwep0BMo+1Y1/j03FqklC4V/esu8LoviJCnG8f X-Received: by 2002:a37:3013:: with SMTP id w19mr16801183qkw.220.1552574667295; Thu, 14 Mar 2019 07:44:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552574667; cv=none; d=google.com; s=arc-20160816; b=SzHbBcNI5ZHZdjI4jLjI/ENXqAk38kEi+aP/ZJeD32EJYyWrnu04dKA17vW6BGu06N OdaXHQD/ZiSEKrS9q6VR28v8XNMFCCQS0GGNfLuBPUlFCgFQUdfz3iDNjAXUlq9mItUS fUim3LEM8VY8pkqG/PWRQIb0vNafMHIY5CtJP3kFPz3WBR0skvpdqT6cPh3nixiCWpwN s6kXWuEqmfs2966+VaKfqgsfVDR7bsVBu33z8R0d73ygFGFnSC1Ci2NG8miyU+lX4rtl WSeeKo4GzoOV5gcnZDlLAivRui81fyhwRtnStazQry6fdvFHPqquRBCt/4A8NUJ29mXc JfCg== 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=A6kuesMzgZiYGQafM674PPRE/1AdwyM1q6RdN89aOFg=; b=KBB2luji7h1QMo8FbwmnkzxfvWywMNaGFSGqlMlq17IK5ZGYZTLWAQMI0Ip6YBll0m 7gG8gZ9x/x2Sojo3KD/1nXaw6/9L3c7RFgX4/j5q32cdDEb/Js2VAgnzFPoXOCTiEY+P 1UIsepnILiA4dTuVrek2Os1iLVA5JnV4EW9CC//yEytskTBy5vC/pdcYyvgh9Rn1PDGU TBqvBFzeZCuE5t3qExzsad9V4V5U9GV/ekaKiVlfOXxuLg1PgUxm3CuF0mtGEguiKj0+ SEpGSnhuZ5KjS+DdWap535E52ITtbrfR/UYTgVHlkmRk0X7+7uEgBUpdE0Muduynrztm JKQg== 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 z22si7396968qtj.293.2019.03.14.07.44.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Mar 2019 07:44:27 -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-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C11997C84D; Thu, 14 Mar 2019 14:44:25 +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 9273E605CA; Thu, 14 Mar 2019 14:44:25 +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 2D47E41F3D; Thu, 14 Mar 2019 14:44:25 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x2EEiMWx024488 for ; Thu, 14 Mar 2019 10:44:22 -0400 Received: by smtp.corp.redhat.com (Postfix) id 9E01160FDB; Thu, 14 Mar 2019 14:44:22 +0000 (UTC) Delivered-To: libvirt-list@redhat.com Received: from worklaptop.redhat.com (ovpn-124-177.rdu2.redhat.com [10.10.124.177]) by smtp.corp.redhat.com (Postfix) with ESMTP id 38B7C60BE6; Thu, 14 Mar 2019 14:44:22 +0000 (UTC) From: Cole Robinson To: libvirt-list@redhat.com Date: Thu, 14 Mar 2019 10:43:55 -0400 Message-Id: <17389ec524a5d1e5950fa2ae423f106c47508ed4.1552574299.git.crobinso@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 02/21] tests: qemuxml2argv: add testInfoSetArgs 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.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Thu, 14 Mar 2019 14:44:26 +0000 (UTC) For now it just fills in the qemuCaps list. We will expand it in future patches Signed-off-by: Cole Robinson --- tests/qemuxml2argvtest.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) -- 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list Reviewed-by: Andrea Bolognani diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 67c5c74ec5..3b90cd1873 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -624,6 +624,18 @@ testCompareXMLToArgv(const void *data) return ret; } +static int +testInfoSetArgs(struct testInfo *info, ...) +{ + va_list argptr; + int ret = 0; + + va_start(argptr, info); + virQEMUCapsSetVList(info->qemuCaps, argptr); + va_end(argptr); + return ret; +} + # define FAKEROOTDIRTEMPLATE abs_builddir "/fakerootdir-XXXXXX" static int @@ -809,7 +821,8 @@ mymain(void) }; \ if (testInitQEMUCaps(&info, gic) < 0) \ return EXIT_FAILURE; \ - virQEMUCapsSetList(info.qemuCaps, __VA_ARGS__, QEMU_CAPS_LAST); \ + if (testInfoSetArgs(&info, __VA_ARGS__, QEMU_CAPS_LAST) < 0) \ + return EXIT_FAILURE; \ if (virTestRun("QEMU XML-2-ARGV " name, \ testCompareXMLToArgv, &info) < 0) \ ret = -1; \