diff options
Diffstat (limited to 'shell/hush_test')
-rw-r--r-- | shell/hush_test/hush-z_slow/leak_empty_tick.right | 3 | ||||
-rwxr-xr-x | shell/hush_test/hush-z_slow/leak_empty_tick.tests | 28 |
2 files changed, 31 insertions, 0 deletions
diff --git a/shell/hush_test/hush-z_slow/leak_empty_tick.right b/shell/hush_test/hush-z_slow/leak_empty_tick.right new file mode 100644 index 000000000..c6f0334f3 --- /dev/null +++ b/shell/hush_test/hush-z_slow/leak_empty_tick.right @@ -0,0 +1,3 @@ +Warm up +Measuring memory leak... +Ok diff --git a/shell/hush_test/hush-z_slow/leak_empty_tick.tests b/shell/hush_test/hush-z_slow/leak_empty_tick.tests new file mode 100755 index 000000000..ae3757969 --- /dev/null +++ b/shell/hush_test/hush-z_slow/leak_empty_tick.tests @@ -0,0 +1,28 @@ +echo "Warm up" +i=1 +while test $i != 9; do + `true` + : $((i++)) +done + +memleak + +echo "Measuring memory leak..." +i=1 +while test $i != 199; do + `true` + : $((i++)) +done +i=1 +while test $i != 199; do + `true` + : $((i++)) +done + +memleak +kb=$? +if test $kb -le 4; then + echo Ok #$kb +else + echo "Bad: $kb kb (or more) leaked" +fi |