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
+2 -6
View File
@@ -67,13 +67,9 @@ _touch()
# real QA test starts here
_supported_fs generic
_require_test
_require_test_symlinks
# IRIX UDF does not support symlinks
if [ $FSTYP == 'udf' ]; then
_supported_os Linux
else
_supported_os Linux IRIX
fi
_supported_os Linux IRIX
cd $TEST_DIR
+1
View File
@@ -45,6 +45,7 @@ _supported_os Linux
_require_test
_requires_renameat2
_require_test_symlinks
# real QA test starts here
+1
View File
@@ -45,6 +45,7 @@ _supported_os Linux
_require_test
_requires_renameat2
_require_test_symlinks
rename_dir=$TEST_DIR/$$
mkdir $rename_dir
+1
View File
@@ -45,6 +45,7 @@ _supported_os Linux
_require_test
_requires_renameat2
_require_test_symlinks
rename_dir=$TEST_DIR/$$
mkdir $rename_dir
+1
View File
@@ -45,6 +45,7 @@ _cleanup()
_supported_fs generic
_supported_os Linux
_require_test
_require_test_fcntl_advisory_locks
TESTFILE=$TEST_DIR/lock_file