<p>fixeria has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/26407">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">ttcn3-tcpdump-stop.sh: order the SUT to print talloc report<br><br>This might be useful when trying to find which of the test cases<br>causes a memlek in the SUT.  This feature relies on the contents<br>of '/tmp/sut.pid', which is expected contain PID of the SUT.<br><br>Change-Id: I1b03b17426d8760c55976e3b78ca2f3af248c055<br>Related: Icd4c2d80db934535d499598282ed9416d8088163<br>Related: OS#5328<br>---<br>M ttcn3-tcpdump-stop.sh<br>1 file changed, 9 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/07/26407/1</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..18fdb43 100755</span><br><span>--- a/ttcn3-tcpdump-stop.sh</span><br><span>+++ b/ttcn3-tcpdump-stop.sh</span><br><span>@@ -1,5 +1,6 @@</span><br><span> #!/bin/sh</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+PIDFILE_SUT=/tmp/sut.pid</span><br><span> PIDFILE_PCAP=/tmp/pcap.pid</span><br><span> PIDFILE_NETCAT=/tmp/netcat.pid</span><br><span> TESTCASE=$1</span><br><span>@@ -19,6 +20,14 @@</span><br><span> fi</span><br><span> }</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 [ -f "$PIDFILE_SUT" ]; then</span><br><span style="color: hsl(120, 100%, 40%);">+  PID=$(cat "$PIDFILE_SUT")</span><br><span style="color: hsl(120, 100%, 40%);">+   if [ -e /proc/$PID/status ]; then</span><br><span style="color: hsl(120, 100%, 40%);">+             kill -s USR1 $PID || true</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> date</span><br><span> </span><br><span> if [ x"$VERDICT" = x"pass" ]; then</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: 1 </div>
<div style="display:none"> Gerrit-Owner: fixeria <vyanitskiy@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>