local testfile=$TEST_DIR/$$.xfs_io
local testio
case $command in
+ "lsattr")
+ # Test xfs_io lsattr support and filesystem FS_IOC_FSSETXATTR
+ # support.
+ testio=`$XFS_IO_PROG -F -f -c "lsattr $param" $testfile 2>&1`
+ param_checked="$param"
+ ;;
"chattr")
local testdir=$TEST_DIR/$$.attr_dir
mkdir $TEST_DIR/$$.attr_dir
if [ $exp_s_dax -eq 0 ]; then
(( attributes & 0x2000 )) && echo "$target has unexpected S_DAX flag"
else
- (( attributes & 0x2000 )) || echo "$target doen't have expected S_DAX flag"
+ (( attributes & 0x2000 )) || echo "$target doesn't have expected S_DAX flag"
fi
}
if [ $exp_xflag -eq 0 ]; then
_test_inode_flag dax $target && echo "$target has unexpected FS_XFLAG_DAX flag"
else
- _test_inode_flag dax $target || echo "$target doen't have expected FS_XFLAG_DAX flag"
+ _test_inode_flag dax $target || echo "$target doesn't have expected FS_XFLAG_DAX flag"
fi
}
_require_dax_iflag
_require_xfs_io_command "lsattr" "-v"
+# Make sure we can call FSGETXATTR on a directory...
+output="$($XFS_IO_PROG -c "lsattr -v" $TEST_DIR 2>&1)"
+echo "$output" | grep -q "Inappropriate ioctl for device" && \
+ _notrun "$FSTYP: FSGETXATTR not supported on directories."
+
# If a/ is +x, check that a's new children
# inherit +x from a/.
test_xflag_inheritance1()