[PATCH] tests: Allow disabling leak checking assertions by env

Eoff, Ullysses A ullysses.a.eoff at intel.com
Thu Aug 9 09:56:48 PDT 2012


>-----Original Message-----
>From: robster at evilgeniuses.org.uk [mailto:robster at evilgeniuses.org.uk] On
>Behalf Of Rob Bradford
>Sent: Thursday, August 09, 2012 9:27 AM
>To: Eoff, Ullysses A
>Cc: wayland-devel at lists.freedesktop.org
>Subject: Re: [PATCH] tests: Allow disabling leak checking assertions by env
>
>On 9 August 2012 16:46, Eoff, Ullysses A <ullysses.a.eoff at intel.com> wrote:
>> If I define NO_ASSERT_LEAK_CHECK in the environment, then the leak
>checks are skipped as expected.  However, this causes several sanity check
>tests to fail because some of them rely on the leak checks to fail.  Those
>specific tests need to be skipped, conditional on NO_ASSERT_LEAK_CHECK.
>>
>> sanity_malloc_indirect, sanity_fd_leak, sanity_malloc_direct all fail for me
>with this patch.
>
>Good point!
>
>You also gave a pretty good rationale about why we shouldn't have
>custom memory management monitoring hooks and instead use valgrind,
>etc.
>
>AFAICT you added this code, so IMHO it's probably your call if you
>want to pull it ;-)
>

 [Eoff, Ullysses A] Which is why I pulled the code in my patch :)  If we still want memory leak checking as part of the tests, we could just use a custom TESTS_ENVIRONMENT script that invokes valgrind on the tests during 'make check'.  Either way, no need to reinvent/manage our own mem checking when valgrind probably does it better and supports false positive suppression.

>Cheerio,
>
>Rob


More information about the wayland-devel mailing list