bsc: Fix CBSP expectancies when receiving ETWS write-replace response

BSC_Tests_CBSP was sending an ETWS message but using non-ETWS templates
to match the response, which may differ from an ETWS one  (for instance,
ETWS related messages have no channel_ind).

Change-Id: I42941655081af6d5b04b1e061e6259d8dee94665
This commit is contained in:
Pau Espin 2022-08-09 12:51:56 +02:00
parent 7c29c4e2c1
commit f14e3ec864
2 changed files with 63 additions and 10 deletions

View File

@ -281,9 +281,9 @@ function f_cbsp_write_emerg(uint16_t msg_id, uint16_t ser_no,
tx := ts_CBSP_WRITE_EMERG(msg_id, ser_no, cell_list, emerg_ind, warn_type, warn_per);
CBSP[0].send(ts_CBSP_Send(g_cbsp_conn_id[0], tx));
if (istemplatekind(fail_list, "omit")) {
rx := tr_CBSP_WRITE_CBS_COMPL(msg_id, ser_no, success_list, omit);
rx := tr_CBSP_WRITE_EMERG_COMPL(msg_id, ser_no, success_list);
} else {
rx := tr_CBSP_WRITE_CBS_FAIL(msg_id, ser_no, fail_list, *, success_list, omit);
rx := tr_CBSP_WRITE_EMERG_FAIL(msg_id, ser_no, fail_list, *, success_list);
}
alt {
[] CBSP[0].receive(tr_CBSP_Recv(g_cbsp_conn_id[0], rx)) {
@ -341,9 +341,9 @@ function f_cbsp_replace_emerg(uint16_t msg_id, uint16_t new_ser_no, uint16_t old
tx := ts_CBSP_REPLACE_EMERG(msg_id, new_ser_no, old_ser_no, cell_list, emerg_ind, warn_type, warn_per);
CBSP[0].send(ts_CBSP_Send(g_cbsp_conn_id[0], tx));
if (istemplatekind(fail_list, "omit")) {
rx := tr_CBSP_REPLACE_CBS_COMPL(msg_id, new_ser_no, old_ser_no, omit, success_list, omit);
rx := tr_CBSP_REPLACE_EMERG_COMPL(msg_id, new_ser_no, old_ser_no, success_list);
} else {
rx := tr_CBSP_REPLACE_CBS_FAIL(msg_id, new_ser_no, old_ser_no, fail_list, omit, success_list, omit);
rx := tr_CBSP_REPLACE_EMERG_FAIL(msg_id, new_ser_no, old_ser_no, fail_list, omit, success_list);
}
alt {
[] CBSP[0].receive(tr_CBSP_Recv(g_cbsp_conn_id[0], rx)) {

View File

@ -396,7 +396,7 @@ return template (value) CBSP_PDU {
function tr_CBSP_WRITE_CBS_COMPL(template uint16_t msg_id, template uint16_t new_ser_nr,
template BSSMAP_FIELD_CellIdentificationList cell_list,
template uint8_t channel_ind)
template (present) uint8_t channel_ind)
return template CBSP_PDU {
var template CBSP_IEs ies := {
tr_CbspMsgId(msg_id),
@ -466,7 +466,7 @@ function tr_CBSP_REPLACE_CBS_COMPL(template uint16_t msg_id, template uint16_t n
template uint16_t old_ser_nr,
template CBSP_IE_NumBcastComplList compl_list,
template BSSMAP_FIELD_CellIdentificationList cell_list,
template uint8_t channel_ind)
template (present) uint8_t channel_ind)
return template CBSP_PDU {
var template CBSP_IEs ies := {
tr_CbspMsgId(msg_id),
@ -542,7 +542,7 @@ function tr_CBSP_WRITE_CBS_FAIL(template uint16_t msg_id, template uint16_t new_
template CBSP_FailureListItems fail_list,
template CBSP_IE_NumBcastComplList compl_list,
template BSSMAP_FIELD_CellIdentificationList cell_list,
template uint8_t channel_ind)
template (present) uint8_t channel_ind)
return template CBSP_PDU {
var template CBSP_IEs ies := {
tr_CbspMsgId(msg_id),
@ -564,8 +564,33 @@ return template CBSP_PDU {
} else if (not istemplatekind(cell_list, "omit")) {
ies[lengthof(ies)] := tr_CbspCellList(cell_list);
}
if (not istemplatekind(channel_ind, "omit")) {
ies[lengthof(ies)] := ts_CbspChannelInd(channel_ind);
ies[lengthof(ies)] := ts_CbspChannelInd(channel_ind);
return tr_CBSP(CBSP_MSGT_WRITE_REPLACE_FAIL, ies);
}
function tr_CBSP_WRITE_EMERG_FAIL(template uint16_t msg_id, template uint16_t new_ser_nr,
template CBSP_FailureListItems fail_list,
template CBSP_IE_NumBcastComplList compl_list,
template BSSMAP_FIELD_CellIdentificationList cell_list)
return template CBSP_PDU {
var template CBSP_IEs ies := {
tr_CbspMsgId(msg_id),
tr_NewSerNo(new_ser_nr),
tr_CbspFailList(fail_list)
};
if (istemplatekind(compl_list, "*")) {
//ies[lengthof(ies)] := tr_CbspNumComplList ifpresent;
} else if (istemplatekind(compl_list, "?")) {
ies[lengthof(ies)] := tr_CbspNumComplList(?);
} else if (not istemplatekind(compl_list, "omit")) {
ies[lengthof(ies)] := tr_CbspNumComplList(compl_list);
}
if (istemplatekind(cell_list, "*")) {
testcase.stop("TITAN > 6.5.0 doesn't support this");
//ies[lengthof(ies)] := tr_CbspCellList ifpresent;
} else if (istemplatekind(cell_list, "?")) {
ies[lengthof(ies)] := tr_CbspCellList(?);
} else if (not istemplatekind(cell_list, "omit")) {
ies[lengthof(ies)] := tr_CbspCellList(cell_list);
}
return tr_CBSP(CBSP_MSGT_WRITE_REPLACE_FAIL, ies);
}
@ -597,7 +622,7 @@ function tr_CBSP_REPLACE_CBS_FAIL(template uint16_t msg_id, template uint16_t ne
template CBSP_FailureListItems fail_list,
template CBSP_IE_NumBcastComplList compl_list,
template BSSMAP_FIELD_CellIdentificationList cell_list,
template uint8_t channel_ind)
template (present) uint8_t channel_ind)
return template CBSP_PDU {
var template CBSP_IEs ies := {
tr_CbspMsgId(msg_id),
@ -622,6 +647,34 @@ return template CBSP_PDU {
ies[lengthof(ies)] := tr_CbspChannelInd(channel_ind);
return tr_CBSP(CBSP_MSGT_WRITE_REPLACE_FAIL, ies);
}
function tr_CBSP_REPLACE_EMERG_FAIL(template uint16_t msg_id, template uint16_t new_ser_nr,
template uint16_t old_ser_nr,
template CBSP_FailureListItems fail_list,
template CBSP_IE_NumBcastComplList compl_list,
template BSSMAP_FIELD_CellIdentificationList cell_list)
return template CBSP_PDU {
var template CBSP_IEs ies := {
tr_CbspMsgId(msg_id),
tr_NewSerNo(new_ser_nr),
tr_OldSerNo(old_ser_nr),
tr_CbspFailList(fail_list)
};
if (istemplatekind(compl_list, "*")) {
//ies[lengthof(ies)] := tr_CbspCellList ifpresent;
} else if (istemplatekind(compl_list, "?")) {
ies[lengthof(ies)] := tr_CbspNumComplList(?);
} else if (not istemplatekind(compl_list, "omit")) {
ies[lengthof(ies)] := tr_CbspNumComplList(compl_list);
}
if (istemplatekind(cell_list, "*")) {
//ies[lengthof(ies)] := tr_CbspCellList ifpresent;
} else if (istemplatekind(cell_list, "?")) {
ies[lengthof(ies)] := tr_CbspCellList(?);
} else if (not istemplatekind(cell_list, "omit")) {
ies[lengthof(ies)] := tr_CbspCellList(cell_list);
}
return tr_CBSP(CBSP_MSGT_WRITE_REPLACE_FAIL, ies);
}
/* 8.1.3.4 KILL */
function ts_CBSP_KILL(template (value) uint16_t msg_id,