aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2009-04-08 12:11:23 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2009-04-08 12:11:23 +0000
commit08daf564ae4519ebb8f563a9e5bee4bd608a6c05 (patch)
treec13c7ca6692f906f9803973568d255fc810c93b6
parentc73b70c7013aa98a86653ad7e7d15bcca16622f2 (diff)
downloadbusybox-w32-08daf564ae4519ebb8f563a9e5bee4bd608a6c05.tar.gz
busybox-w32-08daf564ae4519ebb8f563a9e5bee4bd608a6c05.tar.bz2
busybox-w32-08daf564ae4519ebb8f563a9e5bee4bd608a6c05.zip
hush: add a leak test which currently fails
-rw-r--r--shell/hush_test/hush-z_slow/leak_var3.right3
-rwxr-xr-xshell/hush_test/hush-z_slow/leak_var3.tests41
2 files changed, 44 insertions, 0 deletions
diff --git a/shell/hush_test/hush-z_slow/leak_var3.right b/shell/hush_test/hush-z_slow/leak_var3.right
new file mode 100644
index 000000000..c6f0334f3
--- /dev/null
+++ b/shell/hush_test/hush-z_slow/leak_var3.right
@@ -0,0 +1,3 @@
1Warm up
2Measuring memory leak...
3Ok
diff --git a/shell/hush_test/hush-z_slow/leak_var3.tests b/shell/hush_test/hush-z_slow/leak_var3.tests
new file mode 100755
index 000000000..9554c42cf
--- /dev/null
+++ b/shell/hush_test/hush-z_slow/leak_var3.tests
@@ -0,0 +1,41 @@
1# Was seen leaking on NOMMU build
2
3echo "Warm up"
4i=1; t=1; export t
5while test $i != 400; do
6 t=valueA_$i true
7 : $((i++))
8done
9
10memleak
11echo "Measuring memory leak..."
12
13# Please copy the entire block from above verbatim
14i=1; t=1; export t
15while test $i != 400; do
16 t=valueA_$i true
17 : $((i++))
18done
19i=1; t=1; export t
20while test $i != 400; do
21 t=valueA_$i true
22 : $((i++))
23done
24i=1; t=1; export t
25while test $i != 400; do
26 t=valueA_$i true
27 : $((i++))
28done
29i=1; t=1; export t
30while test $i != 400; do
31 t=valueA_$i true
32 : $((i++))
33done
34
35memleak
36kb=$?
37if test $kb -le 4; then
38 echo Ok #$kb
39else
40 echo "Bad: $kb kb (or more) leaked"
41fi