tests: prefer ext4 casefold for case insensitive tests

* tests/mv/hardlink-case.sh: Try both ext4 casefold and hfsplus,
as ext4 has better availability.
Suggested at https://github.com/coreutils/coreutils/issues/133
This commit is contained in:
Pádraig Brady
2025-11-27 21:52:20 +00:00
parent 8083efff09
commit 0b2845ec79
+16 -4
View File
@@ -23,10 +23,22 @@ require_root_
cwd=$(pwd)
cleanup_() { cd /; umount "$cwd/mnt"; }
truncate -s100M hfs.img || framework_failure_
mkfs -t hfsplus hfs.img || skip_ 'failed to create hfs file system'
mkdir mnt || framework_failure_
mount hfs.img mnt || skip_ 'failed to mount hfs file system'
for ocase in '-t ext4 -O casefold' '-t hfsplus'; do
rm -f case.img
truncate -s100M case.img || framework_failure_
mkfs $ocase case.img &&
mkdir mnt &&
mount case.img mnt &&
printf '%s\n' "$ocase" > mnt/type &&
break
done
test -f mnt/type || skip_ 'failed to create case insensitive file system'
if grep 'ext4' mnt/type; then
rm -d mnt/type mnt/lost+found || framework_failure_
chattr +F mnt || skip_ 'failed to create case insensitive file system'
fi
cd mnt
touch foo