test-lib: enable MALLOC_* for the actual tests

1b3185f (MALLOC_CHECK: various clean-ups, 2012-09-14) moved around the MALLOC_CHECK_ and MALLOC_PERTURB_ assignments, intending to limit their effect to only the test runs. However, they were actually enabled only during test cleanup. Call setup/teardown_malloc_check also around the evaluation of the actual test snippet. Signed-off-by: Thomas Rast <trast@inf.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Thomas Rast committed Jun 17, 2013 at 11:18 UTC a57397b0d6709d75ab23145fd4fea5ce65dc1054
1 file changed +2
t/test-lib.sh
+2
@@ -337,8 +337,10 @@ test_eval_ () {
337 test_run_ () {
338 test_cleanup=:
339 expecting_failure=$2
340 + setup_malloc_check
341 test_eval_ "$1"
342 eval_ret=$?
343 + teardown_malloc_check
344
345 if test -z "$immediate" || test $eval_ret = 0 || test -n "$expecting_failure"
346 then