diff options
author | Harald Welte <laforge@gnumonks.org> | 2019-09-07 08:30:25 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2019-09-07 12:07:13 +0200 |
commit | 0b5e0f9146c0ba7a7664959af302dbd2fd3508c6 (patch) | |
tree | 24dd72be8400fd3db74627087ed2958fe73d535b | |
parent | 187f7a99c193dae3bbe0ab21441d73dc2696431e (diff) |
bsc: Test that ETWS Primary Notification is passed via RSL to PCH
The BSC must not only pass the ETWS Primary Notification from CBSP
down every dedicated channel, but it must also send it via an
Osmocom-specific RSL message to enable the BTS to brodcast it via
the PCH (P1 Rest Octets) and pass it to the PCU for PACCH.
Change-Id: Ia418095844aaa418a4e2ff6fd75d8a4b3c8bb9c0
Related: #4046
-rw-r--r-- | bsc/BSC_Tests_CBSP.ttcn | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/bsc/BSC_Tests_CBSP.ttcn b/bsc/BSC_Tests_CBSP.ttcn index 792b771f..bf1d99e1 100644 --- a/bsc/BSC_Tests_CBSP.ttcn +++ b/bsc/BSC_Tests_CBSP.ttcn @@ -561,6 +561,81 @@ testcase TC_cbsp_emerg_write_bts_cgi_dchan() runs on cbsp_test_CT { } } +/* Write ETWS PN to single BTS; verify it arrives on CCHAN */ +testcase TC_cbsp_emerg_write_bts_cgi_cchan() runs on cbsp_test_CT { + var CBSP_IEs pages := {f_gen_page()}; + var template (value) BSSMAP_FIELD_CellIdentificationList cell_list; + var ASP_RSL_Unitdata rx_rsl_ud; + + cell_list := ts_BSSMAP_CIL_CGI({bssmap_cgi(mp_cgi_bts0)}); + f_cbsp_init_server(); + + f_cbsp_write_emerg(16, 1016, cell_list); + var template (present) octetstring tr_apdu := f_gen_etws_pn(1016, 16); + timer T := 5.0; + T.start; + alt { + [] IPA_RSL[0].receive(tr_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0, + tr_RSL_OSMO_ETWS_CMD(t_RslChanNr_PCH_AGCH(0), tr_apdu))) { + setverdict(pass); + } + [] IPA_RSL[0].receive(tr_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0, tr_RSL_OSMO_ETWS_CMD(?,?))) { + setverdict(fail, "Received unexpected OSMO_ETWS_CMD"); + } + [] IPA_RSL[0].receive { repeat; } + [] T.timeout { + setverdict(fail, "Timeout waiting for RSL_OSMO_ETWS_CMD"); + } + } +} + +/* Write ETWS PN to single BTS; verify it arrives on CCHAN */ +testcase TC_cbsp_emerg_write_bts_cgi_cchan_disable() runs on cbsp_test_CT { + var CBSP_IEs pages := {f_gen_page()}; + var template (value) BSSMAP_FIELD_CellIdentificationList cell_list; + var ASP_RSL_Unitdata rx_rsl_ud; + + cell_list := ts_BSSMAP_CIL_CGI({bssmap_cgi(mp_cgi_bts0)}); + f_cbsp_init_server(); + + f_cbsp_write_emerg(16, 1016, cell_list); + + /* first expect the PN to be enabled */ + var template (present) octetstring tr_apdu := f_gen_etws_pn(1016, 16); + timer T := 5.0; + T.start; + alt { + [] IPA_RSL[0].receive(tr_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0, + tr_RSL_OSMO_ETWS_CMD(t_RslChanNr_PCH_AGCH(0), tr_apdu))) { + setverdict(pass); + } + [] IPA_RSL[0].receive(tr_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0, tr_RSL_OSMO_ETWS_CMD(?,?))) { + setverdict(fail, "Received unexpected OSMO_ETWS_CMD"); + } + [] IPA_RSL[0].receive { repeat; } + [] T.timeout { + setverdict(fail, "Timeout waiting for RSL_OSMO_ETWS_CMD (enable)"); + } + } + + /* then expect it to be disabled after the warning period (5s) */ + T.start; + alt { + [] IPA_RSL[0].receive(tr_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0, + tr_RSL_OSMO_ETWS_CMD(t_RslChanNr_PCH_AGCH(0), ''O))) { + setverdict(pass); + } + [] IPA_RSL[0].receive(tr_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0, tr_RSL_OSMO_ETWS_CMD(?,?))) { + setverdict(fail, "Received unexpected OSMO_ETWS_CMD"); + } + [] IPA_RSL[0].receive { repeat; } + [] T.timeout { + setverdict(fail, "Timeout waiting for RSL_OSMO_ETWS_CMD (disable)"); + } + } +} + + control { execute( TC_cbsp_bsc_server() ); @@ -585,6 +660,8 @@ control { execute( TC_cbsp_write_then_reset() ); execute( TC_cbsp_emerg_write_bts_cgi_dchan() ); + execute( TC_cbsp_emerg_write_bts_cgi_cchan() ); + execute( TC_cbsp_emerg_write_bts_cgi_cchan_disable() ); } |