8 echo "!! Test failed. Look in $RESULT for test logs."
14 /sbin
/dosfsck
-r $IMAGE |
tee -a $RESULT
15 [ $RETVAL -ne 0 ] && fail
19 echo COMMAND
: fat
$1 "$2" "$3"
20 echo COMMAND
: fat
$1 "$2" "$3" >> $RESULT
21 .
/fat
$1 "$2" "$3" 2>> $RESULT
23 [ $RETVAL -ne 0 ] && fail
27 /sbin
/mkdosfs
-F 32 -s $1 $IMAGE > /dev
/null
28 mount
-o loop
$IMAGE $MOUNT
29 echo "Filling it with /etc files"
30 find /etc
-type f
-maxdepth 1 -exec cp {} $MOUNT \
;
33 echo apa
> "$MOUNT/very $i long test filename so we can make sure they.work"
41 echo ---Test: create a long name directory
in the root
42 try mkdir
"/very long subdir name"
44 try mkdir
"/very long subdir name/apa.monkey.me.now"
47 echo ---Test: create a directory called
"dir"
51 echo ---Test: create a
10K
file
52 try mkfile
"/really long filenames rock" 10
55 try mkfile
/dir
/apa.monkey.me.now
10
57 try chkfile
"/really long filenames rock" 10
58 try chkfile
/dir
/apa.monkey.me.now
8
60 echo ---Test: create a
1K
file
61 try mkfile
/bpa.rock
1
63 try chkfile
/bpa.rock
1
65 echo ---Test: create a
40K
file
66 try mkfile
/cpa.rock
40
68 try chkfile
/cpa.rock
40
70 echo ---Test: create a
400K
file
71 try mkfile
/dpa.rock
400
73 try chkfile
/dpa.rock
400
75 echo ---Test: create a
1200K
file
76 try mkfile
/epa.rock
1200
78 try chkfile
/epa.rock
1200
80 echo ---Test: rewrite first
20K of a
40K
file
81 try mkfile
/cpa.rock
20
83 try chkfile
/cpa.rock
20
85 echo ---Test: rewrite first sector of
40K
file
86 try mkfile
/cpa.rock
0
94 try del
"/really long filenames rock"
96 echo ---Test: create
$LOOP $SIZE k files
97 for i
in `seq 1 $LOOP`;
99 echo ---Test: $i/$LOOP ---
100 try mkfile
"/rockbox rocks.$i" $SIZE
102 try chkfile
"/rockbox rocks.$i" $SIZE
104 try del
"/rockbox rocks.$i"
106 try mkfile
"/rockbox rocks.$i" $SIZE
108 try ren
"/rockbox rocks.$i" "/$i is a new long filename!"
114 echo "--------------------------------------"
115 echo "Building test image (4 sector/cluster)"
116 echo "--------------------------------------"
120 echo "---------------------------------------"
121 echo "Building test image (32 sectors/cluster)"
122 echo "---------------------------------------"
126 echo "--------------------------------------"
127 echo "Building test image (1 sector/cluster)"
128 echo "--------------------------------------"
132 echo "--------------------------------------"
133 echo "Building test image (8 sectors/cluster)"
134 echo "--------------------------------------"
138 echo "----------------------------------------"
139 echo "Building test image (128 sectors/cluster)"
140 echo "----------------------------------------"
144 echo "== Test completed successfully =="