Whamcloud - gitweb
b=23310 Partly matching the out message against the expected one to resolve the diffe...
authorFan Yong <Yong.Fan@sun.com>
Fri, 16 Jul 2010 14:31:18 +0000 (18:31 +0400)
committerMikhail Pershin <tappro@sun.com>
Fri, 16 Jul 2010 19:22:05 +0000 (23:22 +0400)
Partly matching the out message against the expected one to resolve the different output message format for getfacl/setfal on different Linux distributions.

i=tappro
i=wangyb

lustre/tests/acl/run
lustre/tests/acl/setfacl.test

index cfc8c05..05437d6 100755 (executable)
@@ -89,7 +89,7 @@ sub process_test($$$$) {
        my $nmax = (@$out > @$result) ? @$out : @$result;
        for (my $n=0; $n < $nmax; $n++) {
         if (!defined($out->[$n]) || !defined($result->[$n]) ||
        my $nmax = (@$out > @$result) ? @$out : @$result;
        for (my $n=0; $n < $nmax; $n++) {
         if (!defined($out->[$n]) || !defined($result->[$n]) ||
-            $out->[$n] ne $result->[$n]) {
+            ($result->[$n] !~ m/\Q$out->[$n]\E/)) {
                 $good = 0;
         }
        }
                 $good = 0;
         }
        }
index 2c10bd1..b503455 100644 (file)
@@ -111,16 +111,16 @@ Setfacl utility tests. Run these tests on a filesystem with ACL support.
        > 
        
        $ setfacl --test -x u: g
        > 
        
        $ setfacl --test -x u: g
-       > setfacl: g: Malformed access ACL `user:root:---,user:daemon:rw-,group::r-x,mask::rwx,other::---': Missing or wrong entry at entry 1
+       > g: Malformed access ACL `user:root:---,user:daemon:rw-,group::r-x,mask::rwx,other::---': Missing or wrong entry at entry 1
        
        $ setfacl --test -x u:x
        > setfacl: Option -x: Invalid argument near character 3
        
        $ setfacl -m d:u:root:rwx g
        
        $ setfacl --test -x u:x
        > setfacl: Option -x: Invalid argument near character 3
        
        $ setfacl -m d:u:root:rwx g
-       > setfacl: g: Only directories can have default ACLs
+       > g: Only directories can have default ACLs
        
        $ setfacl -x m g
        
        $ setfacl -x m g
-       > setfacl: g: Malformed access ACL `user::rwx,user:root:---,user:daemon:rw-,group::r-x,other::---': Missing or wrong entry at entry 5
+       > g: Malformed access ACL `user::rwx,user:root:---,user:daemon:rw-,group::r-x,other::---': Missing or wrong entry at entry 5
         setfacl --test -m d:u:daemon:rwx setfacl
         setfacl --test -n -m d:u:daemon:rwx setfacl
        
         setfacl --test -m d:u:daemon:rwx setfacl
         setfacl --test -n -m d:u:daemon:rwx setfacl