diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2020-07-07 12:20:44 +0200 |
---|---|---|
committer | pespin <pespin@sysmocom.de> | 2020-07-08 12:37:29 +0000 |
commit | fc5cab9e3a3c5ac9edcd0a5c78c43c5221c16883 (patch) | |
tree | b0f4a5887962556bc68f8a65f386e9d1fc79de44 /osmo-bts-master | |
parent | 37a603b1d374a817d757c13fb3f4a20d76f327b3 (diff) |
ttcn3-bts: Fix most OML test failing after osmo-bts shutdown optimization
Since osmo-bts.git 0a6bdb024f5429a35c56178496158c9b1c3ee032, the process
is quickly terminated during shutdown if no TRX is running. Since in the
OML tests the TTCN3 components implements the OML IPA server side, most
of the time when osmo-bts starts it finds no one listening on the
address and exits immediately. This makes respawn.sh script run osmo-bts
lots of times per seconds (since osmo-bts terminates quicker now). As a
result, it quickly consumes the 500 launch threshold and exits without
starting osmo-bts being launched anymore.
As a result, only first tests pass, and all the later ones fail because
osmo-bts never connects.
Let's add a sleep 1 between respawns in respawn.sh only when running OML
tests (not needed in the others since there's an osmo-bsc always
running). This also clears a lot of output in the logs of osmo-bts
processes restarting over and over again.
Change-Id: I10d3e1ef8325dd78f9ae2b95fbfd1c6d893bf8a4
Diffstat (limited to 'osmo-bts-master')
-rwxr-xr-x | osmo-bts-master/respawn.sh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/osmo-bts-master/respawn.sh b/osmo-bts-master/respawn.sh index 2413916..31a8c06 100755 --- a/osmo-bts-master/respawn.sh +++ b/osmo-bts-master/respawn.sh @@ -2,6 +2,8 @@ trap "kill 0" EXIT +SLEEP_BEFORE_RESPAWN=${SLEEP_BEFORE_RESPAWN:-0} + i=0 max_i=500 while [ $i -lt $max_i ]; do @@ -10,6 +12,10 @@ while [ $i -lt $max_i ]; do LAST_PID=$! wait $LAST_PID echo "$i: stopped pid $LAST_PID with status $?" + if [ $SLEEP_BEFORE_RESPAWN -gt 0 ]; then + echo "sleeping $SLEEP_BEFORE_RESPAWN seconds..." + sleep $SLEEP_BEFORE_RESPAWN + fi i=$(expr $i + 1) done echo "exiting after $max_i runs" |