mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2026-03-13 05:34:21 -04:00
tests: detect fd leaks
Detect file descriptor leaks in tests. Add a sanity test to verify that we catch the leaks. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
This commit is contained in:
parent
2896b6a220
commit
e0561ac68d
5 changed files with 68 additions and 1 deletions
|
|
@ -85,3 +85,11 @@ FAIL_TEST(sanity_malloc_indirect)
|
|||
|
||||
/* not freeing array, must leak */
|
||||
}
|
||||
|
||||
FAIL_TEST(sanity_fd_leak)
|
||||
{
|
||||
int fd[2];
|
||||
|
||||
/* leak 2 file descriptors */
|
||||
pipe(fd);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue