Magellan Linux

Contents of /trunk/mkinitrd-magellan/busybox/shell/hush_test/hush-z_slow/leak_var2.tests

Parent Directory Parent Directory | Revision Log Revision Log


Revision 984 - (show annotations) (download)
Sun May 30 11:32:42 2010 UTC (13 years, 11 months ago) by niro
File size: 1608 byte(s)
-updated to busybox-1.16.1 and enabled blkid/uuid support in default config
1 echo "Warm up"
2 t=1
3 export t
4 i=1
5 while test $i != X; do
6 t=111111111111111111111111111111111111111111111111111111111111111111111110$i
7 t=111111111111111111111111111111111111111111111111111111111111111111111111$i true
8 t=111111111111111111111111111111111111111111111111111111111111111111111112$i /bin/true
9 t=111111111111111111111111111111111111111111111111111111111111111111111113$i exec 1>&1
10 i=1$i
11 if test $i = 1111111111111111111111111111111111111111111111; then i=2; fi
12 if test $i = 1111111111111111111111111111111111111111111112; then i=3; fi
13 if test $i = 1111111111111111111111111111111111111111111113; then i=4; fi
14 if test $i = 1111111111111111111111111111111111111111111114; then i=X; fi
15 done
16 unset t i
17
18 memleak
19
20 echo "Measuring memory leak..."
21 t=1
22 export t
23 i=1
24 while test $i != X; do
25 t=111111111111111111111111111111111111111111111111111111111111111111111110$i
26 t=111111111111111111111111111111111111111111111111111111111111111111111111$i true
27 t=111111111111111111111111111111111111111111111111111111111111111111111112$i /bin/true
28 t=111111111111111111111111111111111111111111111111111111111111111111111113$i exec 1>&1
29 i=1$i
30 if test $i = 1111111111111111111111111111111111111111111111; then i=2; fi
31 if test $i = 1111111111111111111111111111111111111111111112; then i=3; fi
32 if test $i = 1111111111111111111111111111111111111111111113; then i=4; fi
33 if test $i = 1111111111111111111111111111111111111111111114; then i=X; fi
34 done
35 unset t i
36
37 memleak
38 kb=$?
39 if test $kb -le 4; then
40 echo Ok
41 else
42 echo "Bad: $kb kb (or more) leaked"
43 fi