Contents of /trunk/mkinitrd-magellan/busybox/shell/hush_test/hush-z_slow/leak_var.tests
Parent Directory | Revision Log
Revision 984 -
(show annotations)
(download)
Sun May 30 11:32:42 2010 UTC (14 years ago) by niro
File size: 2186 byte(s)
Sun May 30 11:32:42 2010 UTC (14 years ago) by niro
File size: 2186 byte(s)
-updated to busybox-1.16.1 and enabled blkid/uuid support in default config
1 | echo "Measuring memory leak..." |
2 | i=1 |
3 | while test $i != X; do |
4 | unset t |
5 | t=111111111111111111111111111111111111111111111111111111111111111111111111 |
6 | export t |
7 | unset t |
8 | t=111111111111111111111111111111111111111111111111111111111111111111111111 |
9 | export t |
10 | unset t |
11 | t=111111111111111111111111111111111111111111111111111111111111111111111111 |
12 | export t |
13 | unset t |
14 | t=111111111111111111111111111111111111111111111111111111111111111111111111 |
15 | export t |
16 | unset t |
17 | t=111111111111111111111111111111111111111111111111111111111111111111111111 |
18 | export t |
19 | i=1$i |
20 | if test $i = 1111111111111111111111111111111111111111111111; then i=2; fi |
21 | if test $i = 1111111111111111111111111111111111111111111112; then i=3; fi |
22 | if test $i = 1111111111111111111111111111111111111111111113; then i=4; fi |
23 | if test $i = 1111111111111111111111111111111111111111111114; then i=5; fi |
24 | if test $i = 1111111111111111111111111111111111111111111115; then i=6; fi |
25 | if test $i = 1111111111111111111111111111111111111111111116; then i=7; fi |
26 | if test $i = 1111111111111111111111111111111111111111111117; then i=8; fi |
27 | if test $i = 1111111111111111111111111111111111111111111118; then i=9; fi |
28 | if test $i = 1111111111111111111111111111111111111111111119; then i=a; fi |
29 | if test $i = 111111111111111111111111111111111111111111111a; then i=b; fi |
30 | if test $i = 111111111111111111111111111111111111111111111b; then i=c; fi |
31 | if test $i = 111111111111111111111111111111111111111111111c; then i=d; fi |
32 | if test $i = 111111111111111111111111111111111111111111111d; then i=e; fi |
33 | if test $i = 111111111111111111111111111111111111111111111e; then i=f; fi |
34 | if test $i = 111111111111111111111111111111111111111111111f; then i=g; fi |
35 | if test $i = 111111111111111111111111111111111111111111111g; then i=h; fi |
36 | if test $i = 111111111111111111111111111111111111111111111h; then i=i; fi |
37 | if test $i = 111111111111111111111111111111111111111111111i; then i=j; fi |
38 | if test $i = 111111111111111111111111111111111111111111111j; then i=X; fi |
39 | memleak |
40 | done |
41 | memleak |
42 | kb=$? |
43 | if test $kb -le 4; then |
44 | echo Ok |
45 | else |
46 | echo "Bad: $kb kb (or more) leaked" |
47 | fi |