f2fs)
test -f '/sys/fs/f2fs/features/casefold'
;;
+ tmpfs)
+ test -f '/sys/fs/tmpfs/features/casefold'
+ ;;
*)
# defaults to unsupported
false
f2fs)
_scratch_mkfs -C utf8 $*
;;
+ tmpfs)
+ # there's no mkfs for tmpfs, just return
+ ;;
*)
_notrun "Don't know how to mkfs with casefold support on $FSTYP"
;;
f2fs)
_scratch_mkfs -C utf8:strict
;;
+ tmpfs)
+ # there's no mkfs for tmpfs, just return
+ ;;
*)
_notrun "Don't know how to mkfs with casefold-strict support on $FSTYP"
;;
esac
}
+_scratch_mount_casefold()
+{
+ case $FSTYP in
+ ext4)
+ _scratch_mount
+ ;;
+ f2fs)
+ _scratch_mount
+ ;;
+ tmpfs)
+ mount -t tmpfs -o casefold tmpfs $SCRATCH_MNT
+ ;;
+ *)
+ _notrun "Don't know how to mount with casefold support on $FSTYP"
+ ;;
+ esac
+}
+
+_scratch_mount_casefold_strict()
+{
+ case $FSTYP in
+ ext4)
+ _scratch_mount
+ ;;
+ f2fs)
+ _scratch_mount
+ ;;
+ tmpfs)
+ mount -t tmpfs -o casefold,strict_encoding tmpfs $SCRATCH_MNT
+ ;;
+ *)
+ _notrun "Don't know how to mount with casefold support on $FSTYP"
+ ;;
+ esac
+}
+
+
# To get the exact disk name, we need some method that does a
# getdents() on the parent directory, such that we don't get
# normalized/casefolded results. 'Find' works ok.
btrfs)
$UMOUNT_PROG $SCRATCH_MNT
;;
+ tmpfs)
+ $UMOUNT_PROG $SCRATCH_MNT
+ ;;
*)
$UMOUNT_PROG $SCRATCH_DEV
;;
_require_check_dmesg
_require_attrs
-sdev=$(_short_dev ${SCRATCH_DEV})
+if [ "$FSTYP" == "tmpfs" ]; then
+ sdev="tmpfs"
+else
+ sdev="\($(_short_dev ${SCRATCH_DEV})\)"
+fi
filename1="file.txt"
filename2="FILE.TXT"
_scratch_mkfs_casefold >>$seqres.full 2>&1
-_scratch_mount
+_scratch_mount_casefold
_check_dmesg_for \
- "\(${sdev}\): Using encoding defined by superblock: utf8" || \
+ "(${sdev}): Using encoding" || \
_fail "Could not mount with encoding: utf8"
test_casefold_flag_basic
# Test Strict Mode
_scratch_mkfs_casefold_strict >>$seqres.full 2>&1
-_scratch_mount
+_scratch_mount_casefold_strict
test_strict_mode_invalid_filename