xref: /freebsd/tools/regression/msdosfs/msdosfstest-4.sh (revision 1e413cf93298b5b97441a21d9a50fdcd0ee9945e)
1#!/bin/sh
2# $FreeBSD$
3# A really simple script to create a swap-backed msdosfs filesystem, then
4# test to see if msdosfs_conv.c rev 1.45[1] works properly.
5
6mkdir /tmp/msdosfstest
7mdconfig -a -t swap -s 128m -u 10
8bsdlabel -w md10 auto
9newfs_msdos -F 16 -b 8192 /dev/md10a
10mount_msdosfs -L uk_UA.KOI8-U -D CP866 -l /dev/md10a /tmp/msdosfstest
11# mkdir /tmp/msdosfstest/U+0456 (CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I)
12mkdir /tmp/msdosfstest/�
13if [ $? -eq 0 ]; then
14	echo "ok 4 (pass stage 1/3)"
15	# cd /tmp/msdosfstest/U+0456 (CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I)
16	cd /tmp/msdosfstest/�
17	if [ $? -eq 0 ]; then
18		echo "ok 4 (pass stage 2/3)"
19		cd /tmp
20		umount /tmp/msdosfstest
21		mount_msdosfs -L uk_UA.KOI8-U -D CP866 -s /dev/md10a /tmp/msdosfstest
22		cd /tmp/msdosfstest/_~1
23		if [ $? -eq 0 ]; then
24			echo "ok 4 (pass stage 3/3)"
25		else
26			echo "not ok 4"
27		fi
28	else
29		echo "not ok 4"
30	fi
31else
32	echo "not ok 4"
33fi
34cd /tmp
35umount /tmp/msdosfstest
36mdconfig -d -u 10
37rmdir /tmp/msdosfstest
38