From: Yan, Zheng Date: Wed, 1 Jun 2016 09:42:24 +0000 (+0800) Subject: qa/workunits/fs/misc: test for setting empty ACL X-Git-Tag: v11.0.0~362^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F9073%2Fhead;p=ceph.git qa/workunits/fs/misc: test for setting empty ACL Signed-off-by: Yan, Zheng --- diff --git a/qa/workunits/fs/misc/acl.sh b/qa/workunits/fs/misc/acl.sh index a213300b7086..d2f713af0bc6 100755 --- a/qa/workunits/fs/misc/acl.sh +++ b/qa/workunits/fs/misc/acl.sh @@ -11,6 +11,13 @@ if test $? != 0; then exit 0 fi +expect_failure() { + if [ `"$@"` -e 0 ]; then + return 1 + fi + return 0 +} + set -e c=0 while [ $c -lt 100 ] @@ -29,6 +36,18 @@ do fi done +mkdir d1 + +# The ACL xattr only contains ACL header. ACL should be removed +# in this case. +setfattr -n system.posix_acl_access -v 0x02000000 d1 +setfattr -n system.posix_acl_default -v 0x02000000 . + +expect_failure getfattr -n system.posix_acl_access d1 +expect_failure getfattr -n system.posix_acl_default . + + +rmdir d1 cd .. rmdir testdir echo OK