@@ -2374,6 +2374,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
@@ -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
@@ -45,6 +45,7 @@ _supported_os Linux
_require_test
_requires_renameat2
+_require_test_symlinks
# real QA test starts here
@@ -45,6 +45,7 @@ _supported_os Linux
_require_test
_requires_renameat2
+_require_test_symlinks
rename_dir=$TEST_DIR/$$
mkdir $rename_dir
@@ -45,6 +45,7 @@ _supported_os Linux
_require_test
_requires_renameat2
+_require_test_symlinks
rename_dir=$TEST_DIR/$$
mkdir $rename_dir
@@ -45,6 +45,7 @@ _cleanup()
_supported_fs generic
_supported_os Linux
_require_test
+_require_test_fcntl_advisory_locks
TESTFILE=$TEST_DIR/lock_file