From patchwork Thu Mar 14 14:44:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cole Robinson X-Patchwork-Id: 160348 Delivered-To: patch@linaro.org Received: by 2002:a02:5cc1:0:0:0:0:0 with SMTP id w62csp15595195jad; Thu, 14 Mar 2019 07:44:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqy8xo7QqFbgws40CUD8Xx00q4kt7JMy+qSMH6SBxIoalOd1VuqRJD9yxouCBtKxGSXX4aXX X-Received: by 2002:a37:5f85:: with SMTP id t127mr37785756qkb.268.1552574690669; Thu, 14 Mar 2019 07:44:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552574690; cv=none; d=google.com; s=arc-20160816; b=gLhJsgQu93ECakhgJ8jK1e4SNBfbC0K/v5MJy8s0FiuXQpWmj//ld1FYuQgixrrWKA mX4S5SM1ghnrsyDJjsZ2HSFMI2Kh9CcfnXZpCN4gUfIykUjIC3nJ70EjIOVQrr2/nvKk 1rwU5wfmV1PbJLr6Af+W3YIcEkelanw3yeDQURyinFfDdPScrB/33dAfi710gl6IF4cl M/yOs+oXX/jEXlpLVR0Lp66s8W+zYXdmfCnqQYadLi0qXgqwJ5UKzgQF1i7L+FK1Uccx +VQaq8pJTdnwUGtGnv6/7d0lY4XprtZPRo0PyyusBqs5by/Qg/wkvzCdA+OHzDex2c93 HBmw== 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=gco2A55kbF9wAwlYgjxkY/B5YIGzupNeVHr8a3eo2r0=; b=fb971jd/lDwzhI/6jebBkYn79/XPWjQ6x84O5mkLOyAxIrNCUDTO00E2v6WJMJjN33 EbmuirjyDgPA5XSvZu0mQ63tr7dd06sYDfS22R4PV9lYGIAnOYUBi4dRGlYxltcTSZjl XMTQ03LbEcZ9nM/KYgfBqD8gY3JTle7P0nQ4g5Ay7to3sTsgYKGdz+8NHNQ6A4f6LO4Z +iL6B1nm916KWB4zFVGjVs9GdyBgAUJtjKSu7gZ87ctNOOhOGZeqxZJyMY7D0ANBDNc6 rCKu0FplIwzjg+JeRJvF+A3EeGerBlggTi2Md7EIV2ap+d8RWk7aAWiTIETsEi9Vj8Jx EC4A== 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 n11si1714750qvq.32.2019.03.14.07.44.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Mar 2019 07:44:50 -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-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1CD77C0AC351; Thu, 14 Mar 2019 14:44:49 +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 E6E3A6A97B; Thu, 14 Mar 2019 14:44:48 +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 9D574181A26B; Thu, 14 Mar 2019 14:44:48 +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 x2EEikrp024637 for ; Thu, 14 Mar 2019 10:44:46 -0400 Received: by smtp.corp.redhat.com (Postfix) id 1915260FD6; Thu, 14 Mar 2019 14:44:46 +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 A496C60F89; Thu, 14 Mar 2019 14:44:45 +0000 (UTC) From: Cole Robinson To: libvirt-list@redhat.com Date: Thu, 14 Mar 2019 10:44:09 -0400 Message-Id: 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 16/21] tests: qemuxml2argv: centralize CAPS suffix building 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.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Thu, 14 Mar 2019 14:44:49 +0000 (UTC) Signed-off-by: Cole Robinson --- tests/qemuxml2argvtest.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 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 b1c18c6c09..4b34bbcb63 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -786,12 +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, \ - arch, capsfile, stripmachinealiases, ...) \ +# define DO_TEST_CAPS_INTERNAL(_name, arch, ver, \ + capsfile, stripmachinealiases, ...) \ do { \ static struct testInfo info = { \ .name = _name, \ - .suffix = "." _suffix, \ + .suffix = "." arch "-" ver, \ }; \ if (!(info.qemuCaps = qemuTestParseCapabilitiesArch(virArchFromString(arch), \ capsfile))) \ @@ -801,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 "." arch "-" ver, \ testCompareXMLToArgv, &info) < 0) \ ret = -1; \ virObjectUnref(info.qemuCaps); \ @@ -810,8 +810,8 @@ mymain(void) # define TEST_CAPS_PATH abs_srcdir "/qemucapabilitiesdata/caps_" # define DO_TEST_CAPS_ARCH_VER_FULL(name, arch, ver, ...) \ - DO_TEST_CAPS_INTERNAL(name, arch "-" ver, \ - arch, TEST_CAPS_PATH ver "." arch ".xml", false, \ + DO_TEST_CAPS_INTERNAL(name, arch, ver, \ + TEST_CAPS_PATH ver "." arch ".xml", false, \ __VA_ARGS__) # define DO_TEST_CAPS_ARCH_VER(name, arch, ver) \ @@ -821,7 +821,7 @@ mymain(void) DO_TEST_CAPS_ARCH_VER(name, "x86_64", ver) # define DO_TEST_CAPS_ARCH_LATEST_FULL(name, arch, ...) \ - DO_TEST_CAPS_INTERNAL(name, arch "-latest", arch, \ + DO_TEST_CAPS_INTERNAL(name, arch, "latest", \ virHashLookup(capslatest, arch), true, \ __VA_ARGS__)