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
30 echo "Filling it with /etc files"
31 find /etc
-maxdepth 1 -type f
-readable -exec cp {} $MOUNT \
;
34 echo apa
> "$MOUNT/very $i long test filename so we can make sure they.work"
42 echo ---Test: create a long name directory
in the root
43 try mkdir
"/very long subdir name"
45 try mkdir
"/very long subdir name/apa.monkey.me.now"
48 echo ---Test: create a directory called
"dir"
52 echo ---Test: create a
10K
file
53 try mkfile
"/really long filenames rock" 10
56 try mkfile
/dir
/apa.monkey.me.now
10
58 try chkfile
"/really long filenames rock" 10
59 try chkfile
/dir
/apa.monkey.me.now
8
61 echo ---Test: create a
1K
file
62 try mkfile
/bpa.rock
1
64 try chkfile
/bpa.rock
1
66 echo ---Test: create a
40K
file
67 try mkfile
/cpa.rock
40
69 try chkfile
/cpa.rock
40
71 echo ---Test: create a
400K
file
72 try mkfile
/dpa.rock
400
74 try chkfile
/dpa.rock
400
76 echo ---Test: create a
1200K
file
77 try mkfile
/epa.rock
1200
79 try chkfile
/epa.rock
1200
81 echo ---Test: rewrite first
20K of a
40K
file
82 try mkfile
/cpa.rock
20
84 try chkfile
/cpa.rock
20
86 echo ---Test: rewrite first sector of
40K
file
87 try mkfile
/cpa.rock
0
95 try del
"/really long filenames rock"
97 echo ---Test: create
$LOOP $SIZE k files
98 for i
in `seq 1 $LOOP`;
100 echo ---Test: $i/$LOOP ---
101 try mkfile
"/rockbox rocks.$i" $SIZE
103 try chkfile
"/rockbox rocks.$i" $SIZE
105 try del
"/rockbox rocks.$i"
107 try mkfile
"/rockbox rocks.$i" $SIZE
109 try ren
"/rockbox rocks.$i" "/$i is a new long filename!"
115 echo "--------------------------------------"
116 echo "Building test image (4 sector/cluster)"
117 echo "--------------------------------------"
121 echo "---------------------------------------"
122 echo "Building test image (32 sectors/cluster)"
123 echo "---------------------------------------"
127 echo "--------------------------------------"
128 echo "Building test image (1 sector/cluster)"
129 echo "--------------------------------------"
133 echo "--------------------------------------"
134 echo "Building test image (8 sectors/cluster)"
135 echo "--------------------------------------"
139 echo "----------------------------------------"
140 echo "Building test image (128 sectors/cluster)"
141 echo "----------------------------------------"
145 echo "== Test completed successfully =="