fixeria has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/26407 )


Change subject: ttcn3-tcpdump-stop.sh: order the SUT to print talloc report
......................................................................

ttcn3-tcpdump-stop.sh: order the SUT to print talloc report

This might be useful when trying to find which of the test cases
causes a memlek in the SUT.  This feature relies on the contents
of '/tmp/sut.pid', which is expected contain PID of the SUT.

Change-Id: I1b03b17426d8760c55976e3b78ca2f3af248c055
Related: Icd4c2d80db934535d499598282ed9416d8088163
Related: OS#5328
---
M ttcn3-tcpdump-stop.sh
1 file changed, 9 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/07/26407/1

diff --git a/ttcn3-tcpdump-stop.sh b/ttcn3-tcpdump-stop.sh
index b2a3a3e..18fdb43 100755
--- a/ttcn3-tcpdump-stop.sh
+++ b/ttcn3-tcpdump-stop.sh
@@ -1,5 +1,6 @@
 #!/bin/sh

+PIDFILE_SUT=/tmp/sut.pid
 PIDFILE_PCAP=/tmp/pcap.pid
 PIDFILE_NETCAT=/tmp/netcat.pid
 TESTCASE=$1
@@ -19,6 +20,14 @@
 fi
 }

+# Order the SUT to print a talloc report
+if [ -f "$PIDFILE_SUT" ]; then
+       PID=$(cat "$PIDFILE_SUT")
+       if [ -e /proc/$PID/status ]; then
+               kill -s USR1 $PID || true
+       fi
+fi
+
 date

 if [ x"$VERDICT" = x"pass" ]; then

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/26407
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I1b03b17426d8760c55976e3b78ca2f3af248c055
Gerrit-Change-Number: 26407
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <[email protected]>
Gerrit-MessageType: newchange

Reply via email to