summaryrefslogtreecommitdiffstats
path: root/src/tests/common.h
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2013-04-01 13:22:49 +0200
committerJakub Hrozek <jhrozek@redhat.com>2013-04-17 11:43:22 +0200
commit4139a7a731f2831963a42b26aac111422be28792 (patch)
treec69d00109216ecaae36d54f3877946d89e16de17 /src/tests/common.h
parent714ba5f50551a42df324714358dc379b351d4a53 (diff)
downloadsssd-4139a7a731f2831963a42b26aac111422be28792.tar.gz
sssd-4139a7a731f2831963a42b26aac111422be28792.tar.xz
sssd-4139a7a731f2831963a42b26aac111422be28792.zip
Make leak checks usable in tests that do not utilize check
* Remove check-specific failure reporting from common_check.c * Check-specific abstraction over memleak checks * Rename common_check.c to leak_check.c
Diffstat (limited to 'src/tests/common.h')
-rw-r--r--src/tests/common.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/tests/common.h b/src/tests/common.h
index 61dcbf41f..e7fc812c7 100644
--- a/src/tests/common.h
+++ b/src/tests/common.h
@@ -33,17 +33,18 @@
extern TALLOC_CTX *global_talloc_context;
#define check_leaks(ctx, bytes) _check_leaks((ctx), (bytes), __location__)
-void _check_leaks(TALLOC_CTX *ctx,
+bool _check_leaks(TALLOC_CTX *ctx,
size_t bytes,
const char *location);
void check_leaks_push(TALLOC_CTX *ctx);
#define check_leaks_pop(ctx) _check_leaks_pop((ctx), __location__)
-void _check_leaks_pop(TALLOC_CTX *ctx, const char *location);
+bool _check_leaks_pop(TALLOC_CTX *ctx, const char *location);
-void leak_check_setup(void);
-void leak_check_teardown(void);
+bool leak_check_setup(void);
+bool leak_check_teardown(void);
+const char *check_leaks_err_msg(void);
void tests_set_cwd(void);