bsc CBSP: clear all CBSP state between runs

Some tests may stop without cleaning up the CBSP state. Avoid affecting
subsequent tests by clearing the state for each f_cbsp_init_server().

Some ETWS CMD may still be left in the RSL queue (from the time period passing
between a stopped test and the next test starting up), so clear all RSL ports.

To be able to do so, move f_cbsp_reset_bss() to the cbsp_test_CT, from where it
can access both CBSP and IPA_RSL[] ports. All current callers are on
cbsp_test_CT anyway.

This patch should fix TC_cbsp_emerg_write_bts_cgi_cchan and
TC_cbsp_emerg_write_bts_cgi_cchan_disable, which so far break because of
leftover ETWS CMDs in the RSL queue from the preceding test run.

Change-Id: If7400a6624bb6dd9cacbcc733bdeba102d19e29c
This commit is contained in:
Neels Hofmeyr 2020-08-13 16:06:11 +00:00 committed by laforge
parent fbaca3fe4e
commit ff8a9f272d
1 changed files with 8 additions and 1 deletions

View File

@ -139,6 +139,8 @@ private function f_cbsp_init_server(uint16_t cbsp_msg_id, uint16_t cbsp_ser_no,
g_cbsp_msg_id := cbsp_msg_id;
g_cbsp_ser_no := cbsp_ser_no;
log("g_cbsp_msg_id=", g_cbsp_msg_id, " g_cbsp_ser_no=", g_cbsp_ser_no);
f_cbsp_reset_bss(0);
}
private function f_expect_cbsp_restart() runs on cbsp_test_CT {
interleave {
@ -161,7 +163,12 @@ function f_gen_page(integer payload_len := 0) return CBSP_IE {
return valueof(ts_CbspMsgContent(payload, payload_len));
}
function f_cbsp_reset_bss(integer idx) runs on CBSP_Adapter_CT {
function f_cbsp_reset_bss(integer idx) runs on cbsp_test_CT {
/* Make sure no CBSP ETWS commands from a previous CBSP test remain in the RSL queue */
IPA_RSL[0].clear;
IPA_RSL[1].clear;
IPA_RSL[2].clear;
var template (value) CBSP_PDU tx;
timer T := 3.0;
tx := ts_CBSP_RESET(cell_list := ts_BSSMAP_CIL_BSS);