[PATCH] xfstests: filter selinux output in _acl_ls

Eric Sandeen sandeen at sandeen.net
Thu Jan 28 10:56:28 CST 2010


When selinux is on, ls -l gives us a "." to indicate selinux
attrs, which breaks some tests:

 === Test minimal ACE ===
 Setup file
--rwxrw-r-- id1 id2 file1
+-rwxrw-r--. id1 id2 file1

so filter that out.

Signed-off-by: Eric Sandeen <sandeen at sandeen.net>
---

Index: xfstests/common.attr
===================================================================
--- xfstests.orig/common.attr
+++ xfstests/common.attr
@@ -58,7 +58,10 @@ _acl_filter_id()
 #
 _acl_ls()
 {
-    ls -ln $* | awk '{ print $1, $3, $4, $NF }' | _acl_filter_id
+    ls -ln $* |	\
+    sed "s/\(.*\)\. /\1 /" | \
+    awk '{ print $1, $3, $4, $NF }' | \
+    _acl_filter_id
 } 
 
 #




More information about the xfs mailing list