msdosfstest-4.sh revision 229656
1148117Simura#!/bin/sh 2148117Simura# $FreeBSD: head/tools/regression/msdosfs/msdosfstest-4.sh 229656 2012-01-05 21:36:53Z uqs $ 3148117Simura# A really simple script to create a swap-backed msdosfs filesystem, then 4148117Simura# test to see if msdosfs_conv.c rev 1.45[1] works properly. 5148117Simura 6148117Simuramkdir /tmp/msdosfstest 7148117Simuramdconfig -a -t swap -s 128m -u 10 8148117Simurabsdlabel -w md10 auto 9148117Simuranewfs_msdos -F 16 -b 8192 /dev/md10a 10148117Simuramount_msdosfs -L uk_UA.KOI8-U -D CP866 -l /dev/md10a /tmp/msdosfstest 11229656Suqs# The comment is UTF-8, the actual command uses the KOI8-U representation. 12229656Suqs# mkdir /tmp/msdosfstest/�� (CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I) 13229656Suqsmkdir /tmp/msdosfstest/$'\246' 14148117Simuraif [ $? -eq 0 ]; then 15148117Simura echo "ok 4 (pass stage 1/3)" 16229656Suqs cd /tmp/msdosfstest/$'\246' 17148117Simura if [ $? -eq 0 ]; then 18148117Simura echo "ok 4 (pass stage 2/3)" 19148117Simura cd /tmp 20148117Simura umount /tmp/msdosfstest 21148117Simura mount_msdosfs -L uk_UA.KOI8-U -D CP866 -s /dev/md10a /tmp/msdosfstest 22148117Simura cd /tmp/msdosfstest/_~1 23148117Simura if [ $? -eq 0 ]; then 24148117Simura echo "ok 4 (pass stage 3/3)" 25148117Simura else 26148117Simura echo "not ok 4" 27148117Simura fi 28148117Simura else 29148117Simura echo "not ok 4" 30148117Simura fi 31148117Simuraelse 32148117Simura echo "not ok 4" 33148117Simurafi 34148117Simuracd /tmp 35148117Simuraumount /tmp/msdosfstest 36148117Simuramdconfig -d -u 10 37148117Simurarmdir /tmp/msdosfstest 38