fstests: update sparse file & negative timestamp tests for exfat
[xfstests-dev.git] / common / rc
index 31361d0e00732010f7a90d9acc31a29af922677a..b25cad0ed8b098c51807e878a465247679ae618c 100644 (file)
--- a/common/rc
+++ b/common/rc
@@ -2357,7 +2357,7 @@ _require_fs_space()
 _require_sparse_files()
 {
     case $FSTYP in
-    hfsplus)
+    hfsplus|exfat)
         _notrun "Sparse files not supported by this filesystem type: $FSTYP"
        ;;
     *)
@@ -3211,7 +3211,7 @@ _has_metadata_journaling()
        fi
 
        case "$FSTYP" in
-       ext2|vfat|msdos|udf)
+       ext2|vfat|msdos|udf|exfat)
                echo "$FSTYP does not support metadata journaling"
                return 1
                ;;
@@ -3493,6 +3493,18 @@ _require_symlinks()
        rm -f $target $link
 }
 
+_require_hardlinks()
+{
+       local target=`mktemp -p $TEST_DIR`
+       local link=`mktemp -p $TEST_DIR -u`
+       ln $target $link
+       if [ "$?" -ne 0 ]; then
+               rm -f $target
+               _notrun "No hardlink support"
+       fi
+       rm -f $target $link
+}
+
 _require_test_fcntl_advisory_locks()
 {
        [ "$FSTYP" != "cifs" ] && return 0
@@ -4176,9 +4188,10 @@ _check_xfs_scrub_does_unicode() {
        return 0
 }
 
+# exfat timestamps start at 1980 and cannot be prior to epoch
 _require_negative_timestamps() {
        case "$FSTYP" in
-       ceph)
+       ceph|exfat)
                _notrun "$FSTYP does not support negative timestamps"
                ;;
        esac