aboutsummaryrefslogtreecommitdiffstats
path: root/bsc
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2018-03-12 04:25:35 +0100
committerNeels Hofmeyr <neels@hofmeyr.de>2018-03-12 04:43:16 +0100
commit4ff9328bebb3438c41657ce1e4899b8bdb4224b4 (patch)
treea4c3557e3c1026f65e03cf872499645d0952a713 /bsc
parentcdc2d7690d2dd5f363a1b8c8f89d9d53e489bf84 (diff)
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
Diffstat (limited to 'bsc')
-rw-r--r--bsc/BSC_Tests.ttcn63
1 files changed, 63 insertions, 0 deletions
diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index 71d1b51b..a466d367 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -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() );
}
}