From: Yan, Zheng Date: Thu, 18 Sep 2014 04:04:29 +0000 (+0800) Subject: qa/workunits/fs/misc: Add a workunit for ACL X-Git-Tag: v0.88~169^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=59c89760c72e5d588a56a2385fe3f056047e072e;p=ceph.git qa/workunits/fs/misc: Add a workunit for ACL Signed-off-by: Yan, Zheng --- diff --git a/qa/workunits/fs/misc/acl.sh b/qa/workunits/fs/misc/acl.sh new file mode 100755 index 00000000000..8f1c921182b --- /dev/null +++ b/qa/workunits/fs/misc/acl.sh @@ -0,0 +1,32 @@ +#!/bin/sh -x + +set -e +mkdir -p testdir +cd testdir + +set +e +setfacl -d -m u:nobody:rw . +if test $? != 0; then + echo "Filesystem does not support ACL" + exit 0 +fi + +set -e +for (( i=0; i<100; i++)) +do + # inherited ACL from parent directory's default ACL + mkdir d1 + c1=`getfacl d1 | grep -c "nobody:rw"` + sudo echo 3 > /proc/sys/vm/drop_caches + c2=`getfacl d1 | grep -c "nobody:rw"` + rmdir d1 + if [[ $c1 -ne 2 || $c2 -ne 2 ]] + then + echo "ERROR: incorrect ACLs" + exit 1 + fi +done + +cd .. +rmdir testdir +echo OK