Skip to content

Commit

Permalink
test-lib: enable MALLOC_* for the actual tests
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Thomas Rast authored and Junio C Hamano committed Jun 17, 2013
1 parent edca415 commit a57397b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions t/test-lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -337,8 +337,10 @@ test_eval_ () {
test_run_ () {
test_cleanup=:
expecting_failure=$2
setup_malloc_check
test_eval_ "$1"
eval_ret=$?
teardown_malloc_check

if test -z "$immediate" || test $eval_ret = 0 || test -n "$expecting_failure"
then
Expand Down

0 comments on commit a57397b

Please sign in to comment.