Skip to content

Commit a57397b

Browse files
Thomas Rastgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent edca415 commit a57397b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

t/test-lib.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,8 +337,10 @@ test_eval_ () {
337337
test_run_ () {
338338
test_cleanup=:
339339
expecting_failure=$2
340+
setup_malloc_check
340341
test_eval_ "$1"
341342
eval_ret=$?
343+
teardown_malloc_check
342344

343345
if test -z "$immediate" || test $eval_ret = 0 || test -n "$expecting_failure"
344346
then

0 commit comments

Comments
 (0)