summaryrefslogtreecommitdiffstats
path: root/msc/MSC_Tests.ttcn
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2019-05-21 12:54:39 +0200
committerHarald Welte <laforge@gnumonks.org>2019-05-27 09:56:51 +0000
commita65697dba0af5e50d4b5a0ee18bd2b3fdc646a83 (patch)
tree186df2b4014705836c11733831362a5dcd70aa9d /msc/MSC_Tests.ttcn
parentc6a53dbb2aa3b59faee2d180ec8a701b5bc4ddc6 (diff)
msc: Introduce Osmux infra and one test for osmo-msc
Diffstat (limited to 'msc/MSC_Tests.ttcn')
-rw-r--r--msc/MSC_Tests.ttcn27
1 files changed, 21 insertions, 6 deletions
diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn
index b64b872..0d6083e 100644
--- a/msc/MSC_Tests.ttcn
+++ b/msc/MSC_Tests.ttcn
@@ -275,7 +275,7 @@ function f_init_gsup(charstring id) runs on MTC_CT {
}
}
-function f_init(integer num_bsc := 1, boolean sgsap := false, boolean gsup := true) runs on MTC_CT {
+function f_init(integer num_bsc := 1, boolean sgsap := false, boolean gsup := true, boolean osmux := false) runs on MTC_CT {
if (g_initialized == true) {
return;
@@ -288,7 +288,9 @@ function f_init(integer num_bsc := 1, boolean sgsap := false, boolean gsup := tr
for (var integer i := 0; i < num_bsc; i := i + 1) {
if (isbound(mp_bssap_cfg[i])) {
- f_ran_adapter_init(g_bssap[i], mp_bssap_cfg[i], "MSC_Test_" & int2str(i), BSC_RanOps);
+ var RanOps ranops := BSC_RanOps;
+ ranops.use_osmux := osmux;
+ f_ran_adapter_init(g_bssap[i], mp_bssap_cfg[i], "MSC_Test_" & int2str(i), ranops);
f_ran_adapter_start(g_bssap[i]);
} else {
testcase.stop("missing BSSAP configuration");
@@ -334,7 +336,7 @@ 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, boolean gsup := true, integer ran_idx := 0,
- boolean ran_is_geran := true)
+ boolean ran_is_geran := true, boolean use_osmux := false)
runs on MTC_CT return BSC_ConnHdlrPars {
var BSC_ConnHdlrNetworkPars net_pars := {
kc_support := '0A'O, /* A5/1 and A5/3 enabled */
@@ -364,7 +366,8 @@ runs on MTC_CT return BSC_ConnHdlrPars {
gsup_enable := gsup,
ran_idx := ran_idx,
use_umts_aka := false,
- ran_is_geran := ran_is_geran
+ ran_is_geran := ran_is_geran,
+ use_osmux := use_osmux
};
if (not ran_is_geran) {
pars.use_umts_aka := true;
@@ -407,9 +410,9 @@ function f_start_handler_with_pars(void_fn fn, BSC_ConnHdlrPars pars, integer bs
return vc_conn;
}
-function f_start_handler(void_fn fn, integer imsi_suffix, integer ran_idx := 0, boolean ran_is_geran := true)
+function f_start_handler(void_fn fn, integer imsi_suffix, integer ran_idx := 0, boolean ran_is_geran := true, boolean use_osmux := false)
runs on MTC_CT return BSC_ConnHdlr {
- return f_start_handler_with_pars(fn, f_init_pars(imsi_suffix, ran_idx := ran_idx, ran_is_geran := ran_is_geran));
+ return f_start_handler_with_pars(fn, f_init_pars(imsi_suffix, ran_idx := ran_idx, ran_is_geran := ran_is_geran, use_osmux := use_osmux));
}
private function f_tc_lu_imsi_noauth_tmsi(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr {
@@ -1711,6 +1714,7 @@ private function f_tc_lu_and_mt_call(charstring id, BSC_ConnHdlrPars pars) runs
cpars.bss_rtp_port := 1110;
cpars.mgcp_connection_id_bss := '10004'H;
cpars.mgcp_connection_id_mss := '10005'H;
+ cpars.use_osmux := pars.use_osmux;
/* Note: This is an optional parameter. When the call-agent (MSC) does
* supply a full endpoint name this setting will be overwritten. */
@@ -1727,6 +1731,15 @@ testcase TC_lu_and_mt_call() runs on MTC_CT {
vc_conn.done;
}
+testcase TC_lu_and_mt_call_osmux() runs on MTC_CT {
+ var BSC_ConnHdlr vc_conn;
+ f_init(1, false, true, true);
+ f_vty_config(MSCVTY, "msc", "osmux on");
+
+ vc_conn := f_start_handler(refers(f_tc_lu_and_mt_call), 39, 0, true, true);
+ vc_conn.done;
+}
+
/* Test MO Call SETUP with DTMF */
private function f_tc_mo_setup_dtmf_dup(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr {
f_init_handler(pars);
@@ -5303,6 +5316,8 @@ control {
execute( TC_lu_imsi_auth_tmsi_encr_3_1_log_msc_debug() );
execute( TC_gsup_mt_multi_part_sms() );
execute( TC_mo_cc_bssmap_clear() );
+
+ execute( TC_lu_and_mt_call_osmux() );
}