diff options
| author | Marek Chalupa <mchqwerty@gmail.com> | 2014-12-19 14:53:02 +0100 |
|---|---|---|
| committer | Daniel Stone <daniels@collabora.com> | 2015-01-28 17:17:09 +0000 |
| commit | d1855797d33f0153ccf2c775d62b731f25b2625f (patch) | |
| tree | 5f93da2b1c61f91ed796185399e103346a27839c /tests/display-test.c | |
| parent | test-compositor: extend leak checks into clients (diff) | |
| download | wayland-d1855797d33f0153ccf2c775d62b731f25b2625f.tar wayland-d1855797d33f0153ccf2c775d62b731f25b2625f.tar.gz wayland-d1855797d33f0153ccf2c775d62b731f25b2625f.tar.bz2 wayland-d1855797d33f0153ccf2c775d62b731f25b2625f.tar.lz wayland-d1855797d33f0153ccf2c775d62b731f25b2625f.tar.xz wayland-d1855797d33f0153ccf2c775d62b731f25b2625f.tar.zst wayland-d1855797d33f0153ccf2c775d62b731f25b2625f.zip | |
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>
Diffstat (limited to 'tests/display-test.c')
| -rw-r--r-- | tests/display-test.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/display-test.c b/tests/display-test.c index f9889a8..48c4cb9 100644 --- a/tests/display-test.c +++ b/tests/display-test.c @@ -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) |
