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
This commit is contained in:
Harald Welte 2019-09-07 08:30:25 +02:00
parent 187f7a99c1
commit 0b5e0f9146
1 changed files with 77 additions and 0 deletions

View File

@ -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() );
}