bsc: TC_ho_int: verify TSC in HandoverCommand
For intra-BSC handovers, also verify the correct Training Sequence Code
in the RR Handover Command (not only in the Channel Activation as added
in previous patch).
Related: SYS#4895 OS#5244
Related: Iae20df4387c3d75752301bd5daeeea7508966393 (osmo-bsc)
Change-Id: I32e3553581eb17812082f1f2ee96cc978e8db668
diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index e8bb99c..04e895a 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -5079,7 +5079,8 @@
var HandoverState hs := {
rr_ho_cmpl_seen := false,
handover_done := false,
- old_chan_nr := -
+ old_chan_nr := -,
+ expect_target_tsc := BTS_TSC[1]
};
/* issue hand-over command on VTY, from BTS 0 to BTS 1 */
f_vty_handover(BSCVTY, 0, 0, g_chan_nr, 1);
@@ -5197,7 +5198,8 @@
var HandoverState hs := {
rr_ho_cmpl_seen := false,
handover_done := false,
- old_chan_nr := -
+ old_chan_nr := -,
+ expect_target_tsc := BTS_TSC[1]
};
/* issue hand-over command on VTY */
f_vty_handover(BSCVTY, 0, 0, g_chan_nr, 1);
@@ -9347,7 +9349,8 @@
var HandoverState hs := {
rr_ho_cmpl_seen := false,
handover_done := false,
- old_chan_nr := -
+ old_chan_nr := -,
+ expect_target_tsc := BTS_TSC[1]
};
/* issue hand-over command on VTY */
f_vty_handover(BSCVTY, 0, 0, g_chan_nr, 1);
diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn
index 5f77764..2b1f711 100644
--- a/bsc/MSC_ConnectionHandler.ttcn
+++ b/bsc/MSC_ConnectionHandler.ttcn
@@ -1467,7 +1467,8 @@
boolean rr_ho_cmpl_seen,
integer mdcx_seen_before_ho,
boolean handover_done,
- RslChannelNr old_chan_nr
+ RslChannelNr old_chan_nr,
+ uint3_t expect_target_tsc optional
};
altstep as_handover(inout HandoverState st) runs on MSC_ConnHdlr {
@@ -1482,6 +1483,19 @@
new_chan_nr, arfcn);
/* FIXME: Determine TRX NR by ARFCN, instead of hard-coded TRX0! */
+ /* Verify correct TSC in handoverCommand */
+ if (ispresent(st.expect_target_tsc)) {
+ var uint3_t got_tsc := rr_chan_desc_tsc(l3.msgs.rrm.handoverCommand.channelDescription2);
+ if (not match(got_tsc, st.expect_target_tsc)) {
+ setverdict(fail, "RR Handover Command: unexpected TSC in Channel Description: expected ",
+ st.expect_target_tsc, " got ", got_tsc);
+ mtc.stop;
+ } else {
+ log("handoverCommand: verified TSC = ", got_tsc, " (matches ",
+ st.expect_target_tsc, ")");
+ }
+ }
+
/* register our component for this channel number at the RSL Emulation */
f_rslem_register(0, new_chan_nr, RSL1_PROC);