diff options
author | Albert ARIBAUD <albert.u.boot@aribaud.net> | 2015-10-14 08:46:36 (GMT) |
---|---|---|
committer | Albert ARIBAUD <albert.u.boot@aribaud.net> | 2015-10-14 08:46:36 (GMT) |
commit | 13a3972585af60ec367d209cedbd3601e0c77467 (patch) | |
tree | 4b3312669b3e501f6bc10b39d8c7bbf516f07aac /test/dm | |
parent | 208bd51396fb606dbdcf45b064e6b372d7dd3e81 (diff) | |
parent | 297faccca2235e359012118495b9b73451d54bb9 (diff) | |
download | u-boot-13a3972585af60ec367d209cedbd3601e0c77467.tar.xz |
Merge remote-tracking branch 'u-boot/master'
Diffstat (limited to 'test/dm')
-rw-r--r-- | test/dm/core.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/dm/core.c b/test/dm/core.c index 976a706..9fbc70d 100644 --- a/test/dm/core.c +++ b/test/dm/core.c @@ -77,7 +77,7 @@ void dm_leak_check_start(struct unit_test_state *uts) int dm_leak_check_end(struct unit_test_state *uts) { struct mallinfo end; - int id; + int id, diff; /* Don't delete the root class, since we started with that */ for (id = UCLASS_ROOT + 1; id < UCLASS_COUNT; id++) { @@ -90,6 +90,11 @@ int dm_leak_check_end(struct unit_test_state *uts) } end = mallinfo(); + diff = end.uordblks - uts->start.uordblks; + if (diff > 0) + printf("Leak: lost %#xd bytes\n", diff); + else if (diff < 0) + printf("Leak: gained %#xd bytes\n", -diff); ut_asserteq(uts->start.uordblks, end.uordblks); return 0; |