aboutsummaryrefslogtreecommitdiffstats
path: root/libtest/libtest.h
diff options
context:
space:
mode:
authorMattias Andrée <m@maandree.se>2026-05-14 15:55:33 +0200
committerMattias Andrée <m@maandree.se>2026-05-14 15:55:33 +0200
commit4e6f25806e3c9fa4753ce959ef990167796acd32 (patch)
treee641de9953f5b58afc1f36efe9c42a0d20254cd2 /libtest/libtest.h
parentFix libtest and add file descriptor leak detection (diff)
downloadlibrecrypt-4e6f25806e3c9fa4753ce959ef990167796acd32.tar.gz
librecrypt-4e6f25806e3c9fa4753ce959ef990167796acd32.tar.bz2
librecrypt-4e6f25806e3c9fa4753ce959ef990167796acd32.tar.xz
Tests and fixes
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to '')
-rw-r--r--libtest/libtest.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/libtest/libtest.h b/libtest/libtest.h
index 8f44114..e4b4098 100644
--- a/libtest/libtest.h
+++ b/libtest/libtest.h
@@ -7,18 +7,27 @@
/**
* Start tracking resources which `libtest_check_no_leaks`
* will detect if they are not released
+ *
+ * Memory resource tracking will only be started for the
+ * calling thread
*/
void libtest_start_tracking(void);
/**
* Stop tracking resources, so that `libtest_check_no_leaks`
* will not detect if they are not released
+ *
+ * Memory resource tracking will only be stop for the
+ * calling thread
*/
void libtest_stop_tracking(void);
/**
* Check for resource leaks
*
+ * Memory leaks are detected for all threads with
+ * tracking enabled, not just the calling thread
+ *
* Any leak will be printed to standard error
*
* @return 1 if there was no leaks, 0 otherwise
@@ -30,6 +39,8 @@ int libtest_check_no_leaks(void);
* Make all overriden memory allocation functions
* full the usable memory area with null bytes,
* or disable this feature
+ *
+ * The setting applies only to the calling thread
*
* @param enabled 1 to enable, 0 to disable
*/
@@ -40,6 +51,8 @@ void libtest_force_zero_on_alloc(int enabled);
* check that the entire usable memory area is filled
* with null bytes, or disable this feature
*
+ * The setting applies only to the calling thread
+ *
* @param enabled 1 to enable, 0 to disable
*/
void libtest_expect_zeroed_on_free(int enabled);