Whamcloud - gitweb
LU-7483 tests: sanity test_103a misc test in acl corrected 22/21722/4
authorSaurabh Tandan <saurabh.tandan@intel.com>
Thu, 4 Aug 2016 19:22:45 +0000 (12:22 -0700)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 15 Aug 2016 21:11:50 +0000 (21:11 +0000)
sanity test_103a was failing under SELinux enabled client
throwing misc test failed error message. With the previous
command "ls -dl d/l | awk 'sub(/\\./, "", $1); {print $1}'"
the output consisted of 2 rows which was causing the failure.
The issue is mentioned in the comments section of LU-7483.

The solution was to filter the results using
"ls -dl d/l | awk '{ sub(/\\.$/, "", $1); print $1 }'"
instead and have the desired result. Results for successfully
run sanity test_103a under SELinux enabled client environment
can be found in the ticket.

Test-Parameters: trivial testlist=sanity,sanity
Signed-off-by: Saurabh Tandan <saurabh.tandan@intel.com>
Change-Id: I3fcd60161873040b66d7004fb1cf682b41a0b8d9
Reviewed-on: http://review.whamcloud.com/21722
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/tests/acl/misc.test

index d8ace57..aa8b595 100644 (file)
@@ -248,12 +248,13 @@ Add some users and groups
        > default:group::r-x
        > default:mask::r-x
        > default:other::---
        > default:group::r-x
        > default:mask::r-x
        > default:other::---
-       > 
-        
+       >
 Symlink in directory with default ACL?
 Symlink in directory with default ACL?
-        
+# Need to remove trailing '.' when SELinux is enabled
+
        $ ln -s d d/l
        $ ln -s d d/l
-       $ ls -dl d/l | awk 'sub(/\\./, "", $1); {print $1}'
+       $ ls -dl d/l | awk '{ sub(/\\.$/, "", $1); print $1 }'
        > lrwxrwxrwx
 
        $ ls -dl -L d/l | awk '{print $1}'
        > lrwxrwxrwx
 
        $ ls -dl -L d/l | awk '{print $1}'