BSC_Tests: add TC_rll_sapi_n_reject_dlci_cc

Change-Id: I9d7042ab4f3f7dea88811bd1b90d829065063f33
Related: SYS#5047, OS#4728
This commit is contained in:
Vadim Yanitskiy 2020-10-04 00:04:49 +07:00 committed by laforge
parent a7fc5a6e7f
commit 999ceb6637
1 changed files with 38 additions and 0 deletions

View File

@ -2435,6 +2435,7 @@ testcase TC_tch_dlci_link_id_sapi() runs on test_CT {
private function f_exp_sapi_n_reject(template (present) GsmSapi sapi := ?,
template myBSSMAP_Cause cause := ?,
template (present) BIT2 cc := ?,
float T_val := 2.0)
runs on test_CT {
var BSSAP_N_DATA_ind rx_di;
@ -2451,6 +2452,15 @@ runs on test_CT {
setverdict(fail, "Rx unexpected Cause IE: ",
rx_cause, " vs expected ", tr_cause);
}
/* Who ever on the earth decided to define this field as two separate bits?!? */
var BIT2 rx_cc := rx_di.userData.pdu.bssmap.sAPInReject.dLCI.c2
& rx_di.userData.pdu.bssmap.sAPInReject.dLCI.c1;
if (not match(rx_cc, cc)) {
setverdict(fail, "Rx unexpected Control Channel type: ",
rx_cc, " vs expected ", cc);
}
setverdict(pass);
}
[] BSSAP.receive(BSSAP_N_DATA_ind:?) -> value rx_di {
@ -2544,6 +2554,33 @@ testcase TC_rll_timeout_sapi_n_reject() runs on test_CT {
f_shutdown_helper();
}
/* Check DLCI CC (Control Channel type) bits in SAPI N Reject */
testcase TC_rll_sapi_n_reject_dlci_cc() runs on test_CT {
var octetstring rnd_data := f_rnd_octstring(16);
var RSL_Message rx_rsl;
var DchanTuple dt;
f_init(1);
/* MS establishes a SAPI=0 link on DCCH */
dt := f_est_dchan(f_rnd_ra_cs(), 23, rnd_data);
/* MSC sends some data on (not yet established) SAPI=3 link */
BSSAP.send(ts_BSSAP_DATA_req(dt.sccp_conn_id, ts_BSSAP_DTAP(rnd_data, '03'O)));
/* BSC attempts to establish a SAPI=3 link on DCCH */
rx_rsl := f_exp_ipa_rx(0, tr_RSL_EST_REQ(dt.rsl_chan_nr, tr_RslLinkID_DCCH(3)));
/* MS sends unexpected ERROR INDication on DCCH/ACCH SAPI=3 */
f_ipa_tx(0, ts_RSL_ERROR_IND(dt.rsl_chan_nr, ts_RslLinkID_DCCH(3), ''O));
f_exp_sapi_n_reject(3, GSM0808_CAUSE_MS_NOT_EQUIPPED, '10'B);
/* Clean up the connection */
BSSAP.send(ts_BSSAP_DISC_req(dt.sccp_conn_id, 0));
f_expect_chan_rel(0, dt.rsl_chan_nr, expect_rll_rel_req := false);
f_shutdown_helper();
}
testcase TC_si_default() runs on test_CT {
f_init(0);
f_init_bts_and_check_sysinfo(0, expect_si := SystemInformationConfig_default);
@ -10898,6 +10935,7 @@ control {
execute( TC_rll_rel_ind_sapi_n_reject() );
execute( TC_rll_err_ind_sapi_n_reject() );
execute( TC_rll_timeout_sapi_n_reject() );
execute( TC_rll_sapi_n_reject_dlci_cc() );
/* Paging related tests */
execute( TC_paging_imsi_nochan() );