Skip to content

Commit

Permalink
qa/workunits/fs/misc: test for setting empty ACL
Browse files Browse the repository at this point in the history
Signed-off-by: Yan, Zheng <[email protected]>
  • Loading branch information
ukernel committed Jun 1, 2016
1 parent 3c6b3d0 commit ad02795
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions qa/workunits/fs/misc/acl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 ]
Expand All @@ -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

0 comments on commit ad02795

Please sign in to comment.