jfs)
echo 8191
;;
+ f2fs)
+ _fs_options $TEST_DEV | grep "inline_xattr" >/dev/null 2>&1
+ if [ $? -eq 0 ]; then
+ echo 531
+ else
+ echo 506
+ fi
+ ;;
*)
echo 0
;;
_ls_l -n $* | awk '{ print $1, $3, $4, $NF }' | _acl_filter_id
}
-#
-_acl_list()
-{
- _file1=$1
-
- if [ $HOSTOS = "IRIX" ]; then
- ls -dD $_file1 | _acl_filter_id
- else
- chacl -l $_file1 | _acl_filter_id
- fi
-}
-
# create an ACL with n ACEs in it
#
_create_n_aces()
_require_acls()
{
- if [ ! -x /bin/chacl -a ! -x /usr/bin/chacl -a ! -x /sbin/chacl ]; then
- _notrun "chacl command not found"
- fi
+ [ -n "$CHACL_PROG" ] || _notrun "chacl command not found"
#
# Test if chacl is able to list ACLs on the target filesystems. On really
_require_attrs()
{
- [ -n $ATTR_PROG ] || _notrun "attr command not found"
- [ -n $GETFATTR_PROG ] || _notrun "getfattr command not found"
- [ -n $SETFATTR_PROG ] || _notrun "setfattr command not found"
+ [ -n "$ATTR_PROG" ] || _notrun "attr command not found"
+ [ -n "$GETFATTR_PROG" ] || _notrun "getfattr command not found"
+ [ -n "$SETFATTR_PROG" ] || _notrun "setfattr command not found"
#
# Test if chacl is able to write an attribute on the target filesystems.
# stored on disk.
#
touch $TEST_DIR/syscalltest
- attr -s "user.xfstests" -V "attr" $TEST_DIR > $TEST_DIR/syscalltest.out 2>&1
+ attr -s "user.xfstests" -V "attr" $TEST_DIR/syscalltest > $TEST_DIR/syscalltest.out 2>&1
cat $TEST_DIR/syscalltest.out >> $seqres.full
if grep -q 'Function not implemented' $TEST_DIR/syscalltest.out; then
{
_scratch_mkfs_xfs > /dev/null 2>&1 \
|| _fail "_scratch_mkfs_xfs failed on $SCRATCH_DEV"
- _mount -o noattr2 $SCRATCH_DEV > /dev/null 2>&1 \
+ _scratch_mount -o noattr2 > /dev/null 2>&1 \
|| _notrun "noattr2 mount option not supported on $SCRATCH_DEV"
_scratch_unmount
}
}
# set maximum total attr space based on fs type
-if [ "$FSTYP" == "xfs" -o "$FSTYP" == "udf" ]; then
+case "$FSTYP" in
+xfs|udf|pvfs2|ceph)
MAX_ATTRS=1000
-else # Assume max ~1 block of attrs
- BLOCK_SIZE=`stat -f $TEST_DIR | grep "Block size" | cut -d " " -f3`
+ ;;
+*)
+ # Assume max ~1 block of attrs
+ BLOCK_SIZE=`_get_block_size $TEST_DIR`
# user.attribute_XXX="value.XXX" is about 32 bytes; leave some overhead
let MAX_ATTRS=$BLOCK_SIZE/40
-fi
+esac
export MAX_ATTRS
# Set max attr value size based on fs type
-if [ "$FSTYP" == "xfs" -o "$FSTYP" == "udf" -o "$FSTYP" == "btrfs" ]; then
+case "$FSTYP" in
+xfs|udf|btrfs)
MAX_ATTRVAL_SIZE=64
-else # Assume max ~1 block of attrs
- BLOCK_SIZE=`stat -f $TEST_DIR | grep "Block size" | cut -d " " -f3`
+ ;;
+pvfs2)
+ MAX_ATTRVAL_SIZE=8192
+ ;;
+ceph)
+ MAX_ATTRVAL_SIZE=65536
+ ;;
+*)
+ # Assume max ~1 block of attrs
+ BLOCK_SIZE=`_get_block_size $TEST_DIR`
# leave a little overhead
let MAX_ATTRVAL_SIZE=$BLOCK_SIZE-256
-fi
+esac
export MAX_ATTRVAL_SIZE
# make sure this script returns success