summaryrefslogtreecommitdiff
path: root/shell/hush_test/hush-z_slow/leak_var.tests
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-11-23 12:50:54 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-11-23 12:50:54 +0000
commitf962a0354e2426ef9781df97e4b02b32e438783c (patch)
tree4e0b3363932fbc0a30d5242b58ca5a0fea48d2a8 /shell/hush_test/hush-z_slow/leak_var.tests
parentf23c3f95e88302923147f159115180da7cf0344e (diff)
downloadbusybox-w32-f962a0354e2426ef9781df97e4b02b32e438783c.tar.gz
busybox-w32-f962a0354e2426ef9781df97e4b02b32e438783c.tar.bz2
busybox-w32-f962a0354e2426ef9781df97e4b02b32e438783c.zip
hush: plug memory leak
Diffstat (limited to 'shell/hush_test/hush-z_slow/leak_var.tests')
-rwxr-xr-xshell/hush_test/hush-z_slow/leak_var.tests56
1 files changed, 39 insertions, 17 deletions
diff --git a/shell/hush_test/hush-z_slow/leak_var.tests b/shell/hush_test/hush-z_slow/leak_var.tests
index d3ca25908..388d6a734 100755
--- a/shell/hush_test/hush-z_slow/leak_var.tests
+++ b/shell/hush_test/hush-z_slow/leak_var.tests
@@ -1,24 +1,46 @@
1pid=$$ 1pid=$$
2 2
3# Warm up 3# Warm up
4unset t
5t=111111111111111111111111111111111111111111111111111111111111111111111111
6export t
7unset t
8t=111111111111111111111111111111111111111111111111111111111111111111111111
9export t
10unset t
11t=111111111111111111111111111111111111111111111111111111111111111111111111
12export t
13unset t
14t=111111111111111111111111111111111111111111111111111111111111111111111111
15export t
16unset t
17t=111111111111111111111111111111111111111111111111111111111111111111111111
18export t
19i=1
20if test $i = 1111111111111111111111111111111111111111111111; then i=2; fi
21beg=`ps -o pid,vsz | grep "^ *$pid "` 4beg=`ps -o pid,vsz | grep "^ *$pid "`
5i=1
6while test $i != X; do
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 unset t
20 t=111111111111111111111111111111111111111111111111111111111111111111111111
21 export t
22 i=1$i
23 if test $i = 1111111111111111111111111111111111111111111111; then i=2; fi
24 if test $i = 1111111111111111111111111111111111111111111112; then i=3; fi
25 if test $i = 1111111111111111111111111111111111111111111113; then i=4; fi
26 if test $i = 1111111111111111111111111111111111111111111114; then i=5; fi
27 if test $i = 1111111111111111111111111111111111111111111115; then i=6; fi
28 if test $i = 1111111111111111111111111111111111111111111116; then i=7; fi
29 if test $i = 1111111111111111111111111111111111111111111117; then i=8; fi
30 if test $i = 1111111111111111111111111111111111111111111118; then i=9; fi
31 if test $i = 1111111111111111111111111111111111111111111119; then i=a; fi
32 if test $i = 111111111111111111111111111111111111111111111a; then i=b; fi
33 if test $i = 111111111111111111111111111111111111111111111b; then i=c; fi
34 if test $i = 111111111111111111111111111111111111111111111c; then i=d; fi
35 if test $i = 111111111111111111111111111111111111111111111d; then i=e; fi
36 if test $i = 111111111111111111111111111111111111111111111e; then i=f; fi
37 if test $i = 111111111111111111111111111111111111111111111f; then i=g; fi
38 if test $i = 111111111111111111111111111111111111111111111g; then i=h; fi
39 if test $i = 111111111111111111111111111111111111111111111h; then i=i; fi
40 if test $i = 111111111111111111111111111111111111111111111i; then i=j; fi
41 if test $i = 111111111111111111111111111111111111111111111j; then i=X; fi
42done
43end=`ps -o pid,vsz | grep "^ *$pid "`
22 44
23echo "Measuring memory leak..." 45echo "Measuring memory leak..."
24beg=`ps -o pid,vsz | grep "^ *$pid "` 46beg=`ps -o pid,vsz | grep "^ *$pid "`