<p>Vadim Yanitskiy <strong>merged</strong> this change.</p><p><a href="https://gerrit.osmocom.org/13469">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">tests/sms_queue: track the use of NULL talloc memory contexts<br><br>As we don't initialize all talloc contects of libmsc, let's make<br>sure that there is nothing left in the NULL context after the<br>unit test execution is finished.<br><br>Change-Id: I99fd82750aff376e4d90eaa2402ec41f4d59ef86<br>---<br>M tests/sms_queue/sms_queue_test.c<br>M tests/sms_queue/sms_queue_test.err<br>2 files changed, 7 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/tests/sms_queue/sms_queue_test.c b/tests/sms_queue/sms_queue_test.c</span><br><span>index f64f715..84ca6b5 100644</span><br><span>--- a/tests/sms_queue/sms_queue_test.c</span><br><span>+++ b/tests/sms_queue/sms_queue_test.c</span><br><span>@@ -220,6 +220,9 @@</span><br><span>      void *msgb_ctx;</span><br><span>      void *logging_ctx;</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+        /* Track the use of talloc NULL memory contexts */</span><br><span style="color: hsl(120, 100%, 40%);">+    talloc_enable_null_tracking();</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>     talloc_ctx = talloc_named_const(NULL, 0, "sms_queue_test");</span><br><span>        msgb_ctx = msgb_talloc_ctx_init(talloc_ctx, 0);</span><br><span>      logging_ctx = talloc_named_const(talloc_ctx, 0, "logging");</span><br><span>@@ -258,6 +261,9 @@</span><br><span>  OSMO_ASSERT(talloc_total_size(talloc_ctx) == 0);</span><br><span>     talloc_free(talloc_ctx);</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+  talloc_report_full(NULL, stderr);</span><br><span style="color: hsl(120, 100%, 40%);">+     talloc_disable_null_tracking();</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>    return 0;</span><br><span> }</span><br><span> </span><br><span>diff --git a/tests/sms_queue/sms_queue_test.err b/tests/sms_queue/sms_queue_test.err</span><br><span>index e69de29..bfc1aff 100644</span><br><span>--- a/tests/sms_queue/sms_queue_test.err</span><br><span>+++ b/tests/sms_queue/sms_queue_test.err</span><br><span>@@ -0,0 +1 @@</span><br><span style="color: hsl(120, 100%, 40%);">+full talloc report on 'null_context' (total      0 bytes in   1 blocks)</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/13469">change 13469</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/13469"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-msc </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: I99fd82750aff376e4d90eaa2402ec41f4d59ef86 </div>
<div style="display:none"> Gerrit-Change-Number: 13469 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Vadim Yanitskiy <axilirator@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: Harald Welte <laforge@gnumonks.org> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder (1000002) </div>
<div style="display:none"> Gerrit-Reviewer: Vadim Yanitskiy <axilirator@gmail.com> </div>