diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index e8bb99cf6..04e895adc 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -5079,7 +5079,8 @@ private function f_tc_ho_int(charstring id) runs on MSC_ConnHdlr { 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 @@ private function f_tc_ho_int_radio_link_failure(charstring id) runs on MSC_ConnH 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 @@ private function f_tc_ho_during_lcs_loc_req(charstring id) runs on MSC_ConnHdlr 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 5f7776458..2b1f71167 100644 --- a/bsc/MSC_ConnectionHandler.ttcn +++ b/bsc/MSC_ConnectionHandler.ttcn @@ -1467,7 +1467,8 @@ type record HandoverState { 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 @@ altstep as_handover(inout HandoverState st) runs on MSC_ConnHdlr { 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);