summaryrefslogtreecommitdiffstats
path: root/bsc
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2020-08-13 16:06:11 +0000
committerlaforge <laforge@osmocom.org>2020-08-13 19:31:23 +0000
commitff8a9f272d409dc1a02d618c4b0665c91d8b8bf1 (patch)
tree8f116f369c66cd658435e36703ee2f99cc1ea034 /bsc
parentfbaca3fe4e8f8e51e453c285f6e0bda8f8b03156 (diff)
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
Diffstat (limited to 'bsc')
-rw-r--r--bsc/BSC_Tests_CBSP.ttcn9
1 files changed, 8 insertions, 1 deletions
diff --git a/bsc/BSC_Tests_CBSP.ttcn b/bsc/BSC_Tests_CBSP.ttcn
index 67fbd50..497ff80 100644
--- a/bsc/BSC_Tests_CBSP.ttcn
+++ b/bsc/BSC_Tests_CBSP.ttcn
@@ -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);