diff options
author | Mark Whitley <markw@lineo.com> | 2001-05-24 21:24:39 +0000 |
---|---|---|
committer | Mark Whitley <markw@lineo.com> | 2001-05-24 21:24:39 +0000 |
commit | 0a4f578fdc867714e8e942add8700aa15bd80443 (patch) | |
tree | 551e237f17de4dcc2dd1a43aad6318ff9498fde2 | |
parent | fa43e54b6f662cb33043ff9d1d312558a6e54bc3 (diff) | |
download | busybox-w32-0a4f578fdc867714e8e942add8700aa15bd80443.tar.gz busybox-w32-0a4f578fdc867714e8e942add8700aa15bd80443.tar.bz2 busybox-w32-0a4f578fdc867714e8e942add8700aa15bd80443.zip |
'Nother patch from Larry to fix a buglet in how the line gets sed-ified.
Also, more testcases and comments on bugs and formatting differences in some
of the testcases.
-rw-r--r-- | tests/testcases | 23 | ||||
-rwxr-xr-x | tests/tester.sh | 4 |
2 files changed, 23 insertions, 4 deletions
diff --git a/tests/testcases b/tests/testcases index 41c1a08e1..64d406a8a 100644 --- a/tests/testcases +++ b/tests/testcases | |||
@@ -21,6 +21,10 @@ | |||
21 | # - try to make the applet you're testing the first thing on the line (this | 21 | # - try to make the applet you're testing the first thing on the line (this |
22 | # not always possible) | 22 | # not always possible) |
23 | # - (???) if you have to create a temporary file, call it TMPFILE | 23 | # - (???) if you have to create a temporary file, call it TMPFILE |
24 | # - pipe symbols that represent real pipes need a space in front of them | ||
25 | # (so the test script can find them and add the "../busybox" after it). | ||
26 | # - pipe symbols that are not used for pipes need to be shell-escaped, | ||
27 | # with a double \. See the expr test cases. | ||
24 | 28 | ||
25 | 29 | ||
26 | # ar | 30 | # ar |
@@ -60,11 +64,13 @@ date +%d/%m/%y | |||
60 | # dc - needs an input file | 64 | # dc - needs an input file |
61 | 65 | ||
62 | # dd | 66 | # dd |
67 | # BUG: record count line goes to stdout instead of stderr | ||
63 | dd if=/dev/urandom of=O bs=1k count=1 ; ls -l O ; rm O | 68 | dd if=/dev/urandom of=O bs=1k count=1 ; ls -l O ; rm O |
64 | 69 | ||
65 | # deallocvt | 70 | # deallocvt |
66 | 71 | ||
67 | # df | 72 | # df |
73 | # XXX: minor formatting differences | ||
68 | df | 74 | df |
69 | df . | 75 | df . |
70 | df -k | 76 | df -k |
@@ -86,6 +92,7 @@ dmesg -s 512 | |||
86 | # dpkg_deb | 92 | # dpkg_deb |
87 | 93 | ||
88 | # du | 94 | # du |
95 | # BUG: rounding behavior differs from GNU du | ||
89 | du | 96 | du |
90 | du -s | 97 | du -s |
91 | du -l | 98 | du -l |
@@ -141,6 +148,7 @@ expr 12 % 5 | |||
141 | find . | 148 | find . |
142 | 149 | ||
143 | # free | 150 | # free |
151 | # XXX: minor formatting differences | ||
144 | free | 152 | free |
145 | 153 | ||
146 | # freeramdisk | 154 | # freeramdisk |
@@ -158,9 +166,12 @@ grep -e strdup -e regcomp -e atexit ../grep.c | |||
158 | # gunzip | 166 | # gunzip |
159 | 167 | ||
160 | # gzip | 168 | # gzip |
169 | # XXX: compressed output differs from gzip-1.2.4, but decompresses fine | ||
161 | echo testing 1 2 3 >tmpfile1; gzip tmpfile1; echo tmpfile*; md5sum tmpfile1.gz; rm tmpfile1.gz | 170 | echo testing 1 2 3 >tmpfile1; gzip tmpfile1; echo tmpfile*; md5sum tmpfile1.gz; rm tmpfile1.gz |
162 | echo testing 1 2 3 | gzip >tmpfile1.gz; md5sum tmpfile1.gz; rm tmpfile1.gz | 171 | echo testing 1 2 3 | gzip >tmpfile1.gz; md5sum tmpfile1.gz; rm tmpfile1.gz |
163 | # halt | 172 | |
173 | |||
174 | # halt - won't test, dangerous | ||
164 | 175 | ||
165 | # head | 176 | # head |
166 | head tester.sh | 177 | head tester.sh |
@@ -170,6 +181,7 @@ head -n 2 tester.sh | |||
170 | hostid | 181 | hostid |
171 | 182 | ||
172 | # hostname | 183 | # hostname |
184 | # XXX: minor formatting differences | ||
173 | hostname | 185 | hostname |
174 | hostname -s | 186 | hostname -s |
175 | hostname -i | 187 | hostname -i |
@@ -178,6 +190,7 @@ hostname -d | |||
178 | #hostname -F | 190 | #hostname -F |
179 | 191 | ||
180 | # id | 192 | # id |
193 | # BUG: Busybox id doesn't print supplemental groups | ||
181 | id | 194 | id |
182 | id -u | 195 | id -u |
183 | id -g | 196 | id -g |
@@ -208,6 +221,7 @@ ifconfig | |||
208 | # logname | 221 | # logname |
209 | 222 | ||
210 | # ls | 223 | # ls |
224 | # XXX: minor formatting differences | ||
211 | ls ../e* | 225 | ls ../e* |
212 | ls -l ../e* | 226 | ls -l ../e* |
213 | ls -s ../e* | 227 | ls -s ../e* |
@@ -240,8 +254,9 @@ mkfifo -m 0600 F ; ls -l F ; rm F | |||
240 | # more - can't test: interactive | 254 | # more - can't test: interactive |
241 | 255 | ||
242 | # mount | 256 | # mount |
257 | # BUG: proc line starts with /proc instead of proc | ||
243 | mount | 258 | mount |
244 | # not going to test any more | 259 | # not going to test mount with any args, can't be done safely or sanely |
245 | 260 | ||
246 | # mt | 261 | # mt |
247 | # mv - see mv_tests.mk | 262 | # mv - see mv_tests.mk |
@@ -274,6 +289,7 @@ touch F ; rm F | |||
274 | # rmmod - won't test: dangerous | 289 | # rmmod - won't test: dangerous |
275 | 290 | ||
276 | # route | 291 | # route |
292 | # XXX: doesn't DNS resolve | ||
277 | route | 293 | route |
278 | 294 | ||
279 | # rpmunpack | 295 | # rpmunpack |
@@ -326,6 +342,7 @@ touch tmpfile1; ls tmpfile1; rm -f tmpfile1 | |||
326 | touch -c tmpfile1; ls tmpfile1; rm -f tmpfile1 | 342 | touch -c tmpfile1; ls tmpfile1; rm -f tmpfile1 |
327 | 343 | ||
328 | # tr | 344 | # tr |
345 | # BUG: Busybox tr range handling minix style [a-z] instead of GNU # style a-z | ||
329 | echo "cbaab" | tr abc zyx | 346 | echo "cbaab" | tr abc zyx |
330 | echo "TESTING A B C" | tr [A-Z] [a-z] | 347 | echo "TESTING A B C" | tr [A-Z] [a-z] |
331 | # not GNU compatible | 348 | # not GNU compatible |
@@ -347,6 +364,7 @@ false ; echo $? | |||
347 | # update | 364 | # update |
348 | 365 | ||
349 | # uptime | 366 | # uptime |
367 | # BUG: doesn't print number of users | ||
350 | uptime | 368 | uptime |
351 | 369 | ||
352 | # usleep | 370 | # usleep |
@@ -370,6 +388,7 @@ which ls | |||
370 | whoami | 388 | whoami |
371 | 389 | ||
372 | # xargs | 390 | # xargs |
391 | # XXX: Busygox xargs divides filenames with '\n' instead of ' ' | ||
373 | ls -1 ../e* | xargs | 392 | ls -1 ../e* | xargs |
374 | ls -1 ../e* | xargs md5sum | 393 | ls -1 ../e* | xargs md5sum |
375 | 394 | ||
diff --git a/tests/tester.sh b/tests/tester.sh index 92090068d..a767c6c7f 100755 --- a/tests/tester.sh +++ b/tests/tester.sh | |||
@@ -124,8 +124,8 @@ do | |||
124 | # line=${line//;/; $BUSYBOX } | 124 | # line=${line//;/; $BUSYBOX } |
125 | # line=${line//|/| $BUSYBOX } | 125 | # line=${line//|/| $BUSYBOX } |
126 | # assume $BUSYBOX has no commas | 126 | # assume $BUSYBOX has no commas |
127 | line=`echo $line | sed -e 's,;,; '$BUSYBOX, \ | 127 | line=`echo "$line" | sed -e 's,;,; '$BUSYBOX, \ |
128 | -e 's,|,| '$BUSYBOX,` | 128 | -e 's, |, | '$BUSYBOX,` |
129 | 129 | ||
130 | # execute line using busybox programs | 130 | # execute line using busybox programs |
131 | [ $DEBUG -ge 2 ] && echo "testing: $line" | tee -a $LOGFILE | 131 | [ $DEBUG -ge 2 ] && echo "testing: $line" | tee -a $LOGFILE |