laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37723?usp=email )
Change subject: ttcn3-(tcp)dump(pcap)-stop.sh: store multiple runs of same test into different pcap file
......................................................................
ttcn3-(tcp)dump(pcap)-stop.sh: store multiple runs of same test into different pcap file
This is useful when testing the behavior of a SUT when the same scenario
is run twice, for instance to debug a crash in the SUT.
In this setup, it is definetly interesting to have stored pcaps of the
several times the scenario is run.
Change-Id: Ib68fc4df1f5a105b4b2c904d2d2003c621a2ad31
---
M ttcn3-dumpcap-stop.sh
M ttcn3-tcpdump-stop.sh
2 files changed, 22 insertions(+), 2 deletions(-)
Approvals:
osmith: Looks good to me, approved
laforge: Looks good to me, approved
Jenkins Builder: Verified
fixeria: Looks good to me, but someone else must approve
diff --git a/ttcn3-dumpcap-stop.sh b/ttcn3-dumpcap-stop.sh
index 188b8da..95bcdb6 100755
--- a/ttcn3-dumpcap-stop.sh
+++ b/ttcn3-dumpcap-stop.sh
@@ -48,4 +48,14 @@
kill_rm_pidfile "$PIDFILE_PCAP"
kill_rm_pidfile "$PIDFILE_NETCAT"
-gzip -f "$TTCN3_PCAP_PATH/$TESTCASE.pcapng"
+# Add a numeral suffix to subsequent runs of the same test:
+PCAP_FILENAME=$TTCN3_PCAP_PATH/$TESTCASE.pcapng
+if [ -f "$TTCN3_PCAP_PATH/$TESTCASE.pcapng.gz" ]; then
+ i=1
+ while [ -f "$TTCN3_PCAP_PATH/$TESTCASE.$i.pcapng.gz" ];
+ do i=$((i+1))
+ done
+ mv "$PCAP_FILENAME" "$TTCN3_PCAP_PATH/$TESTCASE.$i.pcapng"
+ PCAP_FILENAME="$TTCN3_PCAP_PATH/$TESTCASE.$i.pcapng"
+fi
+gzip -f "$PCAP_FILENAME"
diff --git a/ttcn3-tcpdump-stop.sh b/ttcn3-tcpdump-stop.sh
index 82d3a4f..0ac1b5e 100755
--- a/ttcn3-tcpdump-stop.sh
+++ b/ttcn3-tcpdump-stop.sh
@@ -72,4 +72,14 @@
kill_rm_pidfile "$PIDFILE_NETCAT"
rm $FIFO
-gzip -f "$TTCN3_PCAP_PATH/$TESTCASE.pcap"
+# Add a numeral suffix to subsequent runs of the same test:
+PCAP_FILENAME=$TTCN3_PCAP_PATH/$TESTCASE.pcap
+if [ -f "$TTCN3_PCAP_PATH/$TESTCASE.pcap.gz" ]; then
+ i=1
+ while [ -f "$TTCN3_PCAP_PATH/$TESTCASE.$i.pcap.gz" ];
+ do i=$((i+1))
+ done
+ mv "$PCAP_FILENAME" "$TTCN3_PCAP_PATH/$TESTCASE.$i.pcap"
+ PCAP_FILENAME="$TTCN3_PCAP_PATH/$TESTCASE.$i.pcap"
+fi
+gzip -f "$PCAP_FILENAME"
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37723?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ib68fc4df1f5a105b4b2c904d2d2003c621a2ad31
Gerrit-Change-Number: 37723
Gerrit-PatchSet: 4
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Attention is currently required from: laforge.
osmith has posted comments on this change by osmith. ( https://gerrit.osmocom.org/c/docker-playground/+/37783?usp=email )
Change subject: common/Release.key: update
......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1:
> I think this deserves also a news item on osmocom.org. […]
Makes sense, done now: https://osmocom.org/news/268
--
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/37783?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I7446565ff3bbbcd30e53234786d84109583284a5
Gerrit-Change-Number: 37783
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Wed, 07 Aug 2024 14:17:35 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Attention is currently required from: dexter, fixeria.
laforge has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/pysim/+/37641?usp=email )
Change subject: pySim-shell: enable export of DF and ADF files
......................................................................
Patch Set 2: Code-Review+1
(1 comment)
Patchset:
PS2:
as fsdump was introduced between your original patch and this one, please give fsdump a try and see if it still works.
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/37641?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I3ee661dbae5c11fec23911775f352ac13bc2c6e5
Gerrit-Change-Number: 37641
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 05 Aug 2024 14:31:51 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes