pespin has submitted this change. (
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38847?usp=email )
Change subject: testenv: respawn.sh: don't respawn on segfault
......................................................................
testenv: respawn.sh: don't respawn on segfault
Do not respawn the process if it segfaulted or aborted abnormally in
another way (exit code >= 128).
Change-Id: I6f3f6218095643609a8b8869b57dde6b6bdb77a0
---
M _testenv/data/scripts/respawn.sh
1 file changed, 6 insertions(+), 1 deletion(-)
Approvals:
Jenkins Builder: Verified
fixeria: Looks good to me, approved
pespin: Looks good to me, but someone else must approve
diff --git a/_testenv/data/scripts/respawn.sh b/_testenv/data/scripts/respawn.sh
index 3b079c7..1036569 100755
--- a/_testenv/data/scripts/respawn.sh
+++ b/_testenv/data/scripts/respawn.sh
@@ -12,7 +12,12 @@
$* &
LAST_PID=$!
wait $LAST_PID
- echo "respawn: $i: stopped pid $LAST_PID with status $?"
+ LAST_STATUS=$?
+ echo "respawn: $i: stopped pid $LAST_PID with status $LAST_STATUS"
+ if [ $LAST_STATUS -ge 128 ]; then
+ echo "respawn: process was terminated abnormally, not respawning"
+ exit $LAST_STATUS
+ fi
if [ $SLEEP_BEFORE_RESPAWN -gt 0 ]; then
echo "respawn: sleeping $SLEEP_BEFORE_RESPAWN seconds..."
sleep $SLEEP_BEFORE_RESPAWN
--
To view, visit
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38847?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: I6f3f6218095643609a8b8869b57dde6b6bdb77a0
Gerrit-Change-Number: 38847
Gerrit-PatchSet: 3
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>