summaryrefslogtreecommitdiff
path: root/shell/hush_test
diff options
context:
space:
mode:
authorDenys Vlasenko2009-05-04 01:58:10 +0200
committerDenys Vlasenko2009-05-04 01:58:10 +0200
commitacdc49c07302aa4e49ae765db9cdfd725d51bd7d (patch)
tree505cb9ea733c24a778f09feb62623cb4b73c86eb /shell/hush_test
parentcb6ff25afeb2daeebcb435c9766215061d3c75cb (diff)
downloadbusybox-acdc49c07302aa4e49ae765db9cdfd725d51bd7d.zip
busybox-acdc49c07302aa4e49ae765db9cdfd725d51bd7d.tar.gz
hush: add more complex case to leak testcase, fix found breakage
function old new delta unset_local_var_len - 167 +167 run_list 2350 2457 +107 set_vars_and_save_old - 87 +87 free_pipe 207 227 +20 builtin_unset 220 229 +9 builtin_exit 49 47 -2 free_strings_and_unset 53 - -53 set_vars_all_and_save_old 87 - -87 unset_local_var 168 - -168 ------------------------------------------------------------------------------ (add/remove: 2/3 grow/shrink: 3/1 up/down: 390/-310) Total: 80 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/hush_test')
-rwxr-xr-xshell/hush_test/hush-z_slow/leak_all1.tests9
1 files changed, 4 insertions, 5 deletions
diff --git a/shell/hush_test/hush-z_slow/leak_all1.tests b/shell/hush_test/hush-z_slow/leak_all1.tests
index 4e3c4fd..f8207cf 100755
--- a/shell/hush_test/hush-z_slow/leak_all1.tests
+++ b/shell/hush_test/hush-z_slow/leak_all1.tests
@@ -64,7 +64,7 @@ HERE
trap "echo trap$i" WINCH
f() { true; true; true; true; true; true; true; true; }
f() { true; true; true; true; true; true; true; true; echo $1; }
- f >/dev/null
+ i=iii$i t=ttt$i z=zzz$i f >/dev/null
: $((i++))
done
unset i l t
@@ -132,7 +132,7 @@ HERE
trap "echo trap$i" WINCH
f() { true; true; true; true; true; true; true; true; }
f() { true; true; true; true; true; true; true; true; echo $1; }
- f >/dev/null
+ i=iii$i t=ttt$i z=zzz$i f >/dev/null
: $((i++))
done
unset i l t
@@ -141,9 +141,8 @@ unset -f f
memleak
kb=$?
-# Observed some variability, bumped to 12k
-if test $kb -le 12; then
+if test $kb -le 4; then
echo Ok #$kb
else
- echo "Bad: $kb kb (or more) leaked"
+ echo "Bad: $kb kb leaked"
fi