source: MondoRescue/branches/2.2.9/mindi-busybox/shell/hush_test/hush-z_slow/leak_var2.tests@ 2725

Last change on this file since 2725 was 2725, checked in by Bruno Cornec, 13 years ago
  • Update mindi-busybox to 1.18.3 to avoid problems with the tar command which is now failing on recent versions with busybox 1.7.3
  • Property svn:executable set to *
File size: 1.6 KB
Line 
1echo "Warm up"
2t=1
3export t
4i=1
5while 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
15done
16unset t i
17
18memleak
19
20echo "Measuring memory leak..."
21t=1
22export t
23i=1
24while 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
34done
35unset t i
36
37memleak
38kb=$?
39if test $kb -le 4; then
40 echo Ok
41else
42 echo "Bad: $kb kb (or more) leaked"
43fi
Note: See TracBrowser for help on using the repository browser.