aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Whitley <markw@lineo.com>2001-05-24 21:24:39 +0000
committerMark Whitley <markw@lineo.com>2001-05-24 21:24:39 +0000
commit0a4f578fdc867714e8e942add8700aa15bd80443 (patch)
tree551e237f17de4dcc2dd1a43aad6318ff9498fde2
parentfa43e54b6f662cb33043ff9d1d312558a6e54bc3 (diff)
downloadbusybox-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/testcases23
-rwxr-xr-xtests/tester.sh4
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
63dd if=/dev/urandom of=O bs=1k count=1 ; ls -l O ; rm O 68dd 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
68df 74df
69df . 75df .
70df -k 76df -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
89du 96du
90du -s 97du -s
91du -l 98du -l
@@ -141,6 +148,7 @@ expr 12 % 5
141find . 148find .
142 149
143# free 150# free
151# XXX: minor formatting differences
144free 152free
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
161echo testing 1 2 3 >tmpfile1; gzip tmpfile1; echo tmpfile*; md5sum tmpfile1.gz; rm tmpfile1.gz 170echo testing 1 2 3 >tmpfile1; gzip tmpfile1; echo tmpfile*; md5sum tmpfile1.gz; rm tmpfile1.gz
162echo testing 1 2 3 | gzip >tmpfile1.gz; md5sum tmpfile1.gz; rm tmpfile1.gz 171echo 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
166head tester.sh 177head tester.sh
@@ -170,6 +181,7 @@ head -n 2 tester.sh
170hostid 181hostid
171 182
172# hostname 183# hostname
184# XXX: minor formatting differences
173hostname 185hostname
174hostname -s 186hostname -s
175hostname -i 187hostname -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
181id 194id
182id -u 195id -u
183id -g 196id -g
@@ -208,6 +221,7 @@ ifconfig
208# logname 221# logname
209 222
210# ls 223# ls
224# XXX: minor formatting differences
211ls ../e* 225ls ../e*
212ls -l ../e* 226ls -l ../e*
213ls -s ../e* 227ls -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
243mount 258mount
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
277route 293route
278 294
279# rpmunpack 295# rpmunpack
@@ -326,6 +342,7 @@ touch tmpfile1; ls tmpfile1; rm -f tmpfile1
326touch -c tmpfile1; ls tmpfile1; rm -f tmpfile1 342touch -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
329echo "cbaab" | tr abc zyx 346echo "cbaab" | tr abc zyx
330echo "TESTING A B C" | tr [A-Z] [a-z] 347echo "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
350uptime 368uptime
351 369
352# usleep 370# usleep
@@ -370,6 +388,7 @@ which ls
370whoami 388whoami
371 389
372# xargs 390# xargs
391# XXX: Busygox xargs divides filenames with '\n' instead of ' '
373ls -1 ../e* | xargs 392ls -1 ../e* | xargs
374ls -1 ../e* | xargs md5sum 393ls -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