Add another regression tests for msdosfs which covers msdosfs_conv.c rev 1.45.
Requested by: silby
This commit is contained in:
parent
c8e6b6899a
commit
1404c3a4b8
37
tools/regression/msdosfs/msdosfstest-4.sh
Normal file
37
tools/regression/msdosfs/msdosfstest-4.sh
Normal file
@ -0,0 +1,37 @@
|
||||
#!/bin/sh
|
||||
# $FreeBSD$
|
||||
# A really simple script to create a swap-backed msdosfs filesystem, then
|
||||
# test to see if msdosfs_conv.c rev 1.45[1] works properly.
|
||||
|
||||
mkdir /tmp/msdosfstest
|
||||
mdconfig -a -t swap -s 128m -u 10
|
||||
bsdlabel -w md10 auto
|
||||
newfs_msdos -F 16 -b 8192 /dev/md10a
|
||||
mount_msdosfs -L uk_UA.KOI8-U -D CP866 -l /dev/md10a /tmp/msdosfstest
|
||||
# mkdir /tmp/msdosfstest/U+0456 (CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I)
|
||||
mkdir /tmp/msdosfstest/¦
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "ok 4 (pass stage 1/3)"
|
||||
# cd /tmp/msdosfstest/U+0456 (CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I)
|
||||
cd /tmp/msdosfstest/¦
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "ok 4 (pass stage 2/3)"
|
||||
cd /tmp
|
||||
umount /tmp/msdosfstest
|
||||
mount_msdosfs -L uk_UA.KOI8-U -D CP866 -s /dev/md10a /tmp/msdosfstest
|
||||
cd /tmp/msdosfstest/_~1
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "ok 4 (pass stage 3/3)"
|
||||
else
|
||||
echo "not ok 4"
|
||||
fi
|
||||
else
|
||||
echo "not ok 4"
|
||||
fi
|
||||
else
|
||||
echo "not ok 4"
|
||||
fi
|
||||
cd /tmp
|
||||
umount /tmp/msdosfstest
|
||||
mdconfig -d -u 10
|
||||
rmdir /tmp/msdosfstest
|
40
tools/regression/msdosfs/msdosfstest-5.sh
Normal file
40
tools/regression/msdosfs/msdosfstest-5.sh
Normal file
@ -0,0 +1,40 @@
|
||||
#!/bin/sh
|
||||
# $FreeBSD$
|
||||
# A really simple script to create a swap-backed msdosfs filesystem, then
|
||||
# test to see if msdosfs_conv.c rev 1.45[2] works properly.
|
||||
# Note that this is a requisite condition but far away from sufficient condition.
|
||||
# You must check file system by "dir /x" on MS Windows.
|
||||
|
||||
mkdir /tmp/msdosfstest
|
||||
mdconfig -a -t swap -s 128m -u 10
|
||||
bsdlabel -w md10 auto
|
||||
newfs_msdos -F 16 -b 8192 /dev/md10a
|
||||
mount_msdosfs -L ja_JP.eucJP -D CP932 -l /dev/md10a /tmp/msdosfstest
|
||||
# touch /tmp/msdosfstest/U+FF71 (HALFWIDTH KATAKANA LETTER A)
|
||||
touch /tmp/msdosfstest/Ž±
|
||||
if [ $? -eq 0 ]; then
|
||||
umount /tmp/msdosfstest
|
||||
mount_msdosfs -L ja_JP.eucJP -D CP932 -s /dev/md10a /tmp/msdosfstest
|
||||
ls /tmp/msdosfstest/Ž±
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "ok 5 (pass stage 1/2)"
|
||||
umount /tmp/msdosfstest
|
||||
mount_msdosfs -L uk_UA.KOI8-U -D CP866 -l /dev/md10a /tmp/msdosfstest
|
||||
# ls /tmp/msdosfstest/0xb1 (MEDIUM SHADE)
|
||||
ls /tmp/msdosfstest/‘
|
||||
if [ $? -ne 0 ]; then
|
||||
# assume that U+FF71 was recorded with long name
|
||||
echo "ok 5 (pass stage 2/2)"
|
||||
else
|
||||
# only 0xb1 was found (doesn't have long name)
|
||||
echo "not ok 5"
|
||||
fi
|
||||
else
|
||||
echo "not ok 5"
|
||||
fi
|
||||
else
|
||||
echo "not ok 5"
|
||||
fi
|
||||
umount /tmp/msdosfstest
|
||||
mdconfig -d -u 10
|
||||
rmdir /tmp/msdosfstest
|
Loading…
Reference in New Issue
Block a user