mirror of
https://github.com/ceph/ceph
synced 2024-12-18 01:16:55 +00:00
Merge pull request #2514 from ceph/wip-acl-test
qa/workunits/fs/misc: Add a workunit for ACL Reviewed-by: Greg Farnum <greg@inktank.com>
This commit is contained in:
commit
9442336f92
32
qa/workunits/fs/misc/acl.sh
Executable file
32
qa/workunits/fs/misc/acl.sh
Executable file
@ -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
|
Loading…
Reference in New Issue
Block a user