bsc: properly check TSC and ARFCN in early IA tests

Tests have shown that the Training Sequence Set was not correct in early
IMM ASS messages. Add validation of the TSC and ARFCN in IMM ASS
messages for all early IA related tests. This makes the tests fail.

Related osmo-bsc patch linked below makes the tests pass again.

Related: SYS#5559
Related: I9f26074154600d854a0b3baee2f38a6666f4cb56 (osmo-bsc)
Change-Id: I4479244b0c53648e62e84e1ebf986f51d659484f
This commit is contained in:
Neels Hofmeyr 2021-09-07 19:05:52 +02:00
parent 8f17e05e25
commit 07603cffe9
1 changed files with 33 additions and 6 deletions

View File

@ -9649,7 +9649,9 @@ private function f_vty_set_imm_ass(TELNETasp_PT pt, BtsNr bts_nr := 0, charstrin
}
private function f_verify_imm_ass(RSL_Message imm_ass, template uint8_t ra := ?, template GsmFrameNumber fn := ?,
template RslChannelNr chan_nr := ?)
template RslChannelNr chan_nr := ?,
template (present) uint12_t arfcn := ?,
template (present) uint3_t tsc := ?)
{
var RSL_IE_Body full_imm_ass_info;
if (not f_rsl_find_ie(imm_ass, RSL_IE_FULL_IMM_ASS_INFO, full_imm_ass_info)) {
@ -9660,7 +9662,7 @@ private function f_verify_imm_ass(RSL_Message imm_ass, template uint8_t ra := ?,
var GsmRrMessage rr_imm_ass := dec_GsmRrMessage(full_imm_ass_info.full_imm_ass_info.payload);
var template GsmRrMessage expect_imm_ass := tr_IMM_ASS(ra := ra,
fn := fn,
ch_desc := tr_ChanDescH0(chan_nr),
ch_desc := tr_ChanDescH0(chan_nr, arfcn, tsc),
page_mode := ?);
if (not match(rr_imm_ass, expect_imm_ass)) {
log("Error: expected ", expect_imm_ass, " got ", rr_imm_ass);
@ -9688,12 +9690,19 @@ testcase TC_imm_ass_post_chan_ack() runs on test_CT {
/* First send the Chan Act ACK */
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;
}
f_ipa_tx(0, ts_RSL_CHAN_ACT_ACK(chan_nr, fn + 10));
/* Then expect the Immediate Assignment, after we ACKed 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);
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);
/* Check that the lchan is working */
var octetstring l3 := '00010203040506'O;
@ -9726,10 +9735,16 @@ testcase TC_imm_ass_pre_chan_ack() runs on test_CT {
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);
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));
@ -9792,10 +9807,16 @@ testcase TC_imm_ass_pre_chan_ack_dyn_ts() runs on test_CT {
chan_nr := valueof(t_RslChanNr_SDCCH8(tn := 6, sub_slot := 0));
chan_act := f_exp_ipa_rx(0, tr_RSL_MsgTypeD(RSL_MT_CHAN_ACTIV));
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);
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));
@ -9863,9 +9884,15 @@ testcase TC_imm_ass_pre_ts_ack_dyn_ts() runs on test_CT {
chan_nr := valueof(t_RslChanNr_SDCCH8(tn := 6, sub_slot := 0));
chan_act := f_exp_ipa_rx(0, tr_RSL_MsgTypeD(RSL_MT_CHAN_ACTIV));
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;
}
f_ipa_tx(0, ts_RSL_CHAN_ACT_ACK(chan_nr, fn+10));
f_verify_imm_ass(imm_ass, ra, fn, chan_nr);
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);
/* Check that the lchan is working */
var octetstring l3 := '00010203040506'O;