mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2026-03-21 05:34:00 -04:00
tests: add tests for leak check in clients
Sanity tests for leak checks in clients of test compositor and also check if the test-compositor itself is not leaking anything. Signed-off-by: Marek Chalupa <mchqwerty@gmail.com> Reviewed-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
parent
9ef0277571
commit
d1855797d3
2 changed files with 92 additions and 0 deletions
|
|
@ -80,6 +80,23 @@ TEST(display_destroy_listener)
|
|||
assert(b.done);
|
||||
}
|
||||
|
||||
/* Fake 'client' which does not use wl_display_connect, and thus leaves the
|
||||
* file descriptor passed through WAYLAND_SOCKET intact. This should not
|
||||
* trigger an assertion in the leak check. */
|
||||
static void
|
||||
empty_client(void)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
TEST(tc_leaks_tests)
|
||||
{
|
||||
struct display *d = display_create();
|
||||
client_create(d, empty_client);
|
||||
display_run(d);
|
||||
display_destroy(d);
|
||||
}
|
||||
|
||||
static void
|
||||
registry_handle_globals(void *data, struct wl_registry *registry,
|
||||
uint32_t id, const char *intf, uint32_t ver)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue