bsc: add TC_imm_ass_pre_ts_ack
Also test the early IA feature for non-dyn TS in 'pre-ts-ack' mode, for
completeness' sake.
Related: SYS#5559
Change-Id: I6ba84b4b618dd99ec2095aaf611209e525f2b5f4
diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index 5d65a66..74cdaeb 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -9761,6 +9761,51 @@
f_shutdown_helper();
}
+testcase TC_imm_ass_pre_ts_ack() runs on test_CT {
+ var RSL_Message chan_act;
+ var RSL_Message imm_ass;
+
+ f_init(1, false);
+ f_sleep(1.0);
+
+ f_vty_set_imm_ass(BSCVTY, 0, "pre-ts-ack");
+
+ /* RA containing reason=LU */
+ var GsmFrameNumber fn := 2342;
+ var uint8_t ra := 2;
+ f_ipa_tx(0, ts_RSL_CHAN_RQD(int2oct(ra, 1), fn));
+
+ /* (set bts 0 cfg back to default) */
+ f_vty_set_imm_ass(BSCVTY);
+
+ chan_act := f_exp_ipa_rx(0, tr_RSL_MsgTypeD(RSL_MT_CHAN_ACTIV));
+ var RslChannelNr chan_nr := chan_act.ies[0].body.chan_nr;
+ var RSL_IE_Body chan_ident_ie;
+ if (not f_rsl_find_ie(chan_act, RSL_IE_CHAN_IDENT, chan_ident_ie)) {
+ setverdict(fail, "RSL Channel Identification IE is absent");
+ mtc.stop;
+ }
+
+ /* *FIRST* expect the Immediate Assignment, before we ACK the chan act */
+ imm_ass := f_exp_ipa_rx(0, tr_RSL_IMM_ASSIGN(0));
+ f_verify_imm_ass(imm_ass, ra, fn, chan_nr, chan_ident_ie.chan_ident.ch_desc.v.arfcn,
+ chan_ident_ie.chan_ident.ch_desc.v.tsc);
+
+ /* Only now send the Chan Act ACK */
+ f_ipa_tx(0, ts_RSL_CHAN_ACT_ACK(chan_nr, fn+10));
+
+ /* Check that the lchan is working */
+ var octetstring l3 := '00010203040506'O;
+ f_ipa_tx(0, ts_RSL_EST_IND(chan_nr, valueof(ts_RslLinkID_DCCH(0)), l3));
+
+ var BSSAP_N_CONNECT_ind rx_c_ind;
+ BSSAP.receive(tr_BSSAP_CONNECT_ind(?, ?, tr_BSSMAP_ComplL3(l3))) -> value rx_c_ind;
+ BSSAP.send(ts_BSSAP_CONNECT_res(rx_c_ind.connectionId));
+
+ f_sleep(1.0);
+ f_shutdown_helper();
+}
+
testcase TC_imm_ass_pre_chan_ack_dyn_ts() runs on test_CT {
/* change Timeslot 6 before f_init() starts RSL */
f_init_vty();
@@ -10198,6 +10243,7 @@
execute( TC_imm_ass_post_chan_ack() );
execute( TC_imm_ass_pre_chan_ack() );
+ execute( TC_imm_ass_pre_ts_ack() );
execute( TC_imm_ass_pre_chan_ack_dyn_ts() );
execute( TC_imm_ass_pre_ts_ack_dyn_ts() );
}