summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Sperling <ssperling@sysmocom.de>2018-02-12 21:08:28 +0100
committerStefan Sperling <ssperling@sysmocom.de>2018-02-12 21:08:28 +0100
commit2e7a848ea3b91d8eefbb1ae13d0cb88af9c05b3f (patch)
tree17f7c16a1774aa72222c4425f9fa322ebd892720
parent33ec09bf342892f3686e2a6387b418adc282857a (diff)
Add a test for OS#2714, "close RSL connections from unknown Unit ID"stsp/rsl_unknown_unit_id
This is work in progress. The new test currently does not build: $ make bsc 2>&1 | grep error: BSC_Tests.ttcn:1258.41-52: error: Component type `@BSC_Tests.test_CT' does not have port with name `IPA_CODEC_PT' Change-Id: I6a947d7411a016e4d7650031396cae3575756453
-rw-r--r--bsc/BSC_Tests.ttcn40
1 files changed, 40 insertions, 0 deletions
diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index 086830a..a0fc11f 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -1236,6 +1236,45 @@ testcase TC_rsl_drop_counter() runs on test_CT {
/* TODO: Test OML link drop causes counter increment */
+/* BSC should close an RSL connection from a BTS with unknown unit ID (OS#2714). */
+testcase TC_rsl_unknown_unit_id() runs on test_CT {
+ timer T := 10.0;
+
+ bts[0].rsl.id := "IPA-0-RSL";
+ bts[0].rsl.vc_IPA := IPA_Emulation_CT.create(bts[0].rsl.id & "-IPA");
+ bts[0].rsl.ccm_pars := c_IPA_default_ccm_pars;
+ bts[0].rsl.ccm_pars.name := "Osmocom TTCN-3 BTS Simulator";
+ bts[0].rsl.ccm_pars.unit_id := "0/0/0"; /* value which is unknown at BTS */
+
+ /* Call a function of our 'parent component' BSSAP_Adapter_CT to start the
+ * MSC-side BSSAP emulation */
+ f_bssap_init("VirtMSC", omit);
+
+ f_ipa_ctrl_start(mp_bsc_ip, mp_bsc_ctrl_port);
+
+ f_init_mgcp("VirtMSC");
+
+ /* start RSL connection */
+ map(bts[0].rsl.vc_IPA:IPA_PORT, system:IPA_CODEC_PT);
+ connect(bts[0].rsl.vc_IPA:IPA_RSL_PORT, self:IPA_RSL[0]);
+ bts[0].rsl.vc_IPA.start(IPA_Emulation.main_client(mp_bsc_ip, mp_bsc_rsl_port, "", 10000, bts[0].rsl.ccm_pars));
+
+ /* wait for IPA RSL link to connect and then disconnect */
+ T.start;
+ alt {
+ [] IPA_RSL[0].receive(ASP_IPA_Event:{up_down := ASP_IPA_EVENT_DOWN}) {
+ T.stop;
+ setverdict(pass);
+ }
+ [] IPA_RSL[0].receive { repeat }
+ [] T.timeout {
+ setverdict(fail, "Timeout RSL waiting for connection to close");
+ self.stop;
+ }
+ }
+}
+
+
/***********************************************************************
* "New world" test cases using RSL_Emulation + BSSMAP_Emulation
***********************************************************************/
@@ -1594,6 +1633,7 @@ control {
execute( TC_paging_imsi_load() );
execute( TC_rsl_drop_counter() );
+ execute( TC_rsl_unknown_unit_id() );
execute( TC_classmark() );
execute( TC_unsol_ass_fail() );