From 24beefd505f552d9128959462bc73163563d504a Mon Sep 17 00:00:00 2001 From: Vadim Yanitskiy Date: Mon, 4 Nov 2019 22:12:33 +0700 Subject: BSC_Tests.ttcn: introduce TC_bcch_info_ccch_conf Change-Id: I46131663e5940abd9d5ddcb7a49eddf654117425 --- bsc/BSC_Tests.ttcn | 47 +++++++++++++++++++++++++++++++++++++++++++++++ bsc/gen_links.sh | 2 +- 2 files changed, 48 insertions(+), 1 deletion(-) diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index e25bf7f2..c0e44167 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -47,6 +47,7 @@ import from Osmocom_CTRL_Adapter all; import from Osmocom_VTY_Functions all; import from TELNETasp_PortType all; +import from GSM_SystemInformation all; import from MobileL3_CommonIE_Types all; import from MobileL3_Types all; import from MobileL3_RRM_Types all; @@ -1557,6 +1558,52 @@ testcase TC_paging_counter() runs on test_CT { f_shutdown_helper(); } +testcase TC_bcch_info_ccch_conf() runs on test_CT { + var template RSL_Message tr_bcch_info; + var SystemInformation si; + var ASP_RSL_Unitdata ud; + var RSL_IE_Body si_ie; + var boolean ok; + timer T; + + f_init(1); + + /* BSC sends all System Information messages to the BTS using RSL BCCH INFO */ + tr_bcch_info := tr_RSL_BCCH_INFO(si_type := RSL_SYSTEM_INFO_3); + + T.start(2.0); + alt { + [] IPA_RSL[0].receive(tr_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0, tr_bcch_info)) -> value ud { + /* Find IE containing the payload with System Information Type 3 */ + ok := f_rsl_find_ie(ud.rsl, RSL_IE_FULL_BCCH_INFO, si_ie); + if (not ok) { + setverdict(fail, "RSL BCCH INFO message without FULL_BCCH_INFO IE?!?"); + mtc.stop; + } + + /* Decode the raw payload */ + si := dec_SystemInformation(si_ie.other.payload); + log("Decoded System Information message: ", si); + + /* Make sure that decoded message is actually Type 3 */ + if (not match(si.header.message_type, SYSTEM_INFORMATION_TYPE_3)) { + setverdict(fail, "Unexpected SI Type: ", si.header.message_type); + mtc.stop; + } + } + [] IPA_RSL[0].receive { repeat; } + [] T.timeout { + setverdict(fail, "Timeout waiting for RSL BCCH INFO message"); + mtc.stop; + } + } + + /* Make sure CCCH_CONF reflects the actual CCCH configuration */ + log(si.payload.si3.ctrl_chan_desc.ccch_conf); + + setverdict(pass); +} + /* Verify paging stops after A-RESET */ testcase TC_paging_imsi_a_reset() runs on test_CT { diff --git a/bsc/gen_links.sh b/bsc/gen_links.sh index 845f7ccf..64c6d2aa 100755 --- a/bsc/gen_links.sh +++ b/bsc/gen_links.sh @@ -67,7 +67,7 @@ FILES="TELNETasp_PT.cc TELNETasp_PT.hh TELNETasp_PortType.ttcn" gen_links $DIR $FILES DIR=../library -FILES="Misc_Helpers.ttcn General_Types.ttcn Osmocom_Types.ttcn GSM_Types.ttcn Osmocom_VTY_Functions.ttcn Native_Functions.ttcn Native_FunctionDefs.cc IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc IPA_Emulation.ttcnpp L3_Templates.ttcn BSSMAP_Templates.ttcn RAN_Emulation.ttcnpp RLCMAC_CSN1_Types.ttcn GSM_RR_Types.ttcn RSL_Types.ttcn RSL_Emulation.ttcn MGCP_Emulation.ttcn MGCP_Types.ttcn MGCP_Templates.ttcn MGCP_CodecPort.ttcn MGCP_CodecPort_CtrlFunct.ttcn MGCP_CodecPort_CtrlFunctDef.cc BSSAP_CodecPort.ttcn RAN_Adapter.ttcnpp Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn Osmocom_CTRL_Adapter.ttcn RTP_CodecPort.ttcn RTP_CodecPort_CtrlFunct.ttcn RTP_CodecPort_CtrlFunctDef.cc RTP_Emulation.ttcn IuUP_Types.ttcn IuUP_EncDec.cc IuUP_Emulation.ttcn SCCP_Templates.ttcn IPA_Testing.ttcn " +FILES="Misc_Helpers.ttcn General_Types.ttcn Osmocom_Types.ttcn GSM_Types.ttcn GSM_SystemInformation.ttcn Osmocom_VTY_Functions.ttcn Native_Functions.ttcn Native_FunctionDefs.cc IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc IPA_Emulation.ttcnpp L3_Templates.ttcn BSSMAP_Templates.ttcn RAN_Emulation.ttcnpp RLCMAC_CSN1_Types.ttcn GSM_RR_Types.ttcn RSL_Types.ttcn RSL_Emulation.ttcn MGCP_Emulation.ttcn MGCP_Types.ttcn MGCP_Templates.ttcn MGCP_CodecPort.ttcn MGCP_CodecPort_CtrlFunct.ttcn MGCP_CodecPort_CtrlFunctDef.cc BSSAP_CodecPort.ttcn RAN_Adapter.ttcnpp Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn Osmocom_CTRL_Adapter.ttcn RTP_CodecPort.ttcn RTP_CodecPort_CtrlFunct.ttcn RTP_CodecPort_CtrlFunctDef.cc RTP_Emulation.ttcn IuUP_Types.ttcn IuUP_EncDec.cc IuUP_Emulation.ttcn SCCP_Templates.ttcn IPA_Testing.ttcn " FILES+="CBSP_Types.ttcn CBSP_Templates.ttcn " FILES+="CBSP_CodecPort.ttcn CBSP_CodecPort_CtrlFunct.ttcn CBSP_CodecPort_CtrlFunctdef.cc CBSP_Adapter.ttcn " gen_links $DIR $FILES -- cgit v1.2.3