mirror of
git://git.sv.gnu.org/coreutils
synced 2026-05-06 07:06:38 -04:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user