summaryrefslogtreecommitdiffstats
path: root/msc
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2019-02-14 18:23:28 +0100
committerPhilipp Maier <pmaier@sysmocom.de>2019-02-14 18:23:28 +0100
commit8e07a4a8d6b85e1bd211a74adb04fadd1011cd03 (patch)
tree84449e69f66a09a9550ce57738dee95fca79791d /msc
parentdb7fb8da951941a019f1032c7f36edcee8e802bd (diff)
MSC_Tests: Make sure only sgsap related tests use the SGs interface
At the moment the SGs interface is started and connected in all tests in the testsuite. This may be a problem because the IUT may lack the SGs support. In this case all tests would fail because of the missing SGs interface. Lets initalize and connect the SGs interface only for SGs related tests to prevent unrelated test failures. Change-Id: I8e012e3599ad00db2e132b6463499f8a4a2307f1 Related: OS#3614
Diffstat (limited to 'msc')
-rw-r--r--msc/MSC_Tests.ttcn126
1 files changed, 81 insertions, 45 deletions
diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn
index 34fe9ad..00f9bec 100644
--- a/msc/MSC_Tests.ttcn
+++ b/msc/MSC_Tests.ttcn
@@ -119,8 +119,6 @@ modulepar {
charstring mp_mme_name := "mmec01.mmegi0001.mme.epc.mnc070.mcc901.3gppnetwork.org";
charstring mp_vlr_name := "vlr.example.net";
- boolean mp_sgsap_enable := false;
-
BSSAP_Configurations mp_bssap_cfg := {
{
sccp_service_type := "mtp3_itu",
@@ -254,7 +252,7 @@ function f_init_gsup(charstring id) runs on MTC_CT {
}
}
-function f_init(integer num_bsc := 1) runs on MTC_CT {
+function f_init(integer num_bsc := 1, boolean sgsap := false) runs on MTC_CT {
if (g_initialized == true) {
return;
@@ -280,7 +278,7 @@ function f_init(integer num_bsc := 1) runs on MTC_CT {
f_init_gsup("MSC_Test");
f_init_smpp("MSC_Test");
- if (mp_sgsap_enable == true) {
+ if (sgsap == true) {
f_init_sgsap("MSC_Test");
}
@@ -472,7 +470,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) runs on MTC_CT return BSC_ConnHdlrPars {
+function f_init_pars(integer imsi_suffix, boolean sgsap := false) 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,
@@ -497,7 +495,7 @@ function f_init_pars(integer imsi_suffix) runs on MTC_CT return BSC_ConnHdlrPars
ipa_ctrl_port := mp_msc_ctrl_port,
ipa_ctrl_enable := true,
mm_info := mp_mm_info,
- sgsap_enable := mp_sgsap_enable
+ sgsap_enable := sgsap
};
return pars;
}
@@ -523,7 +521,7 @@ function f_start_handler_with_pars(void_fn fn, BSC_ConnHdlrPars pars) runs on MT
connect(vc_conn:SMPP, vc_SMPP:SMPP_CLIENT);
connect(vc_conn:SMPP_PROC, vc_SMPP:SMPP_PROC);
/* SGs part */
- if (mp_sgsap_enable == true) {
+ if (pars.sgsap_enable == true) {
connect(vc_conn:SGsAP, vc_SGsAP:SGsAP_CLIENT);
connect(vc_conn:SGsAP_PROC, vc_SGsAP:SGsAP_PROC);
}
@@ -3569,9 +3567,11 @@ private function f_tc_sgsap_reset(charstring id, BSC_ConnHdlrPars pars) runs on
}
testcase TC_sgsap_reset() runs on MTC_CT {
+ var BSC_ConnHdlrPars pars;
var BSC_ConnHdlr vc_conn;
- f_init();
- vc_conn := f_start_handler(refers(f_tc_sgsap_reset), 11810);
+ f_init(1, true);
+ pars := f_init_pars(11810, true);
+ vc_conn := f_start_handler_with_pars(refers(f_tc_sgsap_reset), pars);
vc_conn.done;
}
@@ -3661,9 +3661,11 @@ private function f_tc_sgsap_lu(charstring id, BSC_ConnHdlrPars pars) runs on BSC
setverdict(pass);
}
testcase TC_sgsap_lu() runs on MTC_CT {
+ var BSC_ConnHdlrPars pars;
var BSC_ConnHdlr vc_conn;
- f_init();
- vc_conn := f_start_handler(refers(f_tc_sgsap_lu), 11811);
+ f_init(1, true);
+ pars := f_init_pars(11811, true);
+ vc_conn := f_start_handler_with_pars(refers(f_tc_sgsap_lu), pars);
vc_conn.done;
}
@@ -3698,10 +3700,12 @@ private function f_tc_sgsap_lu_imsi_reject(charstring id, BSC_ConnHdlrPars pars)
setverdict(pass);
}
testcase TC_sgsap_lu_imsi_reject() runs on MTC_CT {
+ var BSC_ConnHdlrPars pars;
var BSC_ConnHdlr vc_conn;
- f_init();
+ f_init(1, true);
+ pars := f_init_pars(11812, true);
- vc_conn := f_start_handler(refers(f_tc_sgsap_lu_imsi_reject), 11812);
+ vc_conn := f_start_handler_with_pars(refers(f_tc_sgsap_lu_imsi_reject), pars);
vc_conn.done;
}
@@ -3759,10 +3763,12 @@ private function f_tc_sgsap_lu_and_nothing(charstring id, BSC_ConnHdlrPars pars)
setverdict(pass);
}
testcase TC_sgsap_lu_and_nothing() runs on MTC_CT {
+ var BSC_ConnHdlrPars pars;
var BSC_ConnHdlr vc_conn;
- f_init();
+ f_init(1, true);
+ pars := f_init_pars(11813, true);
- vc_conn := f_start_handler(refers(f_tc_sgsap_lu_and_nothing), 11813);
+ vc_conn := f_start_handler_with_pars(refers(f_tc_sgsap_lu_and_nothing), pars);
vc_conn.done;
}
@@ -3782,9 +3788,11 @@ runs on BSC_ConnHdlr {
setverdict(pass);
}
testcase TC_sgsap_expl_imsi_det_eps() runs on MTC_CT {
+ var BSC_ConnHdlrPars pars;
var BSC_ConnHdlr vc_conn;
- f_init();
- vc_conn := f_start_handler(refers(f_tc_sgsap_expl_imsi_det_eps), 11814);
+ f_init(1, true);
+ pars := f_init_pars(11814, true);
+ vc_conn := f_start_handler_with_pars(refers(f_tc_sgsap_expl_imsi_det_eps), pars);
vc_conn.done;
}
@@ -3805,9 +3813,11 @@ runs on BSC_ConnHdlr {
setverdict(pass);
}
testcase TC_sgsap_expl_imsi_det_noneps() runs on MTC_CT {
+ var BSC_ConnHdlrPars pars;
var BSC_ConnHdlr vc_conn;
- f_init();
- vc_conn := f_start_handler(refers(f_tc_sgsap_expl_imsi_det_noneps), 11815);
+ f_init(1, true);
+ pars := f_init_pars(11815, true);
+ vc_conn := f_start_handler_with_pars(refers(f_tc_sgsap_expl_imsi_det_noneps), pars);
vc_conn.done;
}
@@ -3854,9 +3864,11 @@ runs on BSC_ConnHdlr {
setverdict(pass);
}
testcase TC_sgsap_paging_rej() runs on MTC_CT {
+ var BSC_ConnHdlrPars pars;
var BSC_ConnHdlr vc_conn;
- f_init();
- vc_conn := f_start_handler(refers(f_tc_sgsap_paging_rej), 11816);
+ f_init(1, true);
+ pars := f_init_pars(11816, true);
+ vc_conn := f_start_handler_with_pars(refers(f_tc_sgsap_paging_rej), pars);
vc_conn.done;
}
@@ -3901,9 +3913,11 @@ runs on BSC_ConnHdlr {
setverdict(pass);
}
testcase TC_sgsap_paging_subscr_rej() runs on MTC_CT {
+ var BSC_ConnHdlrPars pars;
var BSC_ConnHdlr vc_conn;
- f_init();
- vc_conn := f_start_handler(refers(f_tc_sgsap_paging_subscr_rej), 11817);
+ f_init(1, true);
+ pars := f_init_pars(11817, true);
+ vc_conn := f_start_handler_with_pars(refers(f_tc_sgsap_paging_subscr_rej), pars);
vc_conn.done;
}
@@ -3943,9 +3957,11 @@ runs on BSC_ConnHdlr {
setverdict(pass);
}
testcase TC_sgsap_paging_ue_unr() runs on MTC_CT {
+ var BSC_ConnHdlrPars pars;
var BSC_ConnHdlr vc_conn;
- f_init();
- vc_conn := f_start_handler(refers(f_tc_sgsap_paging_ue_unr), 11818);
+ f_init(1, true);
+ pars := f_init_pars(11818, true);
+ vc_conn := f_start_handler_with_pars(refers(f_tc_sgsap_paging_ue_unr), pars);
vc_conn.done;
}
@@ -3982,9 +3998,11 @@ runs on BSC_ConnHdlr {
setverdict(pass);
}
testcase TC_sgsap_paging_and_nothing() runs on MTC_CT {
+ var BSC_ConnHdlrPars pars;
var BSC_ConnHdlr vc_conn;
- f_init();
- vc_conn := f_start_handler(refers(f_tc_sgsap_paging_and_nothing), 11819);
+ f_init(1, true);
+ pars := f_init_pars(11819, true);
+ vc_conn := f_start_handler_with_pars(refers(f_tc_sgsap_paging_and_nothing), pars);
vc_conn.done;
}
@@ -4038,9 +4056,11 @@ runs on BSC_ConnHdlr {
setverdict(pass);
}
testcase TC_sgsap_paging_and_lu() runs on MTC_CT {
+ var BSC_ConnHdlrPars pars;
var BSC_ConnHdlr vc_conn;
- f_init();
- vc_conn := f_start_handler(refers(f_tc_sgsap_paging_and_lu), 11820);
+ f_init(1, true);
+ pars := f_init_pars(11820, true);
+ vc_conn := f_start_handler_with_pars(refers(f_tc_sgsap_paging_and_lu), pars);
vc_conn.done;
}
@@ -4067,9 +4087,11 @@ private function f_tc_sgsap_unexp_ud(charstring id, BSC_ConnHdlrPars pars) runs
setverdict(pass);
}
testcase TC_sgsap_unexp_ud() runs on MTC_CT {
+ var BSC_ConnHdlrPars pars;
var BSC_ConnHdlr vc_conn;
- f_init();
- vc_conn := f_start_handler(refers(f_tc_sgsap_unexp_ud), 11821);
+ f_init(1, true);
+ pars := f_init_pars(11821, true);
+ vc_conn := f_start_handler_with_pars(refers(f_tc_sgsap_unexp_ud), pars);
vc_conn.done;
}
@@ -4091,9 +4113,11 @@ private function f_tc_sgsap_unsol_ud(charstring id, BSC_ConnHdlrPars pars) runs
setverdict(pass);
}
testcase TC_sgsap_unsol_ud() runs on MTC_CT {
+ var BSC_ConnHdlrPars pars;
var BSC_ConnHdlr vc_conn;
- f_init();
- vc_conn := f_start_handler(refers(f_tc_sgsap_unsol_ud), 11822);
+ f_init(1, true);
+ pars := f_init_pars(11822, true);
+ vc_conn := f_start_handler_with_pars(refers(f_tc_sgsap_unsol_ud), pars);
vc_conn.done;
}
@@ -4237,9 +4261,11 @@ private function f_tc_sgsap_mt_sms(charstring id, BSC_ConnHdlrPars pars) runs on
setverdict(pass);
}
testcase TC_sgsap_mt_sms() runs on MTC_CT {
+ var BSC_ConnHdlrPars pars;
var BSC_ConnHdlr vc_conn;
- f_init();
- vc_conn := f_start_handler(refers(f_tc_sgsap_mt_sms), 11823);
+ f_init(1, true);
+ pars := f_init_pars(11823, true);
+ vc_conn := f_start_handler_with_pars(refers(f_tc_sgsap_mt_sms), pars);
vc_conn.done;
}
@@ -4265,9 +4291,11 @@ private function f_tc_sgsap_mo_sms(charstring id, BSC_ConnHdlrPars pars) runs on
f_sgsap_bssmap_screening()
}
testcase TC_sgsap_mo_sms() runs on MTC_CT {
+ var BSC_ConnHdlrPars pars;
var BSC_ConnHdlr vc_conn;
- f_init();
- vc_conn := f_start_handler(refers(f_tc_sgsap_mo_sms), 11824);
+ f_init(1, true);
+ pars := f_init_pars(11824, true);
+ vc_conn := f_start_handler_with_pars(refers(f_tc_sgsap_mo_sms), pars);
vc_conn.done;
}
@@ -4337,9 +4365,11 @@ private function f_tc_sgsap_mt_sms_and_nothing(charstring id, BSC_ConnHdlrPars p
setverdict(pass);
}
testcase TC_sgsap_mt_sms_and_nothing() runs on MTC_CT {
+ var BSC_ConnHdlrPars pars;
var BSC_ConnHdlr vc_conn;
- f_init();
- vc_conn := f_start_handler(refers(f_tc_sgsap_mt_sms_and_nothing), 11825);
+ f_init(1, true);
+ pars := f_init_pars(11825, true);
+ vc_conn := f_start_handler_with_pars(refers(f_tc_sgsap_mt_sms_and_nothing), pars);
vc_conn.done;
}
@@ -4397,9 +4427,11 @@ private function f_tc_sgsap_mt_sms_and_reject(charstring id, BSC_ConnHdlrPars pa
setverdict(pass);
}
testcase TC_sgsap_mt_sms_and_reject() runs on MTC_CT {
+ var BSC_ConnHdlrPars pars;
var BSC_ConnHdlr vc_conn;
- f_init();
- vc_conn := f_start_handler(refers(f_tc_sgsap_mt_sms_and_reject), 11826);
+ f_init(1, true);
+ pars := f_init_pars(11826, true);
+ vc_conn := f_start_handler_with_pars(refers(f_tc_sgsap_mt_sms_and_reject), pars);
vc_conn.done;
}
@@ -4471,10 +4503,12 @@ private function f_tc_bssap_lu_sgsap_lu_and_mt_call(charstring id, BSC_ConnHdlrP
f_mt_lu_and_csfb_call(id, pars, true);
}
testcase TC_bssap_lu_sgsap_lu_and_mt_call() runs on MTC_CT {
+ var BSC_ConnHdlrPars pars;
var BSC_ConnHdlr vc_conn;
- f_init();
+ f_init(1, true);
+ pars := f_init_pars(118139, true);
- vc_conn := f_start_handler(refers(f_tc_bssap_lu_sgsap_lu_and_mt_call), 139);
+ vc_conn := f_start_handler_with_pars(refers(f_tc_bssap_lu_sgsap_lu_and_mt_call), pars);
vc_conn.done;
}
@@ -4484,10 +4518,12 @@ private function f_tc_sgsap_lu_and_mt_call(charstring id, BSC_ConnHdlrPars pars)
f_mt_lu_and_csfb_call(id, pars, false);
}
testcase TC_sgsap_lu_and_mt_call() runs on MTC_CT {
+ var BSC_ConnHdlrPars pars;
var BSC_ConnHdlr vc_conn;
- f_init();
+ f_init(1, true);
+ pars := f_init_pars(11827, true);
- vc_conn := f_start_handler(refers(f_tc_sgsap_lu_and_mt_call), 11827);
+ vc_conn := f_start_handler_with_pars(refers(f_tc_sgsap_lu_and_mt_call), pars);
vc_conn.done;
}