bsc: add TC_bssmap_clear_does_not_cause_bssmap_reset()

Same as TC_bssmap_rlsd_does_not_cause_bssmap_reset(), but with a proper BSSMAP
Clear from the MSC first.

Related: OS#3041
Change-Id: If6ca85d7b80a727cbfdabbf07529ced22602734e
This commit is contained in:
Neels Hofmeyr 2018-03-12 04:25:35 +01:00
parent cdc2d7690d
commit 4ff9328beb
1 changed files with 63 additions and 0 deletions

View File

@ -46,6 +46,8 @@ import from MobileL3_Types all;
import from L3_Templates all;
import from GSM_RR_Types all;
import from BSSMAP_Templates all;
const integer NUM_BTS := 3;
const float T3101_MAX := 12.0;
@ -1744,6 +1746,66 @@ testcase TC_bssap_rlsd_does_not_cause_bssmap_reset() runs on test_CT {
f_shutdown_helper();
}
/* OS#3041: Open and close N connections in a normal fashion, and expect no
* BSSMAP Reset just because of that. Invoke the release by a BSSMAP Clear from
* the MSC. */
testcase TC_bssmap_clear_does_not_cause_bssmap_reset() runs on test_CT {
var default d;
var integer i;
var DchanTuple dt;
var BSSAP_N_DATA_ind rx_di;
var RSL_Message rx_rsl;
var myBSSMAP_Cause cause_val := GSM0808_CAUSE_CALL_CONTROL;
var BssmapCause cause := enum2int(cause_val);
f_init();
/* Wait for initial BSSMAP Reset to pass */
f_sleep(4.0);
d := activate(no_bssmap_reset());
/* Setup up a number of connections and RLSD them again from the MSC
* side. In the buggy behavior, the fourth one triggers BSSMAP Reset.
* Let's do it some more times for good measure. */
for (i := 0; i < 8; i := i+1) {
/* Since we're doing a lot of runs, give each one a fresh
* T_guard from the top. */
T_guard.start;
/* Setup a BSSAP connection and clear it right away. This is
* the MSC telling the BSC about a planned release, it's not an
* erratic loss of a connection. */
dt := f_est_dchan('23'O, 23, '00010203040506'O);
/* Instruct BSC to clear channel */
BSSAP.send(ts_BSSAP_DATA_req(dt.sccp_conn_id, ts_BSSMAP_ClearCommand(cause)));
/* expect BSC to disable the channel */
rx_rsl := f_exp_ipa_rx(0, tr_RSL_MsgTypeD(RSL_MT_RF_CHAN_REL), T3101_MAX);
/* respond with CHAN REL ACK */
f_ipa_tx(0, ts_RSL_RF_CHAN_REL_ACK(dt.rsl_chan_nr));
/* expect Clear Complete from BSC */
BSSAP.receive(tr_BSSAP_DATA_ind(dt.sccp_conn_id, tr_BSSMAP_ClearComplete));
/* MSC disconnects as instructed. */
BSSAP.send(ts_BSSAP_DISC_req(dt.sccp_conn_id, 0));
/* MSC disconnects (RLSD). */
BSSAP.send(ts_BSSAP_DISC_req(dt.sccp_conn_id, 0));
}
/* In the buggy behavior, a timeout of 2 seconds happens between above
* trigger (logs "SIGTRAN connection down, reconnecting...") and the
* actual BSSMAP Reset. Wait a bit longer just to make sure. */
f_sleep(4.0);
deactivate(d);
f_shutdown_helper();
}
control {
/* CTRL interface testing */
execute( TC_ctrl_msc_connection_status() );
@ -1819,6 +1881,7 @@ control {
execute( TC_ho_int() );
execute( TC_bssap_rlsd_does_not_cause_bssmap_reset() );
execute( TC_bssmap_clear_does_not_cause_bssmap_reset() );
}
}