mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-10-29 05:40:16 -04:00
tests: add possibility to disable leak check for single test
In tests that are using external libraries (i. e. pthread) we can get failure because of leaks in the external library. Until we have some better solution (if ever), let these (and only these) tests to disable leak checks. Signed-off-by: Marek Chalupa <mchqwerty@gmail.com> Reviewed-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
parent
5c70c03190
commit
68c11c48c0
3 changed files with 21 additions and 0 deletions
|
|
@ -81,6 +81,19 @@ FAIL_TEST(sanity_malloc_direct)
|
|||
free(NULL); /* NULL must not be counted */
|
||||
}
|
||||
|
||||
TEST(disable_leak_checks)
|
||||
{
|
||||
volatile void *mem;
|
||||
assert(leak_check_enabled);
|
||||
/* normally this should be on the beginning of the test.
|
||||
* Here we need to be sure, that the leak checks are
|
||||
* turned on */
|
||||
DISABLE_LEAK_CHECKS;
|
||||
|
||||
mem = malloc(16);
|
||||
assert(mem);
|
||||
}
|
||||
|
||||
FAIL_TEST(sanity_malloc_indirect)
|
||||
{
|
||||
struct wl_array array;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue