Change in osmo-ttcn3-hacks[master]: log time in tcpdump-start and -stop.sh

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Thu Mar 7 15:39:05 UTC 2019


Neels Hofmeyr has uploaded this change for review. ( https://gerrit.osmocom.org/13166


Change subject: log time in tcpdump-start and -stop.sh
......................................................................

log time in tcpdump-start and -stop.sh

Also log the testcase name in tcpdump-start.sh.

The output now looks like

    ------ MSC_Tests.TC_mo_cc_bssmap_clear ------
    Thu Mar  7 13:21:00 UTC 2019
    [...]
    Thu Mar  7 13:21:04 UTC 2019
    ====== MSC_Tests.TC_mo_cc_bssmap_clear pass ======

The reason to log start and end dates came up like this: I noticed a segfault
in a tested program at a specific time. From the timestamp I tried to find out
which of the tests saw the failure. (After a segfault, all subsequent tests run
and fail, but it is not obvious which failure occured because of a segfault,
and which ones just normally failed before that.) Looking at the timestamps of
the log files didn't help, because the ttcn3_logmerge touched those after the
tests completed. So the only way is to cat each individual log file and find
the timestamp.

So this adds an overview of the timestamps without needing to open log files.

Change-Id: I0832d9b5df599baad5dec8d3a993481b4286fbb3
---
M ttcn3-tcpdump-start.sh
M ttcn3-tcpdump-stop.sh
2 files changed, 5 insertions(+), 0 deletions(-)



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

diff --git a/ttcn3-tcpdump-start.sh b/ttcn3-tcpdump-start.sh
index 395941d..747002b 100755
--- a/ttcn3-tcpdump-start.sh
+++ b/ttcn3-tcpdump-start.sh
@@ -4,6 +4,9 @@
 TCPDUMP=/usr/sbin/tcpdump
 TESTCASE=$1
 
+echo "------ $TESTCASE ------"
+date
+
 if [ "z$TTCN3_PCAP_PATH" = "z" ]; then
 	TTCN3_PCAP_PATH=/tmp
 fi
diff --git a/ttcn3-tcpdump-stop.sh b/ttcn3-tcpdump-stop.sh
index 9404841..baabefe 100755
--- a/ttcn3-tcpdump-stop.sh
+++ b/ttcn3-tcpdump-stop.sh
@@ -4,6 +4,8 @@
 TESTCASE=$1
 VERDICT="$2"
 
+date
+
 if [ x"$VERDICT" = x"pass" ]; then
 	echo "\033[1;32m====== $TESTCASE $VERDICT ======\033[0m"
 else

-- 
To view, visit https://gerrit.osmocom.org/13166
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I0832d9b5df599baad5dec8d3a993481b4286fbb3
Gerrit-Change-Number: 13166
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190307/6f6ef009/attachment.htm>


More information about the gerrit-log mailing list