[PATCH] osmo-ttcn3-hacks[master]: bsc: add TC_bssmap_clear_does_not_cause_bssmap_reset()

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Mon Mar 12 03:43:31 UTC 2018


Review at  https://gerrit.osmocom.org/7224

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
---
M bsc/BSC_Tests.ttcn
1 file changed, 63 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/24/7224/1

diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index 71d1b51..a466d36 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -46,6 +46,8 @@
 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 @@
 	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 @@
 	execute( TC_ho_int() );
 
 	execute( TC_bssap_rlsd_does_not_cause_bssmap_reset() );
+	execute( TC_bssmap_clear_does_not_cause_bssmap_reset() );
 }
 
 }

-- 
To view, visit https://gerrit.osmocom.org/7224
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If6ca85d7b80a727cbfdabbf07529ced22602734e
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>



More information about the gerrit-log mailing list