From patchwork Thu Mar 14 14:44:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cole Robinson X-Patchwork-Id: 160346 Delivered-To: patch@linaro.org Received: by 2002:a02:5cc1:0:0:0:0:0 with SMTP id w62csp15595160jad; Thu, 14 Mar 2019 07:44:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqzEgQf5oTCv/jenY5eBnQTwQyeZ3jP0r2hsUQSHv+qwdZXczVmfJ9SIWMABdV4y36hxJA42 X-Received: by 2002:a0c:d60d:: with SMTP id c13mr40124466qvj.43.1552574688427; Thu, 14 Mar 2019 07:44:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552574688; cv=none; d=google.com; s=arc-20160816; b=KZF41V80Tk4zQrMTCJexdj44Yqa45jXAguR5DVEP0KoOdTjhSxP6jeI8oLNiEi0sG9 gdOeQqU+N1e12C7rW1hes8hptBxAGfOOY5V5zGZPBlQp2QXkDWgjEJl1R4phwB5yzt5h HWEMtkrwVHGZwaHNwUdQ2Uznb9DJec7YoZbDNB2eHMcMy51xHg1RV8nV169oFuz1yMxe Mh4dc18lbw0uBZE0DNupFr4k1qIsmHhrn5XirR+veQmlfKCq0bwTJELrB4a8SE5iQaMb qBrGSIpW0C+CcdZioUfq8U9RI2Op5j1lpTjgNbFUpLDfulPCCO3syoycrIPoKLt35rQk Oagg== 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=39PtS6RDNm6IbzqeeBJHswR2t1NuvDgDpJFiCgSIFwM=; b=b6Jr1l2p10pKuvTauhgvu1TgSAxjX/3erspcTbGOlnltOdsNhCy0e1qA7uwji6O3kA H9wNfWwevJb2+dacFekUBnYc7isqFxsLUiYeRBsh2fPlVroZFmdN6yAZ1uCwDDlTCI39 fXKnLpChD8fs+3o3lSi0Q5T9/Cpv5N3orq7adsJHUAeX6KWovjXklqq40kulJ1OAR6Z+ GPBw1/u9sdqkj6fMfPV4whVAVVzOJpSzyO8z4p5ug5KBL0PecKYYOPhjT9HmoSNzoTCP e5YSktnw4QwSeg+K6sBCmY9N2jcIXyWwCgwp8ETOhOm6gMr37xZ9RIzXz9d5mbhctC7/ ZcDg== 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 z43si1194943qve.155.2019.03.14.07.44.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Mar 2019 07:44:48 -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-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id EF13411BB7B; Thu, 14 Mar 2019 14:44:46 +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 B06991001DEF; Thu, 14 Mar 2019 14:44:46 +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 6E57F3FA4C; Thu, 14 Mar 2019 14:44:46 +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 x2EEijkh024632 for ; Thu, 14 Mar 2019 10:44:45 -0400 Received: by smtp.corp.redhat.com (Postfix) id 756CA60FE5; Thu, 14 Mar 2019 14:44:45 +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 0E5AB60F89; Thu, 14 Mar 2019 14:44:44 +0000 (UTC) From: Cole Robinson To: libvirt-list@redhat.com Date: Thu, 14 Mar 2019 10:44:08 -0400 Message-Id: <26cc33145b6f80854e070505d048341219d05a8b.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 15/21] tests: qemuxml2argv: remove full testInfo initialization 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.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Thu, 14 Mar 2019 14:44:47 +0000 (UTC) Only initialize the fields that are passed in Signed-off-by: Cole Robinson --- tests/qemuxml2argvtest.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) -- 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 176e4eff3e..b1c18c6c09 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -786,11 +786,12 @@ mymain(void) * the test cases should be forked using DO_TEST_CAPS_VER with the appropriate * version. */ -# define DO_TEST_CAPS_INTERNAL(name, suffix, \ +# define DO_TEST_CAPS_INTERNAL(_name, _suffix, \ arch, capsfile, stripmachinealiases, ...) \ do { \ static struct testInfo info = { \ - name, "." suffix, NULL, NULL, -1, 0, 0, \ + .name = _name, \ + .suffix = "." _suffix, \ }; \ if (!(info.qemuCaps = qemuTestParseCapabilitiesArch(virArchFromString(arch), \ capsfile))) \ @@ -800,7 +801,7 @@ mymain(void) if (testInfoSetArgs(&info, __VA_ARGS__, ARG_END) < 0) \ return EXIT_FAILURE; \ info.flags |= FLAG_REAL_CAPS; \ - if (virTestRun("QEMU XML-2-ARGV " name "." suffix, \ + if (virTestRun("QEMU XML-2-ARGV " _name "." _suffix, \ testCompareXMLToArgv, &info) < 0) \ ret = -1; \ virObjectUnref(info.qemuCaps); \ @@ -841,16 +842,16 @@ mymain(void) /* All the following macros require an explicit QEMU_CAPS_* list * at the end of the argument list, or the NONE placeholder */ -# define DO_TEST_FULL(name, ...) \ +# define DO_TEST_FULL(_name, ...) \ do { \ static struct testInfo info = { \ - name, NULL, NULL, NULL, -1, 0, 0, \ + .name = _name, \ }; \ if (!(info.qemuCaps = virQEMUCapsNew())) \ return EXIT_FAILURE; \ if (testInfoSetArgs(&info, __VA_ARGS__, QEMU_CAPS_LAST, ARG_END) < 0) \ return EXIT_FAILURE; \ - if (virTestRun("QEMU XML-2-ARGV " name, \ + if (virTestRun("QEMU XML-2-ARGV " _name, \ testCompareXMLToArgv, &info) < 0) \ ret = -1; \ virObjectUnref(info.qemuCaps); \