]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/workunits/fs/misc: Add a workunit for ACL 2514/head
authorYan, Zheng <zyan@redhat.com>
Thu, 18 Sep 2014 04:04:29 +0000 (12:04 +0800)
committerYan, Zheng <zyan@redhat.com>
Thu, 18 Sep 2014 06:20:59 +0000 (14:20 +0800)
Signed-off-by: Yan, Zheng <zyan@redhat.com>
qa/workunits/fs/misc/acl.sh [new file with mode: 0755]

diff --git a/qa/workunits/fs/misc/acl.sh b/qa/workunits/fs/misc/acl.sh
new file mode 100755 (executable)
index 0000000..8f1c921
--- /dev/null
@@ -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