diff options
Diffstat (limited to 'firmware/test/fat/test.sh')
-rw-r--r-- | firmware/test/fat/test.sh | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/firmware/test/fat/test.sh b/firmware/test/fat/test.sh index f723f69ec3..7d9435b85d 100644 --- a/firmware/test/fat/test.sh +++ b/firmware/test/fat/test.sh | |||
@@ -15,6 +15,7 @@ check() { | |||
15 | } | 15 | } |
16 | 16 | ||
17 | try() { | 17 | try() { |
18 | echo COMMAND: fat $1 $2 $3 >> $RESULT | ||
18 | ./fat $1 $2 $3 2>> $RESULT | 19 | ./fat $1 $2 $3 2>> $RESULT |
19 | RETVAL=$? | 20 | RETVAL=$? |
20 | [ $RETVAL -ne 0 ] && fail | 21 | [ $RETVAL -ne 0 ] && fail |
@@ -25,6 +26,7 @@ buildimage() { | |||
25 | mount -o loop $IMAGE $MOUNT | 26 | mount -o loop $IMAGE $MOUNT |
26 | echo "Filling it with /etc files" | 27 | echo "Filling it with /etc files" |
27 | find /etc -type f -maxdepth 1 -exec cp {} $MOUNT \; | 28 | find /etc -type f -maxdepth 1 -exec cp {} $MOUNT \; |
29 | mkdir $MOUNT/dir | ||
28 | umount $MOUNT | 30 | umount $MOUNT |
29 | } | 31 | } |
30 | 32 | ||
@@ -33,8 +35,10 @@ runtests() { | |||
33 | 35 | ||
34 | echo ---Test: create a 10K file | 36 | echo ---Test: create a 10K file |
35 | try mkfile /apa.txt 10 | 37 | try mkfile /apa.txt 10 |
38 | try mkfile /dir/apa.txt 10 | ||
36 | check | 39 | check |
37 | try chkfile /apa.txt 10 | 40 | try chkfile /apa.txt 10 |
41 | try chkfile /dir/apa.txt 8 | ||
38 | 42 | ||
39 | echo ---Test: create a 1K file | 43 | echo ---Test: create a 1K file |
40 | try mkfile /bpa.txt 1 | 44 | try mkfile /bpa.txt 1 |
@@ -64,7 +68,7 @@ runtests() { | |||
64 | try chkfile /bpa.txt | 68 | try chkfile /bpa.txt |
65 | 69 | ||
66 | LOOP=50 | 70 | LOOP=50 |
67 | SIZE=50 | 71 | SIZE=70 |
68 | 72 | ||
69 | echo ---Test: create $LOOP $SIZE k files | 73 | echo ---Test: create $LOOP $SIZE k files |
70 | for i in `seq 1 $LOOP`; | 74 | for i in `seq 1 $LOOP`; |
@@ -73,10 +77,19 @@ runtests() { | |||
73 | try mkfile /rockbox.$i $SIZE | 77 | try mkfile /rockbox.$i $SIZE |
74 | check | 78 | check |
75 | try chkfile /rockbox.$i $SIZE | 79 | try chkfile /rockbox.$i $SIZE |
80 | check | ||
81 | try del /rockbox.$i | ||
82 | check | ||
83 | try mkfile /rockbox.$i $SIZE | ||
84 | check | ||
76 | done | 85 | done |
77 | 86 | ||
78 | } | 87 | } |
79 | 88 | ||
89 | echo "Building test image (4 sector/cluster)" | ||
90 | buildimage 4 | ||
91 | runtests | ||
92 | |||
80 | echo "Building test image (128 sectors/cluster)" | 93 | echo "Building test image (128 sectors/cluster)" |
81 | buildimage 128 | 94 | buildimage 128 |
82 | runtests | 95 | runtests |
@@ -89,10 +102,6 @@ echo "Building test image (8 sectors/cluster)" | |||
89 | buildimage 8 | 102 | buildimage 8 |
90 | runtests | 103 | runtests |
91 | 104 | ||
92 | echo "Building test image (4 sector/cluster)" | ||
93 | buildimage 4 | ||
94 | runtests | ||
95 | |||
96 | echo "Building test image (1 sector/cluster)" | 105 | echo "Building test image (1 sector/cluster)" |
97 | buildimage 1 | 106 | buildimage 1 |
98 | runtests | 107 | runtests |