diff options
author | Tom Rini <trini@ti.com> | 2014-10-26 14:03:08 -0400 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2014-10-26 14:03:08 -0400 |
commit | 84a6df09c78bc9e9cbc6265d99c9097f5f1079f2 (patch) | |
tree | 3b2bf1b3689e9aad0d20f5a69ada168cae3cc769 /include/dm/test.h | |
parent | c69ecd9722af22d50295eff81d0b9cd5b8adc2e0 (diff) | |
parent | c2ded962d4703a3f9522553004db4a6fe540f7e6 (diff) | |
download | u-boot-imx-84a6df09c78bc9e9cbc6265d99c9097f5f1079f2.zip u-boot-imx-84a6df09c78bc9e9cbc6265d99c9097f5f1079f2.tar.gz u-boot-imx-84a6df09c78bc9e9cbc6265d99c9097f5f1079f2.tar.bz2 |
Merge git://git.denx.de/u-boot-dm
Fix a trivial conflict over adding <dm.h>
Conflicts:
arch/arm/cpu/armv7/omap3/board.c
Signed-off-by: Tom Rini <trini@ti.com>
Diffstat (limited to 'include/dm/test.h')
-rw-r--r-- | include/dm/test.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/include/dm/test.h b/include/dm/test.h index 235d728..f08c05d 100644 --- a/include/dm/test.h +++ b/include/dm/test.h @@ -8,6 +8,7 @@ #define __DM_TEST_H #include <dm.h> +#include <malloc.h> /** * struct dm_test_cdata - configuration data for test instance @@ -120,6 +121,7 @@ struct dm_test_state { int force_fail_alloc; int skip_post_probe; struct udevice *removed; + struct mallinfo start; }; /* Test flags for each test */ @@ -178,6 +180,27 @@ int dm_check_operations(struct dm_test_state *dms, struct udevice *dev, int dm_check_devices(struct dm_test_state *dms, int num_devices); /** + * dm_leak_check_start() - Prepare to check for a memory leak + * + * Call this before allocating memory to record the amount of memory being + * used. + * + * @dms: Overall test state + */ +void dm_leak_check_start(struct dm_test_state *dms); + +/** + * dm_leak_check_end() - Check that no memory has leaked + * + * Call this after dm_leak_check_start() and after you have hopefuilly freed + * all the memory that was allocated. This function will print an error if + * it sees a different amount of total memory allocated than before. + * + * @dms: Overall test state + */int dm_leak_check_end(struct dm_test_state *dms); + + +/** * dm_test_main() - Run all the tests * * This runs all available driver model tests |