diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2009-04-08 12:11:23 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2009-04-08 12:11:23 +0000 |
commit | 08daf564ae4519ebb8f563a9e5bee4bd608a6c05 (patch) | |
tree | c13c7ca6692f906f9803973568d255fc810c93b6 /shell/hush_test | |
parent | c73b70c7013aa98a86653ad7e7d15bcca16622f2 (diff) | |
download | busybox-08daf564ae4519ebb8f563a9e5bee4bd608a6c05.tar.gz |
hush: add a leak test which currently fails
Diffstat (limited to 'shell/hush_test')
-rw-r--r-- | shell/hush_test/hush-z_slow/leak_var3.right | 3 | ||||
-rwxr-xr-x | shell/hush_test/hush-z_slow/leak_var3.tests | 41 |
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 @@ +Warm up +Measuring memory leak... +Ok 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 @@ +# Was seen leaking on NOMMU build + +echo "Warm up" +i=1; t=1; export t +while test $i != 400; do + t=valueA_$i true + : $((i++)) +done + +memleak +echo "Measuring memory leak..." + +# Please copy the entire block from above verbatim +i=1; t=1; export t +while test $i != 400; do + t=valueA_$i true + : $((i++)) +done +i=1; t=1; export t +while test $i != 400; do + t=valueA_$i true + : $((i++)) +done +i=1; t=1; export t +while test $i != 400; do + t=valueA_$i true + : $((i++)) +done +i=1; t=1; export t +while test $i != 400; do + t=valueA_$i true + : $((i++)) +done + +memleak +kb=$? +if test $kb -le 4; then + echo Ok #$kb +else + echo "Bad: $kb kb (or more) leaked" +fi |