cifs: skip tests that need POSIX support for nounix mounts

CIFS/SMB protocol without POSIX extensions doesn't support operations
with symbolic links and advisory byte-range locks from the same process.
Add checks these features and use them in generic tests that require
such operations.

Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org>
Reviewed-by: Steve French <smfrench@gmail.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
This commit is contained in:
Pavel Shilovsky
2014-09-08 22:26:52 +10:00
committed by Dave Chinner
parent 0e9141e49d
commit beb211475b
6 changed files with 29 additions and 6 deletions
+23
View File
@@ -2428,6 +2428,29 @@ _require_btrfs_fs_feature()
_notrun "Feature $feat not supported by the available btrfs version"
}
_require_test_symlinks()
{
# IRIX UDF does not support symlinks
[ "$HOSTOS" = "IRIX" -a "$FSTYP" = 'udf' ] && \
_notrun "Require symlinks support"
target=`mktemp -p $TEST_DIR`
link=`mktemp -p $TEST_DIR -u`
ln -s `basename $target` $link
if [ "$?" -ne 0 ]; then
rm -f $target
_notrun "Require symlinks support"
fi
rm -f $target $link
}
_require_test_fcntl_advisory_locks()
{
[ "$FSTYP" != "cifs" ] && return 0
cat /proc/mounts | grep $TEST_DEV | grep cifs | grep -q "nobrl" && return 0
cat /proc/mounts | grep $TEST_DEV | grep cifs | grep -qE "nounix|forcemand" && \
_notrun "Require fcntl advisory locks support"
}
_get_total_inode()
{
if [ -z "$1" ]; then