generic: introduce new large ACL test

Having just removed the largeacl test from the shared ACL test,
reintroduce the same test as an generic test so that we can
handle the different limits in supported ACL count appropriately
across different filesystems and different configurations within
filesystem types.

Filesystems have to add support to _acl_get_max to run
this test - the default behaviour right now is to throw a
notrun error like this:

generic/026 14s ... [not run] ext4 does not define maximum ACL count

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dave Chinner <david@fromorbit.com>
This commit is contained in:
Dave Chinner
2014-04-28 10:55:12 +10:00
committed by Dave Chinner
parent a12a56fb24
commit a841a6d0a8
4 changed files with 173 additions and 0 deletions
+31
View File
@@ -21,6 +21,37 @@
#-----------------------------------------------------------------------
# common extended attribute and ACL support
# filesystems that want to test maximum supported acl counts need to
# add support in here
_acl_get_max()
{
case $FSTYP in
xfs)
# CRC format filesystems have much larger ACL counts. The actual
# number is into the thousands, but testing that meany takes too
# long, so just test well past the old limit of 25.
xfs_info $TEST_DIR | _filter_mkfs > /dev/null 2> $tmp.info
. $tmp.info
rm $tmp.info
if [ $_fs_has_crcs -eq 0 ]; then
echo 25
else
echo 5461
fi
;;
*)
echo 0
;;
esac
}
_require_acl_get_max()
{
if [ $(_acl_get_max) -eq 0 ]; then
_notrun "$FSTYP does not define maximum ACL count"
fi
}
# pick three unused user/group ids, store them as $acl[1-3]
#
_acl_setup_ids()