summaryrefslogtreecommitdiffstats
path: root/openbsc
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-01-13 11:46:32 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-01-18 13:17:08 +0100
commit07de92e2c0ccfa89b9498c8c49a74d0848b7b85a (patch)
tree1206791736c5f18f3ffce1d92f21d3a004719789 /openbsc
parenta6ddc2d99f8463edb0b5eacf080db0b5ca571efc (diff)
sgsn/test: Add checks and reports to detect msgb leakage
This commit adds talloc reports to log remaining chunks after the testing has been finished. It also adds a (currently disabled) check, that no msgbs are allocated after running the tests. Sponsored-by: On-Waves ehf
Diffstat (limited to 'openbsc')
-rw-r--r--openbsc/tests/sgsn/sgsn_test.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/openbsc/tests/sgsn/sgsn_test.c b/openbsc/tests/sgsn/sgsn_test.c
index 391cb6326..ae7a715e2 100644
--- a/openbsc/tests/sgsn/sgsn_test.c
+++ b/openbsc/tests/sgsn/sgsn_test.c
@@ -1461,6 +1461,10 @@ int main(int argc, char **argv)
test_gmm_cancel();
test_gmm_ptmsi_allocation();
printf("Done\n");
+
+ talloc_report_full(tall_bsc_ctx, stderr);
+ /* TODO: The following check currently fails */
+ /* OSMO_ASSERT(talloc_total_blocks(tall_msgb_ctx) == 1); */
return 0;
}