----- Original Message -----
From: "David Lehman" <dlehman(a)redhat.com>
To: anaconda-patches(a)lists.fedorahosted.org
Sent: Tuesday, November 11, 2014 4:32:53 PM
Subject: [PATCH 6/6] Don't run selinux context tests when selinux is disabled.
---
tests/formats_test/selinux_test.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/tests/formats_test/selinux_test.py
b/tests/formats_test/selinux_test.py
index 14433da..83c38d6 100755
--- a/tests/formats_test/selinux_test.py
+++ b/tests/formats_test/selinux_test.py
@@ -9,6 +9,7 @@ from tests import loopbackedtestcase
import blivet.formats.fs as fs
from blivet.size import Size
+(a)unittest.skipUnless(selinux.is_selinux_enabled() == 1, "SELinux is
disabled")
class SELinuxContextTestCase(loopbackedtestcase.LoopBackedTestCase):
"""Testing SELinux contexts.
"""
--
1.9.3
_______________________________________________
anaconda-patches mailing list
anaconda-patches(a)lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
This can't be wrong, so ack.
But it can still fail when selinux is enabled, as:
======================================================================
FAIL: testMountingXFS (formats_test.selinux_test.SELinuxContextTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/mulhern/blivet/tests/formats_test/selinux_test.py", line 78, in
testMountingXFS
self.assertEqual(root_selinux_context[1], 'system_u:object_r:unlabeled_t:s0')
AssertionError: 'system_u:object_r:file_t:s0' !=
'system_u:object_r:unlabeled_t:s0'
I guess it'll do fine in Jenkins, though, which presumably does not have selinux
enabled.
- mulhern