aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2021-07-13 23:03:07 +0200
committerneels <nhofmeyr@sysmocom.de>2021-07-15 09:28:18 +0000
commitb4176e52009f33193418ce05438b768d50091e5d (patch)
treeaeb899dd29d76d70e95a2bc77c0138572ed72a76 /tests
parentcc845feb12571d9b935fffc571a1f85fe49eeb6c (diff)
handover tests: test passing of penalty timeout
With recent addition of fake time in handover_test ('wait cmd'), show how a penalty timeout in handover decision 2 passes and allows a handover again after due time. Related: SYS#5198 Change-Id: I65e59cc7309778cf9d71612669ce84d101c8135e
Diffstat (limited to 'tests')
-rw-r--r--tests/handover/test_max_ta.ho_vty16
-rw-r--r--tests/handover/test_penalty_timer.ho_vty14
2 files changed, 30 insertions, 0 deletions
diff --git a/tests/handover/test_max_ta.ho_vty b/tests/handover/test_max_ta.ho_vty
index 05c4a76d5..56dbb19d1 100644
--- a/tests/handover/test_max_ta.ho_vty
+++ b/tests/handover/test_max_ta.ho_vty
@@ -7,15 +7,31 @@
create-n-bts 2
set-ts-use trx 0 0 states * TCH/F - - - - - -
+
network
bts 0
handover2 maximum distance 5
+ handover2 penalty-time max-distance 17
+
meas-rep lchan 0 0 1 0 rxlev 30 rxqual 0 ta 5 neighbors 20
expect-no-chan
meas-rep lchan 0 0 1 0 rxlev 30 rxqual 0 ta 6 neighbors 20
expect-ho from lchan 0 0 1 0 to lchan 1 0 1 0
expect-ts-use trx 0 0 states * - - - - - - -
expect-ts-use trx 1 0 states * TCH/F - - - - - -
+
+# Penalty timer after TA was exceeded is running, so no handover back to the better cell:
meas-rep lchan 1 0 1 0 rxlev 20 rxqual 0 ta 6 neighbors 30
expect-no-chan
+wait 16
+# Penalty timer still running
+meas-rep lchan 1 0 1 0 rxlev 20 rxqual 0 ta 6 neighbors 30
+expect-no-chan
+
+wait 1
+# Now 17 seconds have passed, timeout is done, and a handover is performed again.
+meas-rep lchan 1 0 1 0 rxlev 20 rxqual 0 ta 6 neighbors 30
+expect-ho from lchan 1 0 1 0 to lchan 0 0 1 0
+expect-ts-use trx 0 0 states * TCH/F - - - - - -
+expect-ts-use trx 1 0 states * - - - - - - -
diff --git a/tests/handover/test_penalty_timer.ho_vty b/tests/handover/test_penalty_timer.ho_vty
index 9511b5e32..8d864a2d4 100644
--- a/tests/handover/test_penalty_timer.ho_vty
+++ b/tests/handover/test_penalty_timer.ho_vty
@@ -29,3 +29,17 @@ expect-ts-use trx 1 0 states * - - - - - - -
# No handover because the penalty timer is still running
meas-rep lchan 0 0 1 0 rxlev 20 rxqual 0 ta 0 neighbors 30
expect-no-chan
+
+wait 17
+# at this point, the penalty timer has not yet expired. (4+1+17 = 22 < 23)
+meas-rep lchan 0 0 1 0 rxlev 20 rxqual 0 ta 0 neighbors 30
+expect-no-chan
+expect-ts-use trx 0 0 states * TCH/F - - - - - -
+expect-ts-use trx 1 0 states * - - - - - - -
+
+wait 1
+# now the penalty timer of 23 seconds has passed and the handover is attempted again.
+meas-rep lchan 0 0 1 0 rxlev 20 rxqual 0 ta 0 neighbors 30
+expect-ho from lchan 0 0 1 0 to lchan 1 0 1 0
+expect-ts-use trx 0 0 states * - - - - - - -
+expect-ts-use trx 1 0 states * TCH/F - - - - - -