From nobody Sat May 4 23:03:42 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1573571436; cv=none; d=zoho.com; s=zohoarc; b=D5vcmma16sVjGQ2Jh8BKMuzuXVmpR0GaCF4QhS+4AmNrvbcTT791FzLmvY05MoPtEKDF6ZbBvmz9xwZ98CLZyLkjZyfQ/hxA155fyTp40UGS/Kczn0e6UwmYNe8OOwq2XA9m/FXwtEj4XBDrlkx0Ke2exO8RYYMV5jwsIQd4LJY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1573571436; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=CAviVOr4p4TboGRMmEt4tsjHOL3FJWkY0jLf7mWfJgM=; b=mA8xt4D7hYGRgKbWBOD/i5VgZTU8h4+x2MFLTRGWzymHE6D4F4ynoHbMMIZR9UxZ4kYRALGi8W5wMY6cTyQkKNL2TEchgLe0TP0zpXL/GUM8N4Lyoxt1tlx1RcbFxyNQ1nksJUVcG+KA+HqPI5XkyXW7bogvLM3tUBgWupybYCc= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 157357143620414.009211485433866; Tue, 12 Nov 2019 07:10:36 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-12-QaZqCwrTP3qGW-2KCzdG1Q-1; Tue, 12 Nov 2019 10:10:33 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 53827801E6B; Tue, 12 Nov 2019 15:10:28 +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 2B5F260173; Tue, 12 Nov 2019 15:10:28 +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 E0E994E562; Tue, 12 Nov 2019 15:10:27 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xACFAQ1C005261 for ; Tue, 12 Nov 2019 10:10:26 -0500 Received: by smtp.corp.redhat.com (Postfix) id C6D0A28D1E; Tue, 12 Nov 2019 15:10:26 +0000 (UTC) Received: from ridgehead.redhat.com (unknown [10.43.2.116]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2AD5A816E; Tue, 12 Nov 2019 15:10:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1573571435; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=CAviVOr4p4TboGRMmEt4tsjHOL3FJWkY0jLf7mWfJgM=; b=LmZBB4Gg5wwUVhld1/L1t9fN3JyejiSTzOWaRmGEUDOGCc8AP0CtQIcpwvSlxYwhr2D7U2 Gb/ddNWa6h0RwwJKOsUXiCDCYRMHcpWRbdpaLhM4ir3NR/1MbdGF0/PpEZxS6rrEp1VjRe YO3JZBIVR/C1mTFbq4GSB9xAbdukhyM= From: Erik Skultety To: libvir-list@redhat.com Date: Tue, 12 Nov 2019 16:10:18 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Cc: Erik Skultety Subject: [libvirt] [tck PATCH 1/3] hooks: Add systemd detection 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.11 X-MC-Unique: QaZqCwrTP3qGW-2KCzdG1Q-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" The hooks assume System V. On RPM-based distros, there's the initscripts package introducing the 'service' command mapping the old style syntax to the systemd format. However, we can't assume this will be the case all the time, so some kind of detection of the init system would prevent test failures originating in the hooks because of the 'service' command missing. --- lib/Sys/Virt/TCK/Hooks.pm | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/lib/Sys/Virt/TCK/Hooks.pm b/lib/Sys/Virt/TCK/Hooks.pm index 7d35072..ef3403d 100644 --- a/lib/Sys/Virt/TCK/Hooks.pm +++ b/lib/Sys/Virt/TCK/Hooks.pm @@ -48,6 +48,13 @@ sub new { return $self; } =20 +sub have_systemd { + my $rc =3D ((system "command -pv systemctl > /dev/null") >> 8) && 1; + + # shell return codes are inverted, IOW 0 is True, 1 is False + return !$rc; +} + sub log_name { my $self =3D shift; my $log_name =3D shift; @@ -70,7 +77,13 @@ sub expect_result { =20 sub libvirtd_status { my $self =3D shift; - my $status =3D `service libvirtd status`; + my $status; + + if (have_systemd()) { + $status =3D `systemctl status libvirtd`; + } else { + $status =3D `service libvirtd status`; + } =20 if ($status =3D~ /stopped|unused|inactive/) { $self->{libvirtd_status} =3D 'stopped'; @@ -238,10 +251,17 @@ sub cleanup { sub service_libvirtd { my $self =3D shift; my $action =3D $self->{action}; + my $cmd; =20 truncate $self->{log_name}, 0 if -f $self->{log_name}; =20 - die "failed on $action daemon" if system "service libvirtd $action"; + if (have_systemd()) { + $cmd =3D "systemctl $action libvirtd"; + } else { + $cmd =3D "service libvirtd $action"; + } + + die "failed on $action daemon" if system $cmd; =20 $self->libvirtd_status; } --=20 2.23.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sat May 4 23:03:42 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1573571437; cv=none; d=zoho.com; s=zohoarc; b=aKm1hmHnPoD+cz+wNYDKlt+Yd9iL+0ESDPbcHTwUgWPHnytrEEKok+DXRPfq0298RCuzvaqvStBixPIM4SoACOXKhgNOqdN2xw93apZKrjRmjvZ9DhLG1b+5FtcQtQZXfzAmNGoJHvtlFBv3mek9sbUgHtRQksDDO2jyigh1Wz4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1573571437; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=+3ZcmdrsXORaEcOw/qL8KFh9Zkq4FhziELzAcdBKbmk=; b=iXtinvLX5XKw60lG9FPIpWyMLKYTNp43aDnkXqTzPnrLJ0hexnGQdacvA3SC+Dt9yrBSMEb6dOVbQs4TJr9lxhik9FhZ+qGNmId+lt6lURhPYTNTPbgEt95cHgXd79wRjjjuRAYj/wLxqcb4eUu3a5lmxZSMhO7eiSd4SITAEaI= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 157357143778287.59133822283229; Tue, 12 Nov 2019 07:10:37 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-62-UBRMEeMaPbulCo5uZbCGTQ-1; Tue, 12 Nov 2019 10:10:35 -0500 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5D5DB477; Tue, 12 Nov 2019 15:10:30 +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 3659D101E814; Tue, 12 Nov 2019 15:10:30 +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 E7C994E566; Tue, 12 Nov 2019 15:10:29 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xACFARiE005271 for ; Tue, 12 Nov 2019 10:10:27 -0500 Received: by smtp.corp.redhat.com (Postfix) id BC5A08185; Tue, 12 Nov 2019 15:10:27 +0000 (UTC) Received: from ridgehead.redhat.com (unknown [10.43.2.116]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2064828D2A; Tue, 12 Nov 2019 15:10:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1573571436; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=+3ZcmdrsXORaEcOw/qL8KFh9Zkq4FhziELzAcdBKbmk=; b=MoTtP6RvHAdtUmlxFtAFIC7H2wFNeeyi+DdMUksafCjJ0UR44lOL4+KVLR/9OKVs9LX+rm KnuDXrc+HsSx9D9aVsro2fDNf4zjO5VWDi7XTjxHt8gnOhPGV9gArTotAwyTAnEyhIw1my LIDIQJeFEr6gMbyyjfkNXIJK6YT0Y7k= From: Erik Skultety To: libvir-list@redhat.com Date: Tue, 12 Nov 2019 16:10:19 +0100 Message-Id: <494b3584ac29738809d511075e1737481b3c556c.1573571378.git.eskultet@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Cc: Erik Skultety Subject: [libvirt] [tck PATCH 2/3] hooks: Refresh the service status after performing an action 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-MC-Unique: UBRMEeMaPbulCo5uZbCGTQ-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Presumably, the original intent of the code was to query the status of the service to refresh the internal state variable, but the intended method was never called because of a typo. --- lib/Sys/Virt/TCK/Hooks.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Sys/Virt/TCK/Hooks.pm b/lib/Sys/Virt/TCK/Hooks.pm index ef3403d..a3615e4 100644 --- a/lib/Sys/Virt/TCK/Hooks.pm +++ b/lib/Sys/Virt/TCK/Hooks.pm @@ -263,7 +263,7 @@ sub service_libvirtd { =20 die "failed on $action daemon" if system $cmd; =20 - $self->libvirtd_status; + $self->libvirtd_status(); } =20 sub compare_log { --=20 2.23.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sat May 4 23:03:42 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1573571466; cv=none; d=zoho.com; s=zohoarc; b=Cy0ZPsz9BbCkr6xRQyJ6C19sw++0kW4romDajpsHtoEI7s5uWQIg4nt3rtD5RK20IY3/TCaU1/+DFD3lTfAdTj/ge3qh5CIA+cilCTJOHMo7R1AqcRRQiGXiEeWRTCxmc4yd+QfulGlyqVzbpBFF8vQgPPfIz2N9C2iuf6FRZJA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1573571466; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=RG0DkajEoWCN7/2WRHuSI8oneNZgEY+CgHgMVKP4iwg=; b=Gw07o/YlXwtAfimVWsjPWem+k5ozTYZ6lvb2QivR7vMYJhJVFKwddhmBqWqpYzgARHU1YDBNtFMeHLSE7nUCmZ9k32BR0JcO8TjSH8yFzxsRIsbutNqnWo+tcd27n0I3gcVsKdFI8Jz297xbjJJH2tfHHtzVSsuPzf5TN7JusP0= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1573571466135255.2065351021489; Tue, 12 Nov 2019 07:11:06 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-182-HnTRQ6e-Nbyy3UclQVfLGg-1; Tue, 12 Nov 2019 10:10:38 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 11A88801E4E; Tue, 12 Nov 2019 15:10:32 +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 E1A6C60173; Tue, 12 Nov 2019 15:10:31 +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 96F1D4E56E; Tue, 12 Nov 2019 15:10:31 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xACFAST8005280 for ; Tue, 12 Nov 2019 10:10:28 -0500 Received: by smtp.corp.redhat.com (Postfix) id B358E816E; Tue, 12 Nov 2019 15:10:28 +0000 (UTC) Received: from ridgehead.redhat.com (unknown [10.43.2.116]) by smtp.corp.redhat.com (Postfix) with ESMTP id 16DE98185; Tue, 12 Nov 2019 15:10:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1573571465; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=RG0DkajEoWCN7/2WRHuSI8oneNZgEY+CgHgMVKP4iwg=; b=HqfLSUn0JhTzUJAte2myOUzJnj/pnUm9GLs7LjaYCGRMklNcHU43103Yk/Ps0+c3JPi4CY tT8NwfNuxnhDsjmHg6VLwwznYIqljnk0LBr6etEyTHlsfgTedHeV67iFn3Ql2iL93/kPKO Ylkv6KpnoAGbaVjxVa8BwXB8wNh/1y8= From: Erik Skultety To: libvir-list@redhat.com Date: Tue, 12 Nov 2019 16:10:20 +0100 Message-Id: <5d33ff9ea3b526fbfe1251d9d9b7098923ce04ee.1573571378.git.eskultet@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Cc: Erik Skultety Subject: [libvirt] [tck PATCH 3/3] hooks: Use internal variable holding the state of the libvirtd service 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.11 X-MC-Unique: HnTRQ6e-Nbyy3UclQVfLGg-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Rather than assuming the existence of the 'service' command, use the object variable holding the current state of the libvirtd service which got populated right after we performed the tested action on the service. Reviewed-by: Daniel P. Berrang=C3=A9 --- scripts/hooks/051-daemon-hook.t | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/hooks/051-daemon-hook.t b/scripts/hooks/051-daemon-hoo= k.t index 82cedee..b66dde0 100644 --- a/scripts/hooks/051-daemon-hook.t +++ b/scripts/hooks/051-daemon-hook.t @@ -85,7 +85,7 @@ SKIP: { ok($hook->compare_log(), "$hook->{name} is invoked correctly while $ho= ok->{action} libvirtd"); =20 diag "check if libvirtd is stopped"; - ok(`service libvirtd status` =3D~ /stopped|unused|inactive/, "libvirtd= is stopped"); + ok($hook->{libvirtd_status} =3D~ /stopped|unused|inactive/, "libvirtd = is stopped"); =20 # start libvirtd $hook->action('start'); @@ -110,7 +110,7 @@ SKIP: { ok($hook->compare_log(), "$hook->{name} is invoked correctly while $ho= ok->{action} libvirtd"); =20 diag "check if libvirtd is still running"; - ok(`service libvirtd status` =3D~ /running/, "libvirtd is running"); + ok($hook->{libvirtd_status} =3D~ /running/, "libvirtd is running"); =20 # restart libvirtd $hook->action('restart'); @@ -135,7 +135,7 @@ SKIP: { ok($hook->compare_log(), "$hook->{name} is invoked correctly while $ho= ok->{action} libvirtd"); =20 diag "check if libvirtd is still running"; - ok(`service libvirtd status` =3D~ /running/, "libvirtd is running"); + ok($hook->{libvirtd_status} =3D~ /running/, "libvirtd is running"); =20 # reload libvirtd $hook->action('reload'); @@ -160,7 +160,7 @@ SKIP: { ok($hook->compare_log(), "$hook->{name} is invoked correctly while $ho= ok->{action} libvirtd"); =20 diag "check if libvirtd is still running"; - ok(`service libvirtd status` =3D~ /running/, "libvirtd is running"); + ok($hook->{libvirtd_status} =3D~ /running/, "libvirtd is running"); =20 $hook->cleanup(); =20 --=20 2.23.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list