test-runner: move leak checking into function

1) now we can use it in the test-compositor
2) it looks better

Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
Marek Chalupa 2014-12-19 14:53:00 +01:00 committed by Daniel Stone
parent 6197f32cad
commit d8e72f98f2
2 changed files with 41 additions and 19 deletions

View file

@ -39,6 +39,12 @@ count_open_fds(void);
void
exec_fd_leak_check(int nr_expected_fds); /* never returns */
int
get_current_alloc_num(void);
void
check_leaks(int supposed_allocs, int supposed_fds);
/*
* set/reset the timeout in seconds. The timeout starts
* at the point of invoking this function