library/IPA_Emulation: assume TRX#0 in ASP_RSL_Unitdata templates

Change-Id: I93297680a2644516870222c2bb8eee03c6b575a9
changes/57/18457/1
Vadim Yanitskiy 3 years ago
parent 6b4856dd17
commit 9b4e356886
  1. 46
      bsc/BSC_Tests.ttcn
  2. 17
      bsc/BSC_Tests_CBSP.ttcn
  3. 6
      library/IPA_Emulation.ttcnpp
  4. 11
      library/RSL_Emulation.ttcn
  5. 2
      selftest/Selftest.ttcn

@ -228,7 +228,7 @@ runs on test_CT {
alt {
[] IPA_RSL[i].receive(tr_ASP_IPA_EV(ASP_IPA_EVENT_ID_ACK)) {
T.stop;
IPA_RSL[i].send(ts_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0,ts_RSL_PAGING_LOAD_IND(23)));
IPA_RSL[i].send(ts_ASP_RSL_UD(ts_RSL_PAGING_LOAD_IND(23)));
}
[] IPA_RSL[i].receive(ASP_IPA_Event:?) { repeat }
[] IPA_RSL[i].receive { repeat }
@ -398,7 +398,7 @@ runs on test_CT return RSL_Message {
T.start;
alt {
[] IPA_RSL[bts_nr].receive(tr_ASP_RSL_UD(sid, t_rx)) -> value rx_rsl_ud {
[] IPA_RSL[bts_nr].receive(tr_ASP_RSL_UD(t_rx, sid)) -> value rx_rsl_ud {
T.stop;
}
[] IPA_RSL[bts_nr].receive { repeat; }
@ -413,7 +413,7 @@ runs on test_CT return RSL_Message {
/* helper function to transmit RSL on a given BTS/stream */
function f_ipa_tx(integer bts_nr, template RSL_Message t_tx, IpaStreamId sid := IPAC_PROTO_RSL_TRX0)
runs on test_CT {
IPA_RSL[bts_nr].send(ts_ASP_RSL_UD(sid, t_tx));
IPA_RSL[bts_nr].send(ts_ASP_RSL_UD(t_tx, sid));
}
@ -424,7 +424,7 @@ testcase TC_chan_act_noreply() runs on test_CT {
f_init(1);
IPA_RSL[0].send(ts_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0,ts_RSL_CHAN_RQD('23'O, 23)));
IPA_RSL[0].send(ts_ASP_RSL_UD(ts_RSL_CHAN_RQD('23'O, 23)));
rsl_unused := f_exp_ipa_rx(0, tr_RSL_MsgTypeD(RSL_MT_CHAN_ACTIV));
setverdict(pass);
}
@ -438,7 +438,7 @@ testcase TC_chan_act_counter() runs on test_CT {
f_init(1);
chreq_total := f_ctrl_get_ratectr_abs(IPA_CTRL, "bts", 0, "chreq:total");
IPA_RSL[0].send(ts_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0,ts_RSL_CHAN_RQD('23'O, 23)));
IPA_RSL[0].send(ts_ASP_RSL_UD(ts_RSL_CHAN_RQD('23'O, 23)));
rsl_unused := f_exp_ipa_rx(0, tr_RSL_MsgTypeD(RSL_MT_CHAN_ACTIV));
f_ctrl_get_exp_ratectr_abs(IPA_CTRL, "bts", 0, "chreq:total", chreq_total+1);
@ -554,11 +554,10 @@ testcase TC_chan_exhaustion() runs on test_CT {
f_ipa_tx(0, ts_RSL_CHAN_RQD('42'O, 42));
alt {
[] IPA_RSL[0].receive(tr_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0,
tr_RSL_MsgTypeD(RSL_MT_CHAN_ACTIV))) {
[] IPA_RSL[0].receive(tr_ASP_RSL_UD(tr_RSL_MsgTypeD(RSL_MT_CHAN_ACTIV))) {
setverdict(fail, "Received CHAN ACT ACK without resources?!?");
}
[] IPA_RSL[0].receive(tr_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0, tr_RSL_IMM_ASSIGN(?))) -> value rsl_ud {
[] IPA_RSL[0].receive(tr_ASP_RSL_UD(tr_RSL_IMM_ASSIGN(?))) -> value rsl_ud {
var GsmRrMessage rr;
/* match on IMM ASS REJ */
rr := dec_GsmRrMessage(rsl_ud.rsl.ies[1].body.full_imm_ass_info.payload);
@ -590,13 +589,11 @@ testcase TC_chan_deact_silence() runs on test_CT {
/* Expect CHANnel RELease */
alt {
[] IPA_RSL[0].receive(tr_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0,
tr_RSL_MsgTypeD(RSL_MT_RF_CHAN_REL))) {
[] IPA_RSL[0].receive(tr_ASP_RSL_UD(tr_RSL_MsgTypeD(RSL_MT_RF_CHAN_REL))) {
log("Received CHANnel RELease");
setverdict(pass);
}
[] IPA_RSL[0].receive(tr_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0,
tr_RSL_IMM_ASSIGN(?))) {
[] IPA_RSL[0].receive(tr_ASP_RSL_UD(tr_RSL_IMM_ASSIGN(?))) {
/* See OS#3709, OsmoBSC should not send Immediate
* Assignment Reject since a dedicated channel was
* already allocated, and Immediate Assignment was
@ -926,21 +923,19 @@ function f_expect_chan_rel(integer bts_nr, RslChannelNr rsl_chan_nr,
log("f_expect_chan_rel() expecting: expect_deact_sacch=", expect_deact_sacch, " expect_rr_chan_rel=", expect_rr_chan_rel,
" expect_rll_rel_req=", expect_rll_rel_req);
alt {
[] IPA_RSL[bts_nr].receive(tr_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0,
tr_RSL_DEACT_SACCH(rsl_chan_nr))) {
[] IPA_RSL[bts_nr].receive(tr_ASP_RSL_UD(tr_RSL_DEACT_SACCH(rsl_chan_nr))) {
got_deact_sacch := true;
repeat;
}
[is_csfb] IPA_RSL[bts_nr].receive(tr_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0, tr_RSL_DATA_REQ(rsl_chan_nr, ?, decmatch tr_RRM_RR_RELEASE_CSFB))) {
[is_csfb] IPA_RSL[bts_nr].receive(tr_ASP_RSL_UD(tr_RSL_DATA_REQ(rsl_chan_nr, ?, decmatch tr_RRM_RR_RELEASE_CSFB))) {
got_rr_chan_rel := true;
repeat;
}
[not is_csfb] IPA_RSL[bts_nr].receive(tr_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0, tr_RSL_DATA_REQ(rsl_chan_nr, ?, decmatch tr_RRM_RR_RELEASE))) {
[not is_csfb] IPA_RSL[bts_nr].receive(tr_ASP_RSL_UD(tr_RSL_DATA_REQ(rsl_chan_nr, ?, decmatch tr_RRM_RR_RELEASE))) {
got_rr_chan_rel := true;
repeat;
}
[] IPA_RSL[bts_nr].receive(tr_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0,
tr_RSL_REL_REQ(rsl_chan_nr, ?))) {
[] IPA_RSL[bts_nr].receive(tr_ASP_RSL_UD(tr_RSL_REL_REQ(rsl_chan_nr, ?))) {
got_rll_rel_req := true;
/* FIXME: Why are we getting this for LinkID SACCH? */
if (handle_rll_rel) {
@ -948,13 +943,12 @@ function f_expect_chan_rel(integer bts_nr, RslChannelNr rsl_chan_nr,
}
repeat;
}
[] IPA_RSL[bts_nr].receive(tr_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0,
tr_RSL_MsgTypeD(RSL_MT_RF_CHAN_REL))) {
[] IPA_RSL[bts_nr].receive(tr_ASP_RSL_UD(tr_RSL_MsgTypeD(RSL_MT_RF_CHAN_REL))) {
/* respond with CHAN REL ACK */
f_ipa_tx(0, ts_RSL_RF_CHAN_REL_ACK(rsl_chan_nr));
}
/* ignore any user data */
[] IPA_RSL[bts_nr].receive(tr_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0, tr_RSL_MsgTypeR(?))) {
[] IPA_RSL[bts_nr].receive(tr_ASP_RSL_UD(tr_RSL_MsgTypeR(?))) {
repeat;
}
}
@ -1348,7 +1342,7 @@ private function f_pageing_helper(hexstring imsi,
}
T.start;
alt {
[] IPA_RSL[i].receive(tr_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0, tr_RSL_PAGING_CMD(mi))) {
[] IPA_RSL[i].receive(tr_ASP_RSL_UD(tr_RSL_PAGING_CMD(mi))) {
setverdict(fail, "Paging on BTS ", i, " which is not part of ", bts_ids);
}
[] IPA_RSL[i].receive { repeat; }
@ -1524,7 +1518,7 @@ testcase TC_paging_imsi_load() runs on test_CT {
T.start;
T_retrans.start;
alt {
[] IPA_RSL[0].receive(tr_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0, tr_RSL_PAGING_CMD(?))) {
[] IPA_RSL[0].receive(tr_ASP_RSL_UD(tr_RSL_PAGING_CMD(?))) {
setverdict(fail, "Received PAGING after LOAD_IND(0)");
mtc.stop;
}
@ -1607,15 +1601,15 @@ testcase TC_paging_imsi_a_reset() runs on test_CT {
/* Wait for 3 seconds if any more PAGING CMD are received on RSL */
T.start;
alt {
[] IPA_RSL[0].receive(tr_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0, tr_RSL_PAGING_CMD(?))) {
[] IPA_RSL[0].receive(tr_ASP_RSL_UD(tr_RSL_PAGING_CMD(?))) {
setverdict(fail, "Received PAGING after A-RESET");
mtc.stop;
}
[] IPA_RSL[1].receive(tr_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0, tr_RSL_PAGING_CMD(?))) {
[] IPA_RSL[1].receive(tr_ASP_RSL_UD(tr_RSL_PAGING_CMD(?))) {
setverdict(fail, "Received PAGING after A-RESET");
mtc.stop;
}
[] IPA_RSL[2].receive(tr_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0, tr_RSL_PAGING_CMD(?))) {
[] IPA_RSL[2].receive(tr_ASP_RSL_UD(tr_RSL_PAGING_CMD(?))) {
setverdict(fail, "Received PAGING after A-RESET");
mtc.stop;
}

@ -537,7 +537,7 @@ testcase TC_cbsp_emerg_write_bts_cgi_dchan() runs on cbsp_test_CT {
timer T := 5.0;
T.start;
alt {
[] IPA_RSL[0].receive(tr_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0, tr_RSL_DATA_REQ(dt.rsl_chan_nr, ?, ?))) -> value rx_rsl_ud {
[] IPA_RSL[0].receive(tr_ASP_RSL_UD(tr_RSL_DATA_REQ(dt.rsl_chan_nr, ?, ?))) -> value rx_rsl_ud {
var RSL_IE_Body l3_ie;
if (f_rsl_find_ie(rx_rsl_ud.rsl, RSL_IE_L3_INFO, l3_ie) == false) {
setverdict(fail, "RSL DATA REQ without L3?");
@ -575,11 +575,10 @@ testcase TC_cbsp_emerg_write_bts_cgi_cchan() runs on cbsp_test_CT {
timer T := 5.0;
T.start;
alt {
[] IPA_RSL[0].receive(tr_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0,
tr_RSL_OSMO_ETWS_CMD(t_RslChanNr_PCH_AGCH(0), tr_apdu))) {
[] IPA_RSL[0].receive(tr_ASP_RSL_UD(tr_RSL_OSMO_ETWS_CMD(t_RslChanNr_PCH_AGCH(0), tr_apdu))) {
setverdict(pass);
}
[] IPA_RSL[0].receive(tr_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0, tr_RSL_OSMO_ETWS_CMD(?,?))) {
[] IPA_RSL[0].receive(tr_ASP_RSL_UD(tr_RSL_OSMO_ETWS_CMD(?,?))) {
setverdict(fail, "Received unexpected OSMO_ETWS_CMD");
}
[] IPA_RSL[0].receive { repeat; }
@ -605,11 +604,10 @@ testcase TC_cbsp_emerg_write_bts_cgi_cchan_disable() runs on cbsp_test_CT {
timer T := 5.0;
T.start;
alt {
[] IPA_RSL[0].receive(tr_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0,
tr_RSL_OSMO_ETWS_CMD(t_RslChanNr_PCH_AGCH(0), tr_apdu))) {
[] IPA_RSL[0].receive(tr_ASP_RSL_UD(tr_RSL_OSMO_ETWS_CMD(t_RslChanNr_PCH_AGCH(0), tr_apdu))) {
setverdict(pass);
}
[] IPA_RSL[0].receive(tr_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0, tr_RSL_OSMO_ETWS_CMD(?,?))) {
[] IPA_RSL[0].receive(tr_ASP_RSL_UD(tr_RSL_OSMO_ETWS_CMD(?,?))) {
setverdict(fail, "Received unexpected OSMO_ETWS_CMD");
}
[] IPA_RSL[0].receive { repeat; }
@ -621,11 +619,10 @@ testcase TC_cbsp_emerg_write_bts_cgi_cchan_disable() runs on cbsp_test_CT {
/* then expect it to be disabled after the warning period (5s) */
T.start;
alt {
[] IPA_RSL[0].receive(tr_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0,
tr_RSL_OSMO_ETWS_CMD(t_RslChanNr_PCH_AGCH(0), ''O))) {
[] IPA_RSL[0].receive(tr_ASP_RSL_UD(tr_RSL_OSMO_ETWS_CMD(t_RslChanNr_PCH_AGCH(0), ''O))) {
setverdict(pass);
}
[] IPA_RSL[0].receive(tr_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0, tr_RSL_OSMO_ETWS_CMD(?,?))) {
[] IPA_RSL[0].receive(tr_ASP_RSL_UD(tr_RSL_OSMO_ETWS_CMD(?,?))) {
setverdict(fail, "Received unexpected OSMO_ETWS_CMD");
}
[] IPA_RSL[0].receive { repeat; }

@ -110,12 +110,14 @@ type record ASP_RSL_Unitdata {
RSL_Message rsl
};
template (value) ASP_RSL_Unitdata ts_ASP_RSL_UD(IpaStreamId sid, template (value) RSL_Message rsl) := {
template (value) ASP_RSL_Unitdata ts_ASP_RSL_UD(template (value) RSL_Message rsl,
IpaStreamId sid := IPAC_PROTO_RSL_TRX0) := {
streamId := sid,
rsl := rsl
}
template ASP_RSL_Unitdata tr_ASP_RSL_UD(template IpaStreamId sid, template RSL_Message rsl) := {
template ASP_RSL_Unitdata tr_ASP_RSL_UD(template (present) RSL_Message rsl,
template IpaStreamId sid := IPAC_PROTO_RSL_TRX0) := {
streamId := sid,
rsl := rsl
}

@ -385,7 +385,7 @@ function main(boolean bts_role := true) runs on RSL_Emulation_CT {
Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "Lost IPA connection!");
}
[bts_role] IPA_PT.receive(tr_ASP_IPA_EV(ASP_IPA_EVENT_ID_ACK)) {
IPA_PT.send(ts_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0,ts_RSL_PAGING_LOAD_IND(23)));
IPA_PT.send(ts_ASP_RSL_UD(ts_RSL_PAGING_LOAD_IND(23)));
}
[not bts_role] IPA_PT.receive(tr_ASP_IPA_EV(ASP_IPA_EVENT_ID_ACK)) { }
[bts_role] IPA_PT.receive(tr_RSL(tr_RSL_IMM_ASSIGN)) -> value rx_rsl {
@ -460,7 +460,7 @@ function main(boolean bts_role := true) runs on RSL_Emulation_CT {
chan_nr := rx_rsl.rsl.ies[0].body.chan_nr;
trx_nr := f_trx_by_streamId(rx_rsl.streamId);
f_store_last_act_data(trx_nr, chan_nr, rx_rsl.rsl);
IPA_PT.send(ts_ASP_RSL_UD(rx_rsl.streamId, ts_RSL_CHAN_ACT_ACK(chan_nr, 23)));
IPA_PT.send(ts_ASP_RSL_UD(ts_RSL_CHAN_ACT_ACK(chan_nr, 23), rx_rsl.streamId));
}
[not dchan_suspended] IPA_PT.receive(tr_RSL(tr_RSL_MsgTypeDR(?))) -> value rx_rsl {
@ -483,8 +483,7 @@ function main(boolean bts_role := true) runs on RSL_Emulation_CT {
[bts_role] CLIENT_PT.receive(RSLDC_ChanRqd:?) -> value chan_rqd sender vc_conn {
/* Store the knowledge that this sender has requested a certain RQ+time */
f_cid_create(chan_rqd.ra, chan_rqd.fn, vc_conn);
IPA_PT.send(ts_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0,
ts_RSL_CHAN_RQD(chan_rqd.ra, chan_rqd.fn)));
IPA_PT.send(ts_ASP_RSL_UD(ts_RSL_CHAN_RQD(chan_rqd.ra, chan_rqd.fn)));
}
[not bts_role] CLIENT_PT.receive(RSLDC_ChanRqd:?) -> value chan_rqd sender vc_conn {
@ -495,11 +494,11 @@ function main(boolean bts_role := true) runs on RSL_Emulation_CT {
[] CLIENT_PT.receive(tr_RSL_MsgType(?)) -> value rx_rsl_msg sender vc_conn {
/* forward to BSC */
cid := f_cid_by_comp_ref(vc_conn);
IPA_PT.send(ts_ASP_RSL_UD(ConnectionTable[cid].stream_id, rx_rsl_msg));
IPA_PT.send(ts_ASP_RSL_UD(rx_rsl_msg, ConnectionTable[cid].stream_id));
}
[] CCHAN_PT.receive(tr_RSL(?)) -> value rx_rsl {
IPA_PT.send(ts_ASP_RSL_UD(rx_rsl.streamId, rx_rsl.rsl));
IPA_PT.send(ts_ASP_RSL_UD(rx_rsl.rsl, rx_rsl.streamId));
}
/* explicit registration, e.g. in (non-immediate) assignment case */

@ -89,7 +89,7 @@ testcase TC_ipa_fragment() runs on IPA_selftest_CT {
T.timeout;
for (i := 0; i < 10; i := i+1) {
IPA_RSL.receive(tr_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0, rsl));
IPA_RSL.receive(tr_ASP_RSL_UD(rsl));
}
setverdict(pass);
}

Loading…
Cancel
Save