From ff8a9f272d409dc1a02d618c4b0665c91d8b8bf1 Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Thu, 13 Aug 2020 16:06:11 +0000 Subject: 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 --- bsc/BSC_Tests_CBSP.ttcn | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'bsc') diff --git a/bsc/BSC_Tests_CBSP.ttcn b/bsc/BSC_Tests_CBSP.ttcn index 67fbd509..497ff808 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); -- cgit v1.2.3