MSC: add test cases for concurrent MO/MT SS/USSD transactions
Both test cases make use of the existing functions:
- TC_multi_lu_and_mo_ussd: f_tc_lu_and_mo_ussd_single_request(),
- TC_multi_lu_and_mt_ussd: f_tc_lu_and_mt_ussd_notification(),
starting several (*) BSC_ConnHdlr components in parallel.
(*) The maximum amount is limited by 16 - this is as much
as both GSUP and SCTP emulation components can handle.
Change-Id: I2fb1c5d285163d5245d92fa24c197a5027ecbe6f
Related: OS#2931
diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn
index f7df81a..177c2f8 100644
--- a/msc/MSC_Tests.ttcn
+++ b/msc/MSC_Tests.ttcn
@@ -3695,6 +3695,44 @@
}
+/* Verify multiple concurrent MO SS/USSD transactions
+ * (one subscriber - one transaction) */
+testcase TC_multi_lu_and_mo_ussd() runs on MTC_CT {
+ var BSC_ConnHdlr vc_conn[16];
+ var integer i;
+
+ f_init();
+
+ for (i := 0; i < sizeof(vc_conn); i := i + 1) {
+ vc_conn[i] := f_start_handler(refers(f_tc_lu_and_mo_ussd_single_request), 210 + i);
+ }
+
+ for (i := 0; i < sizeof(vc_conn); i := i + 1) {
+ vc_conn[i].done;
+ }
+}
+
+/* Verify multiple concurrent MT SS/USSD transactions
+ * (one subscriber - one transaction) */
+testcase TC_multi_lu_and_mt_ussd() runs on MTC_CT {
+ var BSC_ConnHdlr vc_conn[16];
+ var integer i;
+ var OCT4 sid;
+
+ f_init();
+
+ for (i := 0; i < sizeof(vc_conn); i := i + 1) {
+ sid := '200001'O & int2oct(i, 1); /* All transactions must use different session ID */
+ vc_conn[i] := f_start_handler_with_pars(refers(f_tc_lu_and_mt_ussd_notification),
+ f_init_pars(226 + i, gsup_sid := sid));
+ }
+
+ for (i := 0; i < sizeof(vc_conn); i := i + 1) {
+ vc_conn[i].done;
+ }
+}
+
+
/* A5/1 only permitted on network side; attempt an invalid CIPHER MODE COMPLETE with A5/3 which MSC should reject. */
private function f_tc_cipher_complete_with_invalid_cipher(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr {
pars.net.expect_auth := true;
@@ -5845,6 +5883,9 @@
execute( TC_proc_ss_paging_fail() );
execute( TC_proc_ss_abort() );
+ execute( TC_multi_lu_and_mo_ussd() );
+ execute( TC_multi_lu_and_mt_ussd() );
+
execute( TC_cipher_complete_with_invalid_cipher() );
execute( TC_cipher_complete_1_without_cipher() );
execute( TC_cipher_complete_3_without_cipher() );
diff --git a/msc/MSC_Tests_Iu.ttcn b/msc/MSC_Tests_Iu.ttcn
index 586642b..b6b0983 100644
--- a/msc/MSC_Tests_Iu.ttcn
+++ b/msc/MSC_Tests_Iu.ttcn
@@ -462,6 +462,45 @@
vc_conn.done;
}
+/* Verify multiple concurrent MO SS/USSD transactions
+ * (one subscriber - one transaction) */
+testcase TC_iu_multi_lu_and_mo_ussd() runs on MTC_CT {
+ var BSC_ConnHdlr vc_conn[8];
+ var BSC_ConnHdlrPars pars;
+ var integer i;
+
+ f_init(3);
+
+ for (i := 0; i < sizeof(vc_conn); i := i + 1) {
+ pars := f_init_pars(1100 + i, ran_idx := 2, ran_is_geran := false);
+ vc_conn[i] := f_start_handler_with_pars(refers(f_tc_lu_and_mo_ussd_single_request), pars);
+ }
+
+ for (i := 0; i < sizeof(vc_conn); i := i + 1) {
+ vc_conn[i].done;
+ }
+}
+
+/* Verify multiple concurrent MT SS/USSD transactions
+ * (one subscriber - one transaction) */
+testcase TC_iu_multi_lu_and_mt_ussd() runs on MTC_CT {
+ var BSC_ConnHdlr vc_conn[8];
+ var BSC_ConnHdlrPars pars;
+ var integer i;
+
+ f_init(3);
+
+ for (i := 0; i < sizeof(vc_conn); i := i + 1) {
+ pars := f_init_pars(1110 + i, ran_idx := 2, ran_is_geran := false,
+ gsup_sid := '200001'O & int2oct(i, 1));
+ vc_conn[i] := f_start_handler_with_pars(refers(f_tc_lu_and_mt_ussd_notification), pars);
+ }
+
+ for (i := 0; i < sizeof(vc_conn); i := i + 1) {
+ vc_conn[i].done;
+ }
+}
+
testcase TC_iu_lu_with_invalid_mcc_mnc() runs on MTC_CT {
var BSC_ConnHdlr vc_conn;
f_init(3);
@@ -523,6 +562,9 @@
execute( TC_iu_proc_ss_paging_fail() );
execute( TC_iu_proc_ss_abort() );
+ execute( TC_iu_multi_lu_and_mo_ussd() );
+ execute( TC_iu_multi_lu_and_mt_ussd() );
+
execute( TC_iu_lu_with_invalid_mcc_mnc() );
/* TODO: Iu + SGsAP related tests, e.g. paging on IuCS */
diff --git a/msc/expected-results.xml b/msc/expected-results.xml
index a7b7142..074eeb1 100644
--- a/msc/expected-results.xml
+++ b/msc/expected-results.xml
@@ -73,6 +73,8 @@
<testcase classname='MSC_Tests' name='TC_proc_ss_for_unknown_session' time='MASKED'/>
<testcase classname='MSC_Tests' name='TC_proc_ss_paging_fail' time='MASKED'/>
<testcase classname='MSC_Tests' name='TC_proc_ss_abort' time='MASKED'/>
+ <testcase classname='MSC_Tests' name='TC_multi_lu_and_mo_ussd' time='MASKED'/>
+ <testcase classname='MSC_Tests' name='TC_multi_lu_and_mt_ussd' time='MASKED'/>
<testcase classname='MSC_Tests' name='TC_cipher_complete_with_invalid_cipher' time='MASKED'/>
<testcase classname='MSC_Tests' name='TC_cipher_complete_1_without_cipher' time='MASKED'/>
<testcase classname='MSC_Tests' name='TC_cipher_complete_3_without_cipher' time='MASKED'/>
@@ -212,6 +214,8 @@
<testcase classname='MSC_Tests_Iu' name='TC_iu_proc_ss_for_unknown_session' time='MASKED'/>
<testcase classname='MSC_Tests_Iu' name='TC_iu_proc_ss_paging_fail' time='MASKED'/>
<testcase classname='MSC_Tests_Iu' name='TC_iu_proc_ss_abort' time='MASKED'/>
+ <testcase classname='MSC_Tests_Iu' name='TC_iu_multi_lu_and_mo_ussd' time='MASKED'/>
+ <testcase classname='MSC_Tests_Iu' name='TC_iu_multi_lu_and_mt_ussd' time='MASKED'/>
<testcase classname='MSC_Tests_Iu' name='TC_iu_lu_with_invalid_mcc_mnc' time='MASKED'/>
<testcase classname='MSC_Tests_Iu' name='TC_mo_cc_iu_release' time='MASKED'/>
</testsuite>