summaryrefslogtreecommitdiffstats
path: root/msc
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2019-04-09 16:05:26 +0200
committerPhilipp Maier <pmaier@sysmocom.de>2019-04-09 16:05:26 +0200
commitc09a13116a5a54ea98e14fe521fa94da0fbf86e6 (patch)
tree951aa31f86063a2abae74bfb58878da7b4cbaecb /msc
parentd3e0bfa73742dff5d4830d85a00e5e88ead2044b (diff)
MSC_Tests: allow disabeling GSUP
The GSUP link between testsuit and osmo-msc is currently on by default and can not be disabled. However, there may be situations where a missing GSUP connection must be simulated. Lets add add a parameter to disable GSUP if necessary. Change-Id: I7c86aa0a906a0d7e8be765f9109a65b4b4387bc6 Related: OS#3859
Diffstat (limited to 'msc')
-rw-r--r--msc/BSC_ConnectionHandler.ttcn3
-rw-r--r--msc/MSC_Tests.ttcn26
2 files changed, 21 insertions, 8 deletions
diff --git a/msc/BSC_ConnectionHandler.ttcn b/msc/BSC_ConnectionHandler.ttcn
index c7a4a71..8e5c5f2 100644
--- a/msc/BSC_ConnectionHandler.ttcn
+++ b/msc/BSC_ConnectionHandler.ttcn
@@ -73,7 +73,8 @@ type record BSC_ConnHdlrPars {
integer ipa_ctrl_port,
boolean ipa_ctrl_enable,
boolean mm_info,
- boolean sgsap_enable
+ boolean sgsap_enable,
+ boolean gsup_enable
};
/* get a one-octet bitmaks of supported algorithms based on Classmark information */
diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn
index c7c61eb..1a6e8f7 100644
--- a/msc/MSC_Tests.ttcn
+++ b/msc/MSC_Tests.ttcn
@@ -210,11 +210,17 @@ function f_init_mgcp(charstring id) runs on MTC_CT {
vc_MGCP.start(MGCP_Emulation.main(ops, pars, id));
}
+function ForwardUnitdataCallback(PDU_SGsAP msg)
+runs on SGsAP_Emulation_CT return template PDU_SGsAP {
+ SGsAP_CLIENT.send(msg);
+ return omit;
+}
+
function f_init_sgsap(charstring id) runs on MTC_CT {
id := id & "-SGsAP";
var SGsAPOps ops := {
create_cb := refers(SGsAP_Emulation.ExpectedCreateCallback),
- unitdata_cb := refers(SGsAP_Emulation.DummyUnitdataCallback)
+ unitdata_cb := refers(ForwardUnitdataCallback)
}
var SGsAP_conn_parameters pars := {
remote_ip := mp_msc_ip,
@@ -258,7 +264,7 @@ function f_init_gsup(charstring id) runs on MTC_CT {
}
}
-function f_init(integer num_bsc := 1, boolean sgsap := false) runs on MTC_CT {
+function f_init(integer num_bsc := 1, boolean sgsap := false, boolean gsup := true) runs on MTC_CT {
if (g_initialized == true) {
return;
@@ -281,7 +287,10 @@ function f_init(integer num_bsc := 1, boolean sgsap := false) runs on MTC_CT {
f_ipa_ctrl_start(mp_msc_ip, mp_msc_ctrl_port);
f_init_mncc("MSC_Test");
f_init_mgcp("MSC_Test");
- f_init_gsup("MSC_Test");
+
+ if (gsup == true) {
+ f_init_gsup("MSC_Test");
+ }
f_init_smpp("MSC_Test");
if (sgsap == true) {
@@ -476,7 +485,7 @@ modifies ts_BSSAP_BSSMAP := {
type function void_fn(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr;
/* FIXME: move into BSC_ConnectionHandler? */
-function f_init_pars(integer imsi_suffix, boolean sgsap := false) runs on MTC_CT return BSC_ConnHdlrPars {
+function f_init_pars(integer imsi_suffix, boolean sgsap := false, boolean gsup := true) runs on MTC_CT return BSC_ConnHdlrPars {
var BSC_ConnHdlrNetworkPars net_pars := {
kc_support := '0A'O, /* A5/1 and A5/3 enabled */
expect_tmsi := true,
@@ -501,7 +510,8 @@ function f_init_pars(integer imsi_suffix, boolean sgsap := false) runs on MTC_CT
ipa_ctrl_port := mp_msc_ctrl_port,
ipa_ctrl_enable := true,
mm_info := mp_mm_info,
- sgsap_enable := sgsap
+ sgsap_enable := sgsap,
+ gsup_enable := gsup
};
return pars;
}
@@ -521,8 +531,10 @@ function f_start_handler_with_pars(void_fn fn, BSC_ConnHdlrPars pars) runs on MT
connect(vc_conn:MGCP, vc_MGCP:MGCP_CLIENT);
connect(vc_conn:MGCP_PROC, vc_MGCP:MGCP_PROC);
/* GSUP part */
- connect(vc_conn:GSUP, vc_GSUP:GSUP_CLIENT);
- connect(vc_conn:GSUP_PROC, vc_GSUP:GSUP_PROC);
+ if (pars.gsup_enable == true) {
+ connect(vc_conn:GSUP, vc_GSUP:GSUP_CLIENT);
+ connect(vc_conn:GSUP_PROC, vc_GSUP:GSUP_PROC);
+ }
/* SMPP part */
connect(vc_conn:SMPP, vc_SMPP:SMPP_CLIENT);
connect(vc_conn:SMPP_PROC, vc_SMPP:SMPP_PROC);