diff options
author | Oliver Smith <osmith@sysmocom.de> | 2021-12-17 12:04:11 +0100 |
---|---|---|
committer | Oliver Smith <osmith@sysmocom.de> | 2021-12-17 12:25:29 +0100 |
commit | 9678c22cec0229960b08de30cdf7d5e75fb62a45 (patch) | |
tree | 451f91430e6346d3fea16ba30894c014967f28dd | |
parent | 2514245bbdcce440c3518acb8b7885b51cb42a65 (diff) |
ttcn3-tcpdump-stop: add timeout for talloc report
Prevent the script from idling for several minutes without any output if
obtaining the talloc report does not work. It seems to get killed
eventually, but trying for 5s should be enough.
Change-Id: I1bc5baeb94ecd25e1cdab98b060b99747c19d1f9
-rwxr-xr-x | ttcn3-tcpdump-stop.sh | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/ttcn3-tcpdump-stop.sh b/ttcn3-tcpdump-stop.sh index 4fbc53ff..faf5b2b2 100755 --- a/ttcn3-tcpdump-stop.sh +++ b/ttcn3-tcpdump-stop.sh @@ -35,10 +35,15 @@ fi # Order the SUT to print a talloc report if [ "z$OSMO_SUT_HOST" != "z" ] && [ "z$OSMO_SUT_PORT" != "z" ]; then if [ -x "$(command -v osmo_interact_vty.py)" ]; then - osmo_interact_vty.py \ + echo "Saving talloc report from $OSMO_SUT_HOST:$OSMO_SUT_PORT to $TESTCASE.talloc" + if ! timeout 5 osmo_interact_vty.py \ -H $OSMO_SUT_HOST -p $OSMO_SUT_PORT \ -c "en; show talloc-context application full" \ - > "$TTCN3_PCAP_PATH/$TESTCASE.talloc" + > "$TTCN3_PCAP_PATH/$TESTCASE.talloc"; then + echo + echo "ERROR: failed to get talloc report via vty" + echo + fi else echo "Missing osmo_interact_vty.py from osmo-python-tests!" echo " -> Unable to obtain talloc report from the SUT" |