[MERGED] osmo-msc[master]: cosmetic: msc_vlr_tests: add comment to show expected tallocs

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Mon Nov 20 13:49:33 UTC 2017


Neels Hofmeyr has submitted this change and it was merged.

Change subject: cosmetic: msc_vlr_tests: add comment to show expected tallocs
......................................................................


cosmetic: msc_vlr_tests: add comment to show expected tallocs

If something changed the talloc landscape, it is hard to find out what the test
actually expected when it was written. Add the expectations in an inline
comment.

Change-Id: If92a18bb3dc24c2cf6498aa2da29266267488240
---
M tests/msc_vlr/msc_vlr_tests.c
1 file changed, 13 insertions(+), 0 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/tests/msc_vlr/msc_vlr_tests.c b/tests/msc_vlr/msc_vlr_tests.c
index 7b1db1b..7cd869b 100644
--- a/tests/msc_vlr/msc_vlr_tests.c
+++ b/tests/msc_vlr/msc_vlr_tests.c
@@ -664,6 +664,19 @@
 void check_talloc(void *msgb_ctx, void *tall_bsc_ctx, int expected_blocks)
 {
 	talloc_report_full(msgb_ctx, stderr);
+	/* Expecting these to stick around in tall_bsc_ctx:
+full talloc report on 'msgb' (total      0 bytes in   1 blocks)
+talloc_total_blocks(tall_bsc_ctx) == 9
+full talloc report on 'subscr_conn_test_ctx' (total   2658 bytes in   9 blocks)
+    struct gsup_client             contains    248 bytes in   1 blocks (ref 0) 0x61300000dee0
+    struct gsm_network             contains   2410 bytes in   6 blocks (ref 0) 0x61700000fce0
+        struct vlr_instance            contains    160 bytes in   1 blocks (ref 0) 0x611000009a60
+        no_gsup_server                 contains     15 bytes in   1 blocks (ref 0) 0x60b00000ade0
+        ../../../src/libosmocore/src/rate_ctr.c:199 contains   1552 bytes in   1 blocks (ref 0) 0x61b00001eae0
+        struct llist_head              contains     16 bytes in   1 blocks (ref 0) 0x60b00000ae90
+        .*                             contains      3 bytes in   1 blocks (ref 0) 0x60b00000af40
+    msgb                           contains      0 bytes in   1 blocks (ref 0) 0x60800000bf80
+	*/
 	fprintf(stderr, "talloc_total_blocks(tall_bsc_ctx) == %zu\n",
 		talloc_total_blocks(tall_bsc_ctx));
 	if (talloc_total_blocks(tall_bsc_ctx) != expected_blocks)

-- 
To view, visit https://gerrit.osmocom.org/4927
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: If92a18bb3dc24c2cf6498aa2da29266267488240
Gerrit-PatchSet: 2
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Holger Freyther <holger at freyther.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>



More information about the gerrit-log mailing list