From nobody Wed May 14 01:11:27 2025 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 1526921209563108.06047232938863; Mon, 21 May 2018 09:46:49 -0700 (PDT) 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 A5F7A3145192; Mon, 21 May 2018 16:46:47 +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 6D87E5C541; Mon, 21 May 2018 16:46:47 +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 D3F1C1801255; Mon, 21 May 2018 16:46:46 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w4LGkiCQ002734 for ; Mon, 21 May 2018 12:46:44 -0400 Received: by smtp.corp.redhat.com (Postfix) id 69ACF2023585; Mon, 21 May 2018 16:46:44 +0000 (UTC) Received: from t460.redhat.com (unknown [10.33.36.105]) by smtp.corp.redhat.com (Postfix) with ESMTP id 961A12023583; Mon, 21 May 2018 16:46:43 +0000 (UTC) From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Date: Mon, 21 May 2018 17:46:28 +0100 Message-Id: <20180521164631.7288-11-berrange@redhat.com> In-Reply-To: <20180521164631.7288-1-berrange@redhat.com> References: <20180521164631.7288-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-loop: libvir-list@redhat.com Subject: [libvirt] [tck PATCH v2 10/13] scripts: don't abort the entire test harness when libvirtd isn't running 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-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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.49]); Mon, 21 May 2018 16:46:48 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 It is reasonable to run TCK against a manually started libvirtd, so we should not abort the entire test suite. Just mark the hook scripts as skipped. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Laine Stump --- scripts/hooks/051-daemon-hook.t | 2 +- scripts/hooks/052-domain-hook.t | 14 +++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/scripts/hooks/051-daemon-hook.t b/scripts/hooks/051-daemon-hoo= k.t index aa7668b..82cedee 100644 --- a/scripts/hooks/051-daemon-hook.t +++ b/scripts/hooks/051-daemon-hook.t @@ -51,7 +51,7 @@ SKIP: { log_name =3D> '/tmp/daemon.log'); =20 $hook->libvirtd_status(); - BAIL_OUT "libvirtd is not running, Exit..." + skip "libvirtd is not running, Exit...", 12 if ($hook->{libvirtd_status} eq 'stopped'); =20 eval { $hook->prepare(); }; diff --git a/scripts/hooks/052-domain-hook.t b/scripts/hooks/052-domain-hoo= k.t index 07e4b23..c3a0b3f 100644 --- a/scripts/hooks/052-domain-hook.t +++ b/scripts/hooks/052-domain-hook.t @@ -49,17 +49,21 @@ SKIP: { skip "NOT using QEMU/LXC driver", 12 unless $uri eq "qemu:///system" or $uri eq "lxc:///"; =20 + my $hook_type =3D $uri eq "qemu:///system" ? 'qemu' : 'lxc'; + + my $hook =3D Sys::Virt::TCK::Hooks->new(type =3D> $hook_type, + conf_dir =3D> '/etc/libvirt/hook= s', + expect_result =3D> 0); + $hook->libvirtd_status(); + skip "libvirtd is not running, Exit...", 12 + if ($hook->{libvirtd_status} eq 'stopped'); + my $xml =3D $tck->generic_domain(name =3D> "tck")->as_xml; =20 diag "Creating a new persistent domain"; my $dom; ok_domain(sub { $dom =3D $conn->define_domain($xml) }, "created persis= tent domain object"); =20 - my $hook_type =3D $uri eq "qemu:///system" ? 'qemu' : 'lxc'; - - my $hook =3D Sys::Virt::TCK::Hooks->new(type =3D> $hook_type, - conf_dir =3D> '/etc/libvirt/hook= s', - expect_result =3D> 0); eval { $hook->prepare(); }; BAIL_OUT "failed to setup hooks testing ENV: $@" if $@; =20 --=20 2.17.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list