fixeria has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16767 )


Change subject: MSC: add test cases for concurrent MO/MT SS/USSD transactions
......................................................................

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 8, and this limitation seems
    to be caused by size of GSUP_Emulation_CT.GsupExpectTable[],
    even despite SCCP_Emulation can handle twice more.

Change-Id: I2fb1c5d285163d5245d92fa24c197a5027ecbe6f
Related: OS#2931
---
M msc/MSC_Tests.ttcn
M msc/MSC_Tests_Iu.ttcn
2 files changed, 83 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/67/16767/1

diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn
index 508acdd..0319137 100644
--- a/msc/MSC_Tests.ttcn
+++ b/msc/MSC_Tests.ttcn
@@ -3744,6 +3744,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[8];
+       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[8];
+       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(220 + 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;
@@ -5894,6 +5932,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 */

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/16767
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I2fb1c5d285163d5245d92fa24c197a5027ecbe6f
Gerrit-Change-Number: 16767
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <axilira...@gmail.com>
Gerrit-MessageType: newchange

Reply via email to