Deleted Added
full compact
msdosfstest-5.sh (148117) msdosfstest-5.sh (229656)
1#!/bin/sh
1#!/bin/sh
2# $FreeBSD: head/tools/regression/msdosfs/msdosfstest-5.sh 148117 2005-07-18 12:15:24Z imura $
2# $FreeBSD: head/tools/regression/msdosfs/msdosfstest-5.sh 229656 2012-01-05 21:36:53Z uqs $
3# A really simple script to create a swap-backed msdosfs filesystem, then
4# test to see if msdosfs_conv.c rev 1.45[2] works properly.
5# Note that this is a requisite condition but far away from sufficient condition.
6# You must check file system by "dir /x" on MS Windows.
7
8mkdir /tmp/msdosfstest
9mdconfig -a -t swap -s 128m -u 10
10bsdlabel -w md10 auto
11newfs_msdos -F 16 -b 8192 /dev/md10a
12mount_msdosfs -L ja_JP.eucJP -D CP932 -l /dev/md10a /tmp/msdosfstest
3# A really simple script to create a swap-backed msdosfs filesystem, then
4# test to see if msdosfs_conv.c rev 1.45[2] works properly.
5# Note that this is a requisite condition but far away from sufficient condition.
6# You must check file system by "dir /x" on MS Windows.
7
8mkdir /tmp/msdosfstest
9mdconfig -a -t swap -s 128m -u 10
10bsdlabel -w md10 auto
11newfs_msdos -F 16 -b 8192 /dev/md10a
12mount_msdosfs -L ja_JP.eucJP -D CP932 -l /dev/md10a /tmp/msdosfstest
13# touch /tmp/msdosfstest/U+FF71 (HALFWIDTH KATAKANA LETTER A)
14touch /tmp/msdosfstest/��
13# The comment is UTF-8, the actual command uses the eucJP representation.
14# touch /tmp/msdosfstest/��� (HALFWIDTH KATAKANA LETTER A)
15touch /tmp/msdosfstest/$'\216\261'
15if [ $? -eq 0 ]; then
16 umount /tmp/msdosfstest
17 mount_msdosfs -L ja_JP.eucJP -D CP932 -s /dev/md10a /tmp/msdosfstest
16if [ $? -eq 0 ]; then
17 umount /tmp/msdosfstest
18 mount_msdosfs -L ja_JP.eucJP -D CP932 -s /dev/md10a /tmp/msdosfstest
18 ls /tmp/msdosfstest/��
19 ls /tmp/msdosfstest/$'\216\261'
19 if [ $? -eq 0 ]; then
20 echo "ok 5 (pass stage 1/2)"
21 umount /tmp/msdosfstest
22 mount_msdosfs -L uk_UA.KOI8-U -D CP866 -l /dev/md10a /tmp/msdosfstest
20 if [ $? -eq 0 ]; then
21 echo "ok 5 (pass stage 1/2)"
22 umount /tmp/msdosfstest
23 mount_msdosfs -L uk_UA.KOI8-U -D CP866 -l /dev/md10a /tmp/msdosfstest
23 # ls /tmp/msdosfstest/0xb1 (MEDIUM SHADE)
24 ls /tmp/msdosfstest/�
24 # The comment is UTF-8, the actual command uses the KOI8-U representation.
25 # ls /tmp/msdosfstest/��� (MEDIUM SHADE)
26 ls /tmp/msdosfstest/$'\221'
25 if [ $? -ne 0 ]; then
26 # assume that U+FF71 was recorded with long name
27 echo "ok 5 (pass stage 2/2)"
28 else
29 # only 0xb1 was found (doesn't have long name)
30 echo "not ok 5"
31 fi
32 else
33 echo "not ok 5"
34 fi
35else
36 echo "not ok 5"
37fi
38umount /tmp/msdosfstest
39mdconfig -d -u 10
40rmdir /tmp/msdosfstest
27 if [ $? -ne 0 ]; then
28 # assume that U+FF71 was recorded with long name
29 echo "ok 5 (pass stage 2/2)"
30 else
31 # only 0xb1 was found (doesn't have long name)
32 echo "not ok 5"
33 fi
34 else
35 echo "not ok 5"
36 fi
37else
38 echo "not ok 5"
39fi
40umount /tmp/msdosfstest
41mdconfig -d -u 10
42rmdir /tmp/msdosfstest