summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrory prendergast <rory.prendergast@tanium.com>2017-03-02 23:10:09 -0800
committerrory prendergast <rory.prendergast@tanium.com>2017-03-02 23:10:09 -0800
commit2509736acd8ce63c02ece507bb1e43efaef0a9f3 (patch)
treedea9c3e69f079a0936dfe6ef2348dc90cc873d6f
parent741af51e6ae03f88167e4c31dddd5b16c52707b6 (diff)
downloadxattr-2509736acd8ce63c02ece507bb1e43efaef0a9f3.tar.gz
Fix tests which fail if SELinux enabled and TESTDIR or files within have SELinux extended attr
-rw-r--r--xattr/tests/test_xattr.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/xattr/tests/test_xattr.py b/xattr/tests/test_xattr.py
index c63a240..c22efec 100644
--- a/xattr/tests/test_xattr.py
+++ b/xattr/tests/test_xattr.py
@@ -24,6 +24,10 @@ class BaseTestXattr(object):
d['SUNWattr_ro'] = x['SUNWattr_ro']
d['SUNWattr_rw'] = x['SUNWattr_rw']
+ # SELinux systems use an attribute which must be accounted for
+ if sys.platform.startswith('linux') and 'security.selinux' in x:
+ d['security.selinux'] = x['security.selinux']
+
self.assertEqual(list(x.keys()), list(d.keys()))
self.assertEqual(list(x.list()), list(d.keys()))
self.assertEqual(dict(x), d)