X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=tests%2Ftest-copy-file.sh;h=c63f380dd5bf91b477cd528aeca133ac638c3d89;hb=9d196fad055a448c5732a8e950cc044b353d2615;hp=bf71b3b1338cbbfaa067e789546ad7a39a09078c;hpb=4156b9e2b3b72c3050f9f9af2851980743b5cb16;p=gnulib.git diff --git a/tests/test-copy-file.sh b/tests/test-copy-file.sh index bf71b3b13..c63f380dd 100755 --- a/tests/test-copy-file.sh +++ b/tests/test-copy-file.sh @@ -85,8 +85,14 @@ cd "$builddir" || acl_flavor=hpux else if (getacl tmpfile0 >/dev/null) 2>/dev/null; then - # Tru64. - acl_flavor=osf1 + # Tru64, NonStop Kernel. + if (getacl -m tmpfile0 >/dev/null) 2>/dev/null; then + # Tru64. + acl_flavor=osf1 + else + # NonStop Kernel. + acl_flavor=nsk + fi else if (aclget tmpfile0 >/dev/null) 2>/dev/null; then # AIX. @@ -126,7 +132,7 @@ cd "$builddir" || cmp tmpaclout1 tmpaclout2 > /dev/null } ;; - osf1) + osf1 | nsk) func_test_same_acls () { getacl "$1" | sed -e "s/$1/FILENAME/g" > tmpaclout1 @@ -405,6 +411,50 @@ cd "$builddir" || ;; + nsk) + + # Set an ACL for a user. + setacl -m user:$auid:1 tmpfile0 + + func_test_copy tmpfile0 tmpfile2 + + # Set an ACL for a group. + setacl -m group:$agid:4 tmpfile0 + + func_test_copy tmpfile0 tmpfile3 + + # Set an ACL for other. + setacl -m other:4 tmpfile0 + + func_test_copy tmpfile0 tmpfile4 + + # Remove the ACL for the user. + setacl -d user:$auid tmpfile0 + + func_test_copy tmpfile0 tmpfile5 + + # Remove the ACL for the group. + setacl -d group:$agid tmpfile0 + + func_test_copy tmpfile0 tmpfile6 + + # Delete all optional ACLs. + setacl -m user:$auid:1 tmpfile0 + setacl -s user::6,group::0,class:7,other:0 tmpfile0 + + func_test_copy tmpfile0 tmpfile8 + + # Copy ACLs from a file that has no ACLs. + echo > tmpfile9 + chmod a+x tmpfile9 + getacl tmpfile9 > tmpaclout0 + setacl -f tmpaclout0 tmpfile0 + rm -f tmpfile9 + + func_test_copy tmpfile0 tmpfile9 + + ;; + aix) # Set an ACL for a user.