summaryrefslogtreecommitdiffstats
path: root/msc/MSC_Tests.ttcn
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2020-01-10 00:23:10 +0100
committerlaforge <laforge@osmocom.org>2020-01-10 16:03:27 +0000
commitae747741388d3e3bb538332f26d49b20ac9aee69 (patch)
treed277bff678e1253a2d466d903258658df9dfad6b /msc/MSC_Tests.ttcn
parent70d15bf48f500c26357f82ad03a2dd7ade9fecfe (diff)
MSC: f_ran_register_imsi(): allow passing omit as TMSI
Diffstat (limited to 'msc/MSC_Tests.ttcn')
-rw-r--r--msc/MSC_Tests.ttcn71
1 files changed, 11 insertions, 60 deletions
diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn
index 529a396..f7df81a 100644
--- a/msc/MSC_Tests.ttcn
+++ b/msc/MSC_Tests.ttcn
@@ -1345,15 +1345,9 @@ testcase TC_mo_crcx_ran_reject() runs on MTC_CT {
private function f_mt_call_start(inout CallParameters cpars) runs on BSC_ConnHdlr {
var MNCC_PDU mncc;
var MgcpCommand mgcp_cmd;
- var OCT4 tmsi;
f_perform_lu();
- if (isvalue(g_pars.tmsi)) {
- tmsi := g_pars.tmsi;
- } else {
- tmsi := 'FFFFFFFF'O;
- }
- f_ran_register_imsi(g_pars.imsi, tmsi);
+ f_ran_register_imsi(g_pars.imsi, g_pars.tmsi);
/* Allocate call reference and send SETUP via MNCC to MSC */
cpars.mncc_callref := f_rnd_int(2147483648);
@@ -1914,7 +1908,6 @@ runs on BSC_ConnHdlr {
/* LU followed by MT SMS */
friend function f_tc_lu_and_mt_sms(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr {
var SmsParameters spars := valueof(t_SmsPars);
- var OCT4 tmsi;
f_init_handler(pars);
@@ -1922,12 +1915,7 @@ friend function f_tc_lu_and_mt_sms(charstring id, BSC_ConnHdlrPars pars) runs on
f_perform_lu();
/* register an 'expect' for given IMSI (+TMSI) */
- if (isvalue(g_pars.tmsi)) {
- tmsi := g_pars.tmsi;
- } else {
- tmsi := 'FFFFFFFF'O;
- }
- f_ran_register_imsi(g_pars.imsi, tmsi);
+ f_ran_register_imsi(g_pars.imsi, g_pars.tmsi);
f_vty_sms_send(hex2str(pars.imsi), "2342", "Hello SMS");
@@ -1955,19 +1943,14 @@ testcase TC_lu_and_mt_sms() runs on MTC_CT {
/* Paging for MT SMS but no response */
friend function f_tc_lu_and_mt_sms_paging_and_nothing(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr {
var SmsParameters spars := valueof(t_SmsPars);
- var OCT4 tmsi;
+
f_init_handler(pars, 150.0);
/* Perform location update */
f_perform_lu();
/* register an 'expect' for given IMSI (+TMSI) */
- if (isvalue(g_pars.tmsi)) {
- tmsi := g_pars.tmsi;
- } else {
- tmsi := 'FFFFFFFF'O;
- }
- f_ran_register_imsi(g_pars.imsi, tmsi);
+ f_ran_register_imsi(g_pars.imsi, g_pars.tmsi);
f_vty_sms_send(hex2str(pars.imsi), "2342", "Hello SMS");
@@ -2013,7 +1996,6 @@ testcase TC_lu_and_mt_sms_paging_and_nothing() runs on MTC_CT {
/* LU followed by MT SMS with repeated paging */
friend function f_tc_lu_and_mt_sms_paging_repeated(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr {
var SmsParameters spars := valueof(t_SmsPars);
- var OCT4 tmsi;
f_init_handler(pars);
@@ -2021,12 +2003,7 @@ friend function f_tc_lu_and_mt_sms_paging_repeated(charstring id, BSC_ConnHdlrPa
f_perform_lu();
/* register an 'expect' for given IMSI (+TMSI) */
- if (isvalue(g_pars.tmsi)) {
- tmsi := g_pars.tmsi;
- } else {
- tmsi := 'FFFFFFFF'O;
- }
- f_ran_register_imsi(g_pars.imsi, tmsi);
+ f_ran_register_imsi(g_pars.imsi, g_pars.tmsi);
f_vty_sms_send(hex2str(pars.imsi), "2342", "Hello SMS");
@@ -2310,11 +2287,7 @@ runs on BSC_ConnHdlr {
f_perform_lu();
/* Register an 'expect' for given IMSI (+TMSI) */
- if (isvalue(g_pars.tmsi)) {
- f_ran_register_imsi(g_pars.imsi, g_pars.tmsi);
- } else {
- f_ran_register_imsi(g_pars.imsi, 'FFFFFFFF'O);
- }
+ f_ran_register_imsi(g_pars.imsi, g_pars.tmsi);
var template GSUP_PDU mt_forwardSM_res := tr_GSUP_MT_FORWARD_SM_RES(
imsi := g_pars.imsi,
@@ -2375,11 +2348,7 @@ runs on BSC_ConnHdlr {
f_perform_lu();
/* Register an 'expect' for given IMSI (+TMSI) */
- if (isvalue(g_pars.tmsi)) {
- f_ran_register_imsi(g_pars.imsi, g_pars.tmsi);
- } else {
- f_ran_register_imsi(g_pars.imsi, 'FFFFFFFF'O);
- }
+ f_ran_register_imsi(g_pars.imsi, g_pars.tmsi);
var template GSUP_PDU mt_forwardSM_err := tr_GSUP_MT_FORWARD_SM_ERR(
imsi := g_pars.imsi,
@@ -2442,11 +2411,7 @@ runs on BSC_ConnHdlr {
f_perform_lu();
/* Register an 'expect' for given IMSI (+TMSI) */
- if (isvalue(g_pars.tmsi)) {
- f_ran_register_imsi(g_pars.imsi, g_pars.tmsi);
- } else {
- f_ran_register_imsi(g_pars.imsi, 'FFFFFFFF'O);
- }
+ f_ran_register_imsi(g_pars.imsi, g_pars.tmsi);
/* Submit the 1st MT SMS on GSUP */
log("TX MT-forwardSM-Req for the 1st SMS");
@@ -2555,11 +2520,7 @@ runs on BSC_ConnHdlr {
f_perform_lu();
/* Register an 'expect' for given IMSI (+TMSI) */
- if (isvalue(g_pars.tmsi)) {
- f_ran_register_imsi(g_pars.imsi, g_pars.tmsi);
- } else {
- f_ran_register_imsi(g_pars.imsi, 'FFFFFFFF'O);
- }
+ f_ran_register_imsi(g_pars.imsi, g_pars.tmsi);
/* Send CM Service Request for MO SMMA */
f_establish_fully(EST_TYPE_MO_SMS);
@@ -2659,11 +2620,7 @@ runs on BSC_ConnHdlr {
f_perform_lu();
/* Register an 'expect' for given IMSI (+TMSI) */
- if (isvalue(g_pars.tmsi)) {
- f_ran_register_imsi(g_pars.imsi, g_pars.tmsi);
- } else {
- f_ran_register_imsi(g_pars.imsi, 'FFFFFFFF'O);
- }
+ f_ran_register_imsi(g_pars.imsi, g_pars.tmsi);
var template GSUP_PDU mt_forwardSM_res := tr_GSUP_MT_FORWARD_SM_RES(
imsi := g_pars.imsi,
@@ -2811,13 +2768,7 @@ private function f_tc_smpp_mt_sms(charstring id, BSC_ConnHdlrPars pars) runs on
SMPP.receive(tr_SMPP(c_SMPP_command_id_alert_notification, ESME_ROK));
/* register an 'expect' for given IMSI (+TMSI) */
- var OCT4 tmsi;
- if (isvalue(g_pars.tmsi)) {
- tmsi := g_pars.tmsi;
- } else {
- tmsi := 'FFFFFFFF'O;
- }
- f_ran_register_imsi(g_pars.imsi, tmsi);
+ f_ran_register_imsi(g_pars.imsi, g_pars.tmsi);
var SmsParameters spars := valueof(t_SmsPars);
/* TODO: test with more intelligent user data; test different coding schemes */