git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] test: avoid failures when USE_NED_ALLOCATOR
@ 2018-10-23  9:38 Carlo Marcelo Arenas Belón
  2018-10-24  2:07 ` Junio C Hamano
  0 siblings, 1 reply; 2+ messages in thread
From: Carlo Marcelo Arenas Belón @ 2018-10-23  9:38 UTC (permalink / raw)
  To: git; +Cc: gitster, gitter.spiros, Carlo Marcelo Arenas Belón

contrib/nedmalloc doesn't support MALLOC_CHECK_ or MALLOC_PERTURB_
so add it to the same exception that is being used with valgrind

Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
---
 t/test-lib.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/test-lib.sh b/t/test-lib.sh
index 44288cbb59..2ad9e6176c 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -143,7 +143,7 @@ fi
 # Add libc MALLOC and MALLOC_PERTURB test
 # only if we are not executing the test with valgrind
 if expr " $GIT_TEST_OPTS " : ".* --valgrind " >/dev/null ||
-   test -n "$TEST_NO_MALLOC_CHECK"
+   test -n "$TEST_NO_MALLOC_CHECK" || test -n "$USE_NED_ALLOCATOR"
 then
 	setup_malloc_check () {
 		: nothing
-- 
2.19.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] test: avoid failures when USE_NED_ALLOCATOR
  2018-10-23  9:38 [PATCH] test: avoid failures when USE_NED_ALLOCATOR Carlo Marcelo Arenas Belón
@ 2018-10-24  2:07 ` Junio C Hamano
  0 siblings, 0 replies; 2+ messages in thread
From: Junio C Hamano @ 2018-10-24  2:07 UTC (permalink / raw)
  To: Carlo Marcelo Arenas Belón; +Cc: git, gitter.spiros

Carlo Marcelo Arenas Belón  <carenas@gmail.com> writes:

> contrib/nedmalloc doesn't support MALLOC_CHECK_ or MALLOC_PERTURB_
> so add it to the same exception that is being used with valgrind
>
> Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
> ---
>  t/test-lib.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Unlike the case for valgrind, where we actively do not want to set
these two environment variables [*1*], I am assuming that nedmalloc
simply ignores these two environment variables.  Is there a reason
why we want to special case nedmalloc like this patch does, but
leave these set for other implementations that do not pay attention
to them?  

Of course, I am also assuming that there are implementations of
malloc(3), which are not nedmalloc, that can be used to build and
test Git and that do not react to these two environment variables.
The patch would make sense if all the other implementations of
malloc(3) paid attention to MALLOC_{CHECK,PERTURB}_ and nedmalloc
were the only odd-man out, but I do not think that is the case.

[Footnote] 

*1* see the last two paragraphs of the log message of a731fa91 ("Add
MALLOC_CHECK_ and MALLOC_PERTURB_ libc env to the test suite for
detecting heap corruption", 2012-09-14)


> diff --git a/t/test-lib.sh b/t/test-lib.sh
> index 44288cbb59..2ad9e6176c 100644
> --- a/t/test-lib.sh
> +++ b/t/test-lib.sh
> @@ -143,7 +143,7 @@ fi
>  # Add libc MALLOC and MALLOC_PERTURB test
>  # only if we are not executing the test with valgrind
>  if expr " $GIT_TEST_OPTS " : ".* --valgrind " >/dev/null ||
> -   test -n "$TEST_NO_MALLOC_CHECK"
> +   test -n "$TEST_NO_MALLOC_CHECK" || test -n "$USE_NED_ALLOCATOR"
>  then
>  	setup_malloc_check () {
>  		: nothing

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-10-24  3:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-23  9:38 [PATCH] test: avoid failures when USE_NED_ALLOCATOR Carlo Marcelo Arenas Belón
2018-10-24  2:07 ` Junio C Hamano

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).