[libvirt-tck] Fix labels in SELINUX tests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
attached patch is needed to properly skip the SELinux tests if SELinux
isn't enabled.
Cheers,
 -- Guido
>From 8647fef32cdc13636ee86a937f854cdb931added Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@xxxxxxxxxxx>
Date: Fri, 7 Oct 2011 16:31:42 +0200
Subject: [PATCH] Use SKIP instead of SELINUX as label

otherwise skipping the tests fails with:

Label not found for "last SKIP" at /usr/share/perl5.10/Test/More.pm line 1176
---
 scripts/selinux/050-dynamic-relabel-yes.t |    2 +-
 scripts/selinux/055-dynamic-base-label.t  |    2 +-
 scripts/selinux/100-static-relabel-no.t   |    2 +-
 scripts/selinux/105-static-relabel-fail.t |    2 +-
 scripts/selinux/110-static-relabel-yes.t  |    2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/scripts/selinux/050-dynamic-relabel-yes.t b/scripts/selinux/050-dynamic-relabel-yes.t
index 614169e..6a75f92 100644
--- a/scripts/selinux/050-dynamic-relabel-yes.t
+++ b/scripts/selinux/050-dynamic-relabel-yes.t
@@ -43,7 +43,7 @@ eval {
     $info = $conn->get_node_security_model();
 };
 
-SELINUX: {
+SKIP: {
     skip "Only relevant to SELinux hosts", 6 unless $info && $info->{model} eq "selinux";
 
     my $disk = $tck->create_sparse_disk("selinux", "tck", 50);
diff --git a/scripts/selinux/055-dynamic-base-label.t b/scripts/selinux/055-dynamic-base-label.t
index 6bf2a7b..271c2e9 100644
--- a/scripts/selinux/055-dynamic-base-label.t
+++ b/scripts/selinux/055-dynamic-base-label.t
@@ -44,7 +44,7 @@ eval {
     $info = $conn->get_node_security_model();
 };
 
-SELINUX: {
+SKIP: {
     skip "Only relevant to SELinux hosts", 10 unless $info && $info->{model} eq "selinux";
 
     my $disk = $tck->create_sparse_disk("selinux", "tck", 50);
diff --git a/scripts/selinux/100-static-relabel-no.t b/scripts/selinux/100-static-relabel-no.t
index 466fd21..30db172 100644
--- a/scripts/selinux/100-static-relabel-no.t
+++ b/scripts/selinux/100-static-relabel-no.t
@@ -42,7 +42,7 @@ eval {
     $info = $conn->get_node_security_model();
 };
 
-SELINUX: {
+SKIP: {
     skip "Only relevant to SELinux hosts", 6 unless $info && $info->{model} eq "selinux";
 
     my $disk = $tck->create_sparse_disk("selinux", "tck", 50);
diff --git a/scripts/selinux/105-static-relabel-fail.t b/scripts/selinux/105-static-relabel-fail.t
index 4d8b6ed..08ef429 100644
--- a/scripts/selinux/105-static-relabel-fail.t
+++ b/scripts/selinux/105-static-relabel-fail.t
@@ -44,7 +44,7 @@ eval {
     $info = $conn->get_node_security_model();
 };
 
-SELINUX: {
+SKIP: {
     skip "Only relevant to SELinux hosts", 2 unless $info && $info->{model} eq "selinux";
 
     my $disk = $tck->create_sparse_disk("selinux", "tck", 50);
diff --git a/scripts/selinux/110-static-relabel-yes.t b/scripts/selinux/110-static-relabel-yes.t
index 040df9f..deba314 100644
--- a/scripts/selinux/110-static-relabel-yes.t
+++ b/scripts/selinux/110-static-relabel-yes.t
@@ -43,7 +43,7 @@ eval {
     $info = $conn->get_node_security_model();
 };
 
-SELINUX: {
+SKIP: {
     skip "Only relevant to SELinux hosts", 5 unless $info && $info->{model} eq "selinux";
 
     my $disk = $tck->create_sparse_disk("selinux", "tck", 50);
-- 
1.7.6.3

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]