From patchwork Thu Mar 14 14:43:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cole Robinson X-Patchwork-Id: 160343 Delivered-To: patch@linaro.org Received: by 2002:a02:5cc1:0:0:0:0:0 with SMTP id w62csp15595040jad; Thu, 14 Mar 2019 07:44:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqxlh3A392RQZAPDAVf3u+m5lbSH57DpC19w7shfEGeyER2Iu9TdvHHZCXCc+oWWCdXuBmeo X-Received: by 2002:ac8:5354:: with SMTP id d20mr17863682qto.362.1552574680735; Thu, 14 Mar 2019 07:44:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552574680; cv=none; d=google.com; s=arc-20160816; b=wVJTHi5wG+AQqnPeg3V28cn0B5CNfPs5uYmNooDAphPzqUXlVgEceVqSP5pEWvoIdo dYKIaPb10vhfi0aGi18gHDacA6PvIKpxkdOL85hEUhWSvQetCmmUS1nkugmGJ5vHWLae H/c4goGX12RHVySirFKp+U1VSZvGsd8r1Fb6+LVhUsw63NsVEQzByaH6JKuIrcP4MeK+ ZeDjYf2pXEsbIs/wqpKEFIRYCATSrJ68J8663+pk/MfobdYb/dWpzoaUcKdUetrtDigy UnCIPpnYDweWWh7NwSJ/1jt3hgPkCDnyq4sDFMFph/uvcC6iQEmUsDZ4aWSJzStBscq1 7sTg== 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=NrrQ3oSiW7oS8c5yn65u44dQq1yecIhXCiXne7cp7yw=; b=ZJTJWo2aeHPpjs2mSJasoox1O6Ot95DgEIv0DCr24tOYgJR3E8Z7/NMSvcpfnbuEtX Xmrg/P4LFkzaEDvyDdUuBKhzqlWknUeGJSILZk9v0vEqlvLsl32QIOQ4hYGF3zxkKPyE 358oqZacnODYE+8NCAnDhKBnAKmlSuegYlIDCqcCrKZ1795iQE+5AnHxZwz0OURbXSSc xm5qJPNDwTwmNm5uCZVDHCfUWP1P5bFcddj8Oj3k0yb+FqHq5mqkEY6HiZf5TSzCISQ1 RS6tZICQk9hBmSLih3ZzgZ/LWVrd71i/vw3zDrNcMhvs0+HMsK1dlbzsKE3cOMIDZA5U 3Fyg== 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 x26si926558qth.313.2019.03.14.07.44.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Mar 2019 07:44:40 -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-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1FD0EC04AC5A; Thu, 14 Mar 2019 14:44:39 +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 E5D6D692A8; Thu, 14 Mar 2019 14:44:38 +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 A504D3FAF4; Thu, 14 Mar 2019 14:44:38 +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 x2EEiNrb024500 for ; Thu, 14 Mar 2019 10:44:23 -0400 Received: by smtp.corp.redhat.com (Postfix) id CF0CF60F89; Thu, 14 Mar 2019 14:44:23 +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 6AED760BE6; Thu, 14 Mar 2019 14:44:23 +0000 (UTC) From: Cole Robinson To: libvirt-list@redhat.com Date: Thu, 14 Mar 2019 10:43:57 -0400 Message-Id: <36d23d16670d4d11379c741401dbcb82087c3755.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 04/21] tests: qemuxml2argv: push ARG_QEMU_CAPS to callers 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.16 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:39 +0000 (UTC) This is necessary before we can start adding more optional parameter implementations to DO_TEST_FULL Signed-off-by: Cole Robinson --- tests/qemuxml2argvtest.c | 38 +++++++++++++++++++++++++------------- 1 file changed, 25 insertions(+), 13 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 0dba908c70..393d2399fa 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -842,8 +842,7 @@ mymain(void) }; \ if (testInitQEMUCaps(&info, gic) < 0) \ return EXIT_FAILURE; \ - if (testInfoSetArgs(&info, ARG_QEMU_CAPS, \ - __VA_ARGS__, QEMU_CAPS_LAST, ARG_END) < 0) \ + if (testInfoSetArgs(&info, __VA_ARGS__, QEMU_CAPS_LAST, ARG_END) < 0) \ return EXIT_FAILURE; \ if (virTestRun("QEMU XML-2-ARGV " name, \ testCompareXMLToArgv, &info) < 0) \ @@ -852,24 +851,29 @@ mymain(void) } while (0) # define DO_TEST(name, ...) \ - DO_TEST_FULL(name, NULL, -1, 0, 0, GIC_NONE, __VA_ARGS__) + DO_TEST_FULL(name, NULL, -1, 0, 0, GIC_NONE, \ + ARG_QEMU_CAPS, __VA_ARGS__) # define DO_TEST_GIC(name, gic, ...) \ - DO_TEST_FULL(name, NULL, -1, 0, 0, gic, __VA_ARGS__) + DO_TEST_FULL(name, NULL, -1, 0, 0, gic, \ + ARG_QEMU_CAPS, __VA_ARGS__) # define DO_TEST_FAILURE(name, ...) \ DO_TEST_FULL(name, NULL, -1, FLAG_EXPECT_FAILURE, \ - 0, GIC_NONE, __VA_ARGS__) + 0, GIC_NONE, \ + ARG_QEMU_CAPS, __VA_ARGS__) # define DO_TEST_PARSE_ERROR(name, ...) \ DO_TEST_FULL(name, NULL, -1, \ FLAG_EXPECT_PARSE_ERROR | FLAG_EXPECT_FAILURE, \ - 0, GIC_NONE, __VA_ARGS__) + 0, GIC_NONE, \ + ARG_QEMU_CAPS, __VA_ARGS__) # define DO_TEST_PARSE_FLAGS_ERROR(name, parseFlags, ...) \ DO_TEST_FULL(name, NULL, -1, \ FLAG_EXPECT_PARSE_ERROR | FLAG_EXPECT_FAILURE, \ - parseFlags, GIC_NONE, __VA_ARGS__) + parseFlags, GIC_NONE, \ + ARG_QEMU_CAPS, __VA_ARGS__) # define NONE QEMU_CAPS_LAST @@ -1707,12 +1711,17 @@ mymain(void) QEMU_CAPS_CCW_CSSID_UNRESTRICTED, QEMU_CAPS_DEVICE_VFIO_CCW); - DO_TEST_FULL("restore-v2", "exec:cat", 7, 0, 0, GIC_NONE, NONE); - DO_TEST_FULL("restore-v2-fd", "stdio", 7, 0, 0, GIC_NONE, NONE); - DO_TEST_FULL("restore-v2-fd", "fd:7", 7, 0, 0, GIC_NONE, NONE); - DO_TEST_FULL("migrate", "tcp:10.0.0.1:5000", -1, 0, 0, GIC_NONE, NONE); + DO_TEST_FULL("restore-v2", "exec:cat", 7, 0, 0, GIC_NONE, + ARG_QEMU_CAPS, NONE); + DO_TEST_FULL("restore-v2-fd", "stdio", 7, 0, 0, GIC_NONE, + ARG_QEMU_CAPS, NONE); + DO_TEST_FULL("restore-v2-fd", "fd:7", 7, 0, 0, GIC_NONE, + ARG_QEMU_CAPS, NONE); + DO_TEST_FULL("migrate", "tcp:10.0.0.1:5000", -1, 0, 0, GIC_NONE, + ARG_QEMU_CAPS, NONE); DO_TEST_FULL("migrate-numa-unaligned", "stdio", 7, 0, 0, GIC_NONE, + ARG_QEMU_CAPS, QEMU_CAPS_NUMA, QEMU_CAPS_OBJECT_MEMORY_RAM); @@ -1756,10 +1765,12 @@ mymain(void) DO_TEST("cpu-host-model-vendor", NONE); DO_TEST_FULL("cpu-host-model-fallback", NULL, -1, FLAG_SKIP_LEGACY_CPUS, 0, - GIC_NONE, NONE); + GIC_NONE, + ARG_QEMU_CAPS, NONE); DO_TEST_FULL("cpu-host-model-nofallback", NULL, -1, FLAG_SKIP_LEGACY_CPUS | FLAG_EXPECT_FAILURE, - 0, GIC_NONE, NONE); + 0, GIC_NONE, + ARG_QEMU_CAPS, NONE); DO_TEST("cpu-host-passthrough", QEMU_CAPS_KVM); DO_TEST_FAILURE("cpu-qemu-host-passthrough", QEMU_CAPS_KVM); @@ -2849,6 +2860,7 @@ mymain(void) QEMU_CAPS_PIIX3_USB_UHCI); DO_TEST_FULL("ppc64-usb-controller-qemu-xhci", NULL, -1, 0, VIR_DOMAIN_DEF_PARSE_ABI_UPDATE, GIC_NONE, + ARG_QEMU_CAPS, QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE, QEMU_CAPS_NEC_USB_XHCI, QEMU_CAPS_DEVICE_QEMU_XHCI);