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/.
pespin gerrit-no-reply at lists.osmocom.orgpespin has submitted this change. ( https://gerrit.osmocom.org/c/docker-playground/+/19171 )
Change subject: ttcn3-bts: Fix most OML test failing after osmo-bts shutdown optimization
......................................................................
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
---
M osmo-bts-master/respawn.sh
M ttcn3-bts-test/jenkins.sh
2 files changed, 11 insertions(+), 3 deletions(-)
Approvals:
pespin: Looks good to me, approved; Verified
Hoernchen: Looks good to me, but someone else must approve
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 @@
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"
diff --git a/ttcn3-bts-test/jenkins.sh b/ttcn3-bts-test/jenkins.sh
index d85c82f..c32682c 100755
--- a/ttcn3-bts-test/jenkins.sh
+++ b/ttcn3-bts-test/jenkins.sh
@@ -24,6 +24,7 @@
start_bts() {
local variant
variant="$1"
+ sleep_time_respawn="$2"
echo Starting container with BTS
if [ -z "$variant" ]; then
echo ERROR: You have to specify a BTS variant
@@ -34,6 +35,7 @@
--ulimit core=-1 \
-v $VOL_BASE_DIR/bts:/data \
-v $VOL_BASE_DIR/unix:/data/unix \
+ -e "SLEEP_BEFORE_RESPAWN=$sleep_time_respawn" \
--name ${BUILD_TAG}-bts -d \
$DOCKER_ARGS \
$REPO_USER/osmo-bts-$IMAGE_SUFFIX \
@@ -127,7 +129,7 @@
# 1) classic test suite with BSC for OML and trxcon+fake_trx
start_bsc
-start_bts trx
+start_bts trx 0
start_fake_trx
start_trxcon
start_testsuite
@@ -139,7 +141,7 @@
docker container kill ${BUILD_TAG}-fake_trx
docker container kill ${BUILD_TAG}-bts
cp virtphy/osmo-bts.cfg $VOL_BASE_DIR/bts/
-start_bts virtual
+start_bts virtual 0
start_virtphy
# ... and execute the testsuite again with different cfg
cp virtphy/BTS_Tests.cfg $VOL_BASE_DIR/bts-tester/
@@ -151,7 +153,7 @@
docker container kill ${BUILD_TAG}-virtphy
docker container kill ${BUILD_TAG}-bts
cp oml/osmo-bts.cfg $VOL_BASE_DIR/bts/
-start_bts trx
+start_bts trx 1
start_fake_trx
start_trxcon
# ... and execute the testsuite again with different cfg
--
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/19171
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I10d3e1ef8325dd78f9ae2b95fbfd1c6d893bf8a4
Gerrit-Change-Number: 19171
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Hoernchen <ewild at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200708/8f037a64/attachment.htm>