...
 
Commits (3)
...@@ -34,7 +34,7 @@ License: GPLv2 ...@@ -34,7 +34,7 @@ License: GPLv2
Source: http://libvirt.org/sources/tck/%{appname}-v%{version}.tar.gz Source: http://libvirt.org/sources/tck/%{appname}-v%{version}.tar.gz
Url: http://libvirt.org/ Url: http://libvirt.org/
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
Requires: libvirt >= 4.4.0 Requires: libvirt >= 3.9.0
%if 0%{?fedora} || 0%{?rhel} > 7 %if 0%{?fedora} || 0%{?rhel} > 7
BuildRequires: perl-interpreter BuildRequires: perl-interpreter
BuildRequires: perl-generators BuildRequires: perl-generators
......
...@@ -244,7 +244,7 @@ runTest() ...@@ -244,7 +244,7 @@ runTest()
# Test runs for a maximum of 5 minutes # Test runs for a maximum of 5 minutes
now=`date +%s` now=`date +%s`
test_end=$(($now + 5 * 60)) test_end=$(($now + 10 * 60))
while :; while :;
do do
......
...@@ -32,10 +32,14 @@ use Test::More tests => 6; ...@@ -32,10 +32,14 @@ use Test::More tests => 6;
use Sys::Virt::TCK; use Sys::Virt::TCK;
use Sys::Virt::TCK::SELinux; use Sys::Virt::TCK::SELinux;
my $selinux_status = "";
my $tck = Sys::Virt::TCK->new(); my $tck = Sys::Virt::TCK->new();
my $conn = eval { $tck->setup(); }; my $conn = eval { $tck->setup(); };
BAIL_OUT "failed to setup test harness: $@" if $@; BAIL_OUT "failed to setup test harness: $@" if $@;
END { $tck->cleanup if $tck; } END {
system("setenforce", "1") if ($selinux_status eq "Enforcing");
$tck->cleanup if $tck;
}
my $info; my $info;
eval { eval {
...@@ -58,6 +62,13 @@ SKIP: { ...@@ -58,6 +62,13 @@ SKIP: {
->disk(src => $disk, dst => "vdb", type => "file") ->disk(src => $disk, dst => "vdb", type => "file")
->as_xml; ->as_xml;
chomp($selinux_status = `getenforce`);
diag "selinux is $selinux_status";
if ($selinux_status eq "Enforcing") {
diag "Temporarily setting SELinux to Permissive mode";
system("setenforce", "0");
}
diag "Creating a new transient domain"; diag "Creating a new transient domain";
my $dom; my $dom;
ok_domain(sub { $dom = $conn->create_domain($xml) }, "created transient domain object"); ok_domain(sub { $dom = $conn->create_domain($xml) }, "created transient domain object");
......