git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] MALLOC_CHECK: Allow checking to be disabled from config.mak

From
Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Date
Oct 6, 2012, 17:33 UTC
Message-ID
<50706B54.8090004@ramsay1.demon.co.uk>

The malloc checks can be disabled using the TEST_NO_MALLOC_CHECK variable, either from the environment or command line of an 'make test' invocation. In order to allow the malloc checks to be disabled from the 'config.mak' file, we add TEST_NO_MALLOC_CHECK to the environment using an export directive.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
---
Hi Junio,

Now that the malloc checks have been enabled, running the tests has become somewhat noisy with "malloc: using debugging hooks" messages spewing continuously to the terminal. [I usually run the tests like so:

    ramsay$ time $(make test >test-out 2>&1)
    malloc: using debugging hooks
    malloc: using debugging hooks
    ...
    malloc: using debugging hooks
    real    16m11.408s
    user    5m17.412s
    sys     4m54.786s
    ramsay$ 
]
strace tells me that the controlling terminal, /dev/tty, is being
opened directly in order to write these messages. I find this
annoying, so I tried to disable the malloc checks from config.mak ...

Note that I decided not to write the TEST_NO_MALLOC_CHECK setting to the GIT-BUILD-OPTIONS file, since I prefer to enable/disable the malloc checks myself when running the test script directly.

ATB, Ramsay Jones

 Makefile | 1 +
 1 file changed, 1 insertion(+)
diff --git a/Makefile b/Makefile
index 8413606..f69979e 100644
--- a/Makefile
+++ b/Makefile
@@ -2636,6 +2636,7 @@ bin-wrappers/%: wrap-for-bin.sh
 # with that.
 
 export NO_SVN_TESTS
+export TEST_NO_MALLOC_CHECK
 
 ### Testing rules
 
-- 
1.7.12
Next: Junio C Hamano
Message 1 of 11 in “MALLOC_CHECK: Allow checking to be disabled from config.mak”
  1. MALLOC_CHECK: Allow checking to be disabled from config.makRamsay Jones, Oct 6, 2012
  2. Junio C HamanoOct 6, 2012
  3. Elia PintoOct 7, 2012
  4. Elia PintoOct 8, 2012
  5. Christian CouderOct 9, 2012
  6. Ramsay JonesOct 10, 2012
  7. Ramsay JonesOct 10, 2012
  8. Elia PintoOct 10, 2012
  9. Elia PintoOct 10, 2012
  10. Junio C HamanoOct 10, 2012
  11. Ramsay JonesOct 11, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.