From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Rast Subject: [PATCH v4 1/8] test-lib: enable MALLOC_* for the actual tests Date: Sun, 23 Jun 2013 20:12:52 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Cc: , Fredrik Gustafsson , Jeff King To: Junio C Hamano X-From: git-owner@vger.kernel.org Sun Jun 23 20:13:34 2013 Return-path: Envelope-to: gcvg-git-2@plane.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Uqon5-0007dl-JS for gcvg-git-2@plane.gmane.org; Sun, 23 Jun 2013 20:13:31 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752174Ab3FWSNH (ORCPT ); Sun, 23 Jun 2013 14:13:07 -0400 Received: from edge10.ethz.ch ([82.130.75.186]:34489 "EHLO edge10.ethz.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751777Ab3FWSND (ORCPT ); Sun, 23 Jun 2013 14:13:03 -0400 Received: from CAS11.d.ethz.ch (172.31.38.211) by edge10.ethz.ch (82.130.75.186) with Microsoft SMTP Server (TLS) id 14.2.298.4; Sun, 23 Jun 2013 20:12:54 +0200 Received: from hexa.v.cablecom.net (46.126.8.85) by CAS11.d.ethz.ch (172.31.38.211) with Microsoft SMTP Server (TLS) id 14.2.298.4; Sun, 23 Jun 2013 20:13:00 +0200 X-Mailer: git-send-email 1.8.3.1.727.gcbe3af3 In-Reply-To: X-Originating-IP: [46.126.8.85] Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: 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 --- t/test-lib.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/t/test-lib.sh b/t/test-lib.sh index eff3a65..35da859 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -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 -- 1.8.3.1.727.gcbe3af3