<p>Vadim Yanitskiy has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/9793">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">tests: make both Valgrind and LeakSanitizer happy<br><br>The talloc_enable_null_tracking() actually allocates a new talloc<br>context, which makes both Valgrind and LeakSanitizer angry. This<br>context should be freed by the talloc_disable_null_tracking().<br><br>Change-Id: Ia660d2fdac720f685c0186720d0a476d7e9468be<br>---<br>M tests/ecu/ecu_fr_test.c<br>M tests/io/pq_file_test.c<br>M tests/io/pq_rtp_test.c<br>M tests/procqueue/pq_test.c<br>4 files changed, 12 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/gapk refs/changes/93/9793/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/tests/ecu/ecu_fr_test.c b/tests/ecu/ecu_fr_test.c</span><br><span>index 372df25..609112f 100644</span><br><span>--- a/tests/ecu/ecu_fr_test.c</span><br><span>+++ b/tests/ecu/ecu_fr_test.c</span><br><span>@@ -143,5 +143,8 @@</span><br><span>         /* Make sure we have no memleaks */</span><br><span>  talloc_report_depth_cb(NULL, 0, 10, &talloc_ctx_walk_cb, NULL);</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+       /* Make both Valgrind and LeakSanitizer happy */</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>diff --git a/tests/io/pq_file_test.c b/tests/io/pq_file_test.c</span><br><span>index 6691db3..664acf7 100644</span><br><span>--- a/tests/io/pq_file_test.c</span><br><span>+++ b/tests/io/pq_file_test.c</span><br><span>@@ -145,5 +145,8 @@</span><br><span>        /* Print talloc memory hierarchy */</span><br><span>  talloc_report_depth_cb(NULL, 0, 10, &talloc_ctx_walk_cb, NULL);</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+       /* Make both Valgrind and LeakSanitizer happy */</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>diff --git a/tests/io/pq_rtp_test.c b/tests/io/pq_rtp_test.c</span><br><span>index f4070b7..2c1bd41 100644</span><br><span>--- a/tests/io/pq_rtp_test.c</span><br><span>+++ b/tests/io/pq_rtp_test.c</span><br><span>@@ -345,5 +345,8 @@</span><br><span>    /* Memory leak detection test */</span><br><span>     talloc_report_depth_cb(NULL, 0, 10, &talloc_ctx_walk_cb, NULL);</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+       /* Make both Valgrind and LeakSanitizer happy */</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>diff --git a/tests/procqueue/pq_test.c b/tests/procqueue/pq_test.c</span><br><span>index 198108d..84b3992 100644</span><br><span>--- a/tests/procqueue/pq_test.c</span><br><span>+++ b/tests/procqueue/pq_test.c</span><br><span>@@ -369,5 +369,8 @@</span><br><span>        printf("Processing queue deallocation test:\n");</span><br><span>   talloc_report_depth_cb(NULL, 0, 10, &talloc_ctx_walk_cb, NULL);</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+       /* Make both Valgrind and LeakSanitizer happy */</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></pre><p>To view, visit <a href="https://gerrit.osmocom.org/9793">change 9793</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/9793"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: gapk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: Ia660d2fdac720f685c0186720d0a476d7e9468be </div>
<div style="display:none"> Gerrit-Change-Number: 9793 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Vadim Yanitskiy <axilirator@gmail.com> </div>