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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxxx>
---

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

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]