From nobody Mon Feb 9 14:32:27 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1551371942335279.7308597299631; Thu, 28 Feb 2019 08:39:02 -0800 (PST) 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 97B661487EF; Thu, 28 Feb 2019 16:39:00 +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 7070C1001DE8; Thu, 28 Feb 2019 16:39:00 +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 3323B3FB30; Thu, 28 Feb 2019 16:39:00 +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 x1SGcsnb013986 for ; Thu, 28 Feb 2019 11:38:54 -0500 Received: by smtp.corp.redhat.com (Postfix) id DACB260C60; Thu, 28 Feb 2019 16:38:54 +0000 (UTC) Received: from kinshicho.redhat.com (unknown [10.40.206.38]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4034360C55 for ; Thu, 28 Feb 2019 16:38:54 +0000 (UTC) From: Andrea Bolognani To: libvir-list@redhat.com Date: Thu, 28 Feb 2019 17:38:46 +0100 Message-Id: <20190228163847.8883-3-abologna@redhat.com> In-Reply-To: <20190228163847.8883-1-abologna@redhat.com> References: <20190228163847.8883-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 2/3] tests: Use WHEN_BOTH in qemuxml2xml whenever possible 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: , Content-Transfer-Encoding: quoted-printable 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, 28 Feb 2019 16:39:01 +0000 (UTC) Content-Type: text/plain; charset="utf-8" There are a few cases where we are using either WHEN_ACTIVE or WHEN_INACTIVE even though WHEN_BOTH would work perfectly fine: for those, start using the simpler DO_TEST() macro. Signed-off-by: Andrea Bolognani Reviewed-by: J=C3=A1n Tomko --- ...ource-path.xml =3D> channel-unix-source-path-active.xml} | 3 +++ ...rce-path.xml =3D> channel-unix-source-path-inactive.xml} | 0 ...sk-active-commit.xml =3D> disk-active-commit-active.xml} | 0 ...-active-commit.xml =3D> disk-active-commit-inactive.xml} | 8 ++------ ...labelskip.xml =3D> seclabel-static-labelskip-active.xml} | 0 ...belskip.xml =3D> seclabel-static-labelskip-inactive.xml} | 7 ++----- tests/qemuxml2xmltest.c | 6 +++--- 7 files changed, 10 insertions(+), 14 deletions(-) copy tests/qemuxml2xmloutdata/{channel-unix-source-path.xml =3D> channel-u= nix-source-path-active.xml} (86%) rename tests/qemuxml2xmloutdata/{channel-unix-source-path.xml =3D> channel= -unix-source-path-inactive.xml} (100%) copy tests/qemuxml2xmloutdata/{disk-active-commit.xml =3D> disk-active-com= mit-active.xml} (100%) rename tests/qemuxml2xmloutdata/{disk-active-commit.xml =3D> disk-active-c= ommit-inactive.xml} (86%) copy tests/qemuxml2xmloutdata/{seclabel-static-labelskip.xml =3D> seclabel= -static-labelskip-active.xml} (100%) rename tests/qemuxml2xmloutdata/{seclabel-static-labelskip.xml =3D> seclab= el-static-labelskip-inactive.xml} (86%) diff --git a/tests/qemuxml2xmloutdata/channel-unix-source-path.xml b/tests/= qemuxml2xmloutdata/channel-unix-source-path-active.xml similarity index 86% copy from tests/qemuxml2xmloutdata/channel-unix-source-path.xml copy to tests/qemuxml2xmloutdata/channel-unix-source-path-active.xml index 2d8fa1e3ac..4c2a02b49a 100644 --- a/tests/qemuxml2xmloutdata/channel-unix-source-path.xml +++ b/tests/qemuxml2xmloutdata/channel-unix-source-path-active.xml @@ -22,14 +22,17 @@
+
+
+
diff --git a/tests/qemuxml2xmloutdata/channel-unix-source-path.xml b/tests/= qemuxml2xmloutdata/channel-unix-source-path-inactive.xml similarity index 100% rename from tests/qemuxml2xmloutdata/channel-unix-source-path.xml rename to tests/qemuxml2xmloutdata/channel-unix-source-path-inactive.xml diff --git a/tests/qemuxml2xmloutdata/disk-active-commit.xml b/tests/qemuxm= l2xmloutdata/disk-active-commit-active.xml similarity index 100% copy from tests/qemuxml2xmloutdata/disk-active-commit.xml copy to tests/qemuxml2xmloutdata/disk-active-commit-active.xml diff --git a/tests/qemuxml2xmloutdata/disk-active-commit.xml b/tests/qemuxm= l2xmloutdata/disk-active-commit-inactive.xml similarity index 86% rename from tests/qemuxml2xmloutdata/disk-active-commit.xml rename to tests/qemuxml2xmloutdata/disk-active-commit-inactive.xml index cc26af1096..b14345049d 100644 --- a/tests/qemuxml2xmloutdata/disk-active-commit.xml +++ b/tests/qemuxml2xmloutdata/disk-active-commit-inactive.xml @@ -1,4 +1,4 @@ - + QEMUGuest1 c7a5fdbd-edaf-9455-926a-d65c16db1809 219136 @@ -17,15 +17,11 @@ - + - - - -
diff --git a/tests/qemuxml2xmloutdata/seclabel-static-labelskip.xml b/tests= /qemuxml2xmloutdata/seclabel-static-labelskip-active.xml similarity index 100% copy from tests/qemuxml2xmloutdata/seclabel-static-labelskip.xml copy to tests/qemuxml2xmloutdata/seclabel-static-labelskip-active.xml diff --git a/tests/qemuxml2xmloutdata/seclabel-static-labelskip.xml b/tests= /qemuxml2xmloutdata/seclabel-static-labelskip-inactive.xml similarity index 86% rename from tests/qemuxml2xmloutdata/seclabel-static-labelskip.xml rename to tests/qemuxml2xmloutdata/seclabel-static-labelskip-inactive.xml index 7c448675e2..e705b5452c 100644 --- a/tests/qemuxml2xmloutdata/seclabel-static-labelskip.xml +++ b/tests/qemuxml2xmloutdata/seclabel-static-labelskip-inactive.xml @@ -1,4 +1,4 @@ - + QEMUGuest1 c7a5fdbd-edaf-9455-926a-d65c16db1809 219100 @@ -16,9 +16,7 @@ /usr/bin/qemu-system-i686 - - - +
@@ -38,6 +36,5 @@ - system_u:system_r:svirt_custom_t:s0:c192,c392 diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index b38cbd6994..59535e0f19 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -375,7 +375,7 @@ mymain(void) QEMU_CAPS_CCW); DO_TEST("disk-mirror-old", NONE); DO_TEST("disk-mirror", NONE); - DO_TEST_FULL("disk-active-commit", WHEN_ACTIVE, GIC_NONE, NONE); + DO_TEST("disk-active-commit", NONE); DO_TEST("graphics-listen-network", NONE); DO_TEST("graphics-vnc", NONE); DO_TEST("graphics-vnc-websocket", NONE); @@ -451,7 +451,7 @@ mymain(void) DO_TEST("channel-virtio", NONE); DO_TEST("channel-virtio-state", NONE); =20 - DO_TEST_FULL("channel-unix-source-path", WHEN_INACTIVE, GIC_NONE, NONE= ); + DO_TEST("channel-unix-source-path", NONE); =20 DO_TEST("hostdev-usb-address", NONE); DO_TEST("hostdev-pci-address", NONE); @@ -549,7 +549,7 @@ mymain(void) DO_TEST_FULL("seclabel-dynamic-labelskip", WHEN_INACTIVE, GIC_NONE, NO= NE); DO_TEST_FULL("seclabel-dynamic-relabel", WHEN_INACTIVE, GIC_NONE, NONE= ); DO_TEST("seclabel-static", NONE); - DO_TEST_FULL("seclabel-static-labelskip", WHEN_ACTIVE, GIC_NONE, NONE); + DO_TEST("seclabel-static-labelskip", NONE); DO_TEST("seclabel-none", NONE); DO_TEST("seclabel-dac-none", NONE); DO_TEST("seclabel-dynamic-none", NONE); --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list