summaryrefslogtreecommitdiff
path: root/firmware/test/fat/test.sh
diff options
context:
space:
mode:
authorBjörn Stenberg <bjorn@haxx.se>2002-11-01 15:26:06 +0000
committerBjörn Stenberg <bjorn@haxx.se>2002-11-01 15:26:06 +0000
commit307f5d846e1513ef609b76e2d6cea035c8465b33 (patch)
treed93d38a60d136e41cd1f6894594f55618ece316e /firmware/test/fat/test.sh
parent54d5e2cb2734d1520d234db878fa75cca68784a1 (diff)
downloadrockbox-307f5d846e1513ef609b76e2d6cea035c8465b33.tar.gz
rockbox-307f5d846e1513ef609b76e2d6cea035c8465b33.zip
Added remove()
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2801 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/test/fat/test.sh')
-rw-r--r--firmware/test/fat/test.sh19
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
17try() { 17try() {
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
89echo "Building test image (4 sector/cluster)"
90buildimage 4
91runtests
92
80echo "Building test image (128 sectors/cluster)" 93echo "Building test image (128 sectors/cluster)"
81buildimage 128 94buildimage 128
82runtests 95runtests
@@ -89,10 +102,6 @@ echo "Building test image (8 sectors/cluster)"
89buildimage 8 102buildimage 8
90runtests 103runtests
91 104
92echo "Building test image (4 sector/cluster)"
93buildimage 4
94runtests
95
96echo "Building test image (1 sector/cluster)" 105echo "Building test image (1 sector/cluster)"
97buildimage 1 106buildimage 1
98runtests 107runtests