<p>fixeria <strong>submitted</strong> this change.</p><p><a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/26407">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Jenkins Builder: Verified
pespin: Looks good to me, but someone else must approve
laforge: Looks good to me, approved
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">ttcn3-tcpdump-stop.sh: order the SUT to print talloc report<br><br>The idea is to generate a talloc report after execution of a test<br>case and store it together with PCAP files. This might be useful<br>for detecting memory leaks and finding the relevant test cases.<br><br>To enable this feature, make sure that osmo_interact_vty.py from<br>osmo-python-tests is installed (see [1]), and the following<br>variables are set (see [2]):<br><br>* OSMO_SUT_HOST (e.g. "127.0.0.1"), and<br>* OSMO_SUT_PORT (e.g. 4242).<br><br>Change-Id: I1b03b17426d8760c55976e3b78ca2f3af248c055<br>Depends: [1] Ida8e08e7fe4f171f934a2d4eef4568da7c398f5c<br>Related: [2] Icd4c2d80db934535d499598282ed9416d8088163<br>Related: OS#5328<br>---<br>M ttcn3-tcpdump-stop.sh<br>1 file changed, 13 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/ttcn3-tcpdump-stop.sh b/ttcn3-tcpdump-stop.sh</span><br><span>index b2a3a3e..4fbc53f 100755</span><br><span>--- a/ttcn3-tcpdump-stop.sh</span><br><span>+++ b/ttcn3-tcpdump-stop.sh</span><br><span>@@ -32,6 +32,19 @@</span><br><span> TTCN3_PCAP_PATH=/tmp</span><br><span> fi</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+# Order the SUT to print a talloc report</span><br><span style="color: hsl(120, 100%, 40%);">+if [ "z$OSMO_SUT_HOST" != "z" ] && [ "z$OSMO_SUT_PORT" != "z" ]; then</span><br><span style="color: hsl(120, 100%, 40%);">+ if [ -x "$(command -v osmo_interact_vty.py)" ]; then</span><br><span style="color: hsl(120, 100%, 40%);">+ osmo_interact_vty.py \</span><br><span style="color: hsl(120, 100%, 40%);">+ -H $OSMO_SUT_HOST -p $OSMO_SUT_PORT \</span><br><span style="color: hsl(120, 100%, 40%);">+ -c "en; show talloc-context application full" \</span><br><span style="color: hsl(120, 100%, 40%);">+ > "$TTCN3_PCAP_PATH/$TESTCASE.talloc"</span><br><span style="color: hsl(120, 100%, 40%);">+ else</span><br><span style="color: hsl(120, 100%, 40%);">+ echo "Missing osmo_interact_vty.py from osmo-python-tests!"</span><br><span style="color: hsl(120, 100%, 40%);">+ echo " -> Unable to obtain talloc report from the SUT"</span><br><span style="color: hsl(120, 100%, 40%);">+ fi</span><br><span style="color: hsl(120, 100%, 40%);">+fi</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> # Wait for up to 2 seconds if we keep receiving traffinc from packet dumper,</span><br><span> # otherwise we might lose last packets from test.</span><br><span> i=0</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/26407">change 26407</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/c/osmo-ttcn3-hacks/+/26407"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: osmo-ttcn3-hacks </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I1b03b17426d8760c55976e3b78ca2f3af248c055 </div>
<div style="display:none"> Gerrit-Change-Number: 26407 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: fixeria <vyanitskiy@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-Reviewer: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>