Change in osmo-ttcn3-hacks[master]: MSC_Tests.ttcn: introduce TC_gsup_mt_multi_part_sms

2019-01-11 Thread Vadim Yanitskiy
Vadim Yanitskiy has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/12058 )

Change subject: MSC_Tests.ttcn: introduce TC_gsup_mt_multi_part_sms
..

MSC_Tests.ttcn: introduce TC_gsup_mt_multi_part_sms

The idea of this test case is to verify the process of multi-part
MT SMS transmission. The MSC should keep the RAN connection until
the last message part is transmitted.

Change-Id: I6308586a70c4fb3254c519330a61a9667372149f
Related: OS#3587
---
M msc/MSC_Tests.ttcn
M msc/expected-results.xml
2 files changed, 73 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Max: Looks good to me, approved
  Harald Welte: Looks good to me, approved
  Stefan Sperling: Looks good to me, but someone else must approve



diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn
index b7a02a7..05f8fd9 100644
--- a/msc/MSC_Tests.ttcn
+++ b/msc/MSC_Tests.ttcn
@@ -2343,6 +2343,77 @@
f_vty_config(MSCVTY, "msc", "no sms-over-gsup");
 }

+/* Test multi-part MT-SMS over GSUP */
+private function f_tc_gsup_mt_multi_part_sms(charstring id, BSC_ConnHdlrPars 
pars)
+runs on BSC_ConnHdlr {
+   var SmsParameters spars := valueof(t_SmsPars);
+
+   f_init_handler(pars);
+
+   /* We need to inspect GSUP activity */
+   f_create_gsup_expect(hex2str(g_pars.imsi));
+
+   /* Perform location update */
+   f_perform_lu();
+
+   /* Register an 'expect' for given IMSI (+TMSI) */
+   if (isvalue(g_pars.tmsi)) {
+   f_bssmap_register_imsi(g_pars.imsi, g_pars.tmsi);
+   } else {
+   f_bssmap_register_imsi(g_pars.imsi, ''O);
+   }
+
+   var template GSUP_PDU mt_forwardSM_res := tr_GSUP_MT_FORWARD_SM_RES(
+   imsi := g_pars.imsi,
+   /* NOTE: MSC should assign RP-MR itself */
+   sm_rp_mr := ?
+   );
+
+   /* Send 4 messages (NOTE: SM-RP-UI remains unchanged) */
+   for (var integer i := 3; i >= 0; i := i-1) {
+   /* Submit a MT SMS on GSUP (MMS is decremented) */
+   f_gsup_forwardSM_req(spars, int2oct(i, 1));
+
+   /* Expect Paging Request and Establish connection */
+   if (i == 3) { /* ... only once! */
+   BSSAP.receive(tr_BSSMAP_Paging(g_pars.imsi));
+   f_establish_fully(EST_TYPE_PAG_RESP);
+   }
+
+   /* Wait for MT SMS on DTAP */
+   f_mt_sms_expect(spars);
+
+   /* Send RP-ACK and expect MT-forwardSM-Res on GSUP */
+   f_mt_sms_send_rp_ack(spars);
+   alt {
+   [] GSUP.receive(mt_forwardSM_res) {
+   log("RX MT-forwardSM-Res (RP-ACK)");
+   setverdict(pass);
+   }
+   [] GSUP.receive {
+   log("RX unexpected GSUP message");
+   setverdict(fail);
+   mtc.stop;
+   }
+   }
+
+   /* Keep some 'distance' between transmissions */
+   f_sleep(1.5);
+   }
+
+   f_expect_clear();
+}
+testcase TC_gsup_mt_multi_part_sms() runs on MTC_CT {
+   var BSC_ConnHdlrPars pars;
+   var BSC_ConnHdlr vc_conn;
+   f_init();
+   pars := f_init_pars(91);
+   f_vty_config(MSCVTY, "msc", "sms-over-gsup");
+   vc_conn := 
f_start_handler_with_pars(refers(f_tc_gsup_mt_multi_part_sms), pars);
+   vc_conn.done;
+   f_vty_config(MSCVTY, "msc", "no sms-over-gsup");
+}
+
 /* convert GSM L3 TON to SMPP_TON enum */
 function f_sm_ton_from_gsm(BIT3 ton) return SMPP_TON {
select (ton) {
@@ -4206,6 +4277,7 @@
execute( TC_gsup_mo_smma() );
execute( TC_gsup_mt_sms_ack() );
execute( TC_gsup_mt_sms_err() );
+   execute( TC_gsup_mt_multi_part_sms() );

execute( TC_lu_and_mo_ussd_single_request() );
execute( TC_lu_and_mt_ussd_notification() );
diff --git a/msc/expected-results.xml b/msc/expected-results.xml
index 7a35296..8a19d5b 100644
--- a/msc/expected-results.xml
+++ b/msc/expected-results.xml
@@ -67,6 +67,7 @@
   
   
   
+  
   
   
   

--
To view, visit https://gerrit.osmocom.org/12058
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I6308586a70c4fb3254c519330a61a9667372149f
Gerrit-Change-Number: 12058
Gerrit-PatchSet: 5
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Reviewer: Vadim Yanitskiy 


Change in osmo-ttcn3-hacks[master]: MSC_Tests.ttcn: introduce TC_gsup_mt_multi_part_sms

2019-01-07 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/12058 )

Change subject: MSC_Tests.ttcn: introduce TC_gsup_mt_multi_part_sms
..


Patch Set 4: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/12058
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I6308586a70c4fb3254c519330a61a9667372149f
Gerrit-Change-Number: 12058
Gerrit-PatchSet: 4
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Comment-Date: Mon, 07 Jan 2019 15:20:06 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ttcn3-hacks[master]: MSC_Tests.ttcn: introduce TC_gsup_mt_multi_part_sms

2019-01-05 Thread Max
Max has posted comments on this change. ( https://gerrit.osmocom.org/12058 )

Change subject: MSC_Tests.ttcn: introduce TC_gsup_mt_multi_part_sms
..


Patch Set 4: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/12058
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I6308586a70c4fb3254c519330a61a9667372149f
Gerrit-Change-Number: 12058
Gerrit-PatchSet: 4
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Comment-Date: Sat, 05 Jan 2019 11:24:26 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ttcn3-hacks[master]: MSC_Tests.ttcn: introduce TC_gsup_mt_multi_part_sms

2018-12-17 Thread Stefan Sperling
Stefan Sperling has posted comments on this change. ( 
https://gerrit.osmocom.org/12058 )

Change subject: MSC_Tests.ttcn: introduce TC_gsup_mt_multi_part_sms
..


Patch Set 3: Code-Review+1

Looks fine to me.


--
To view, visit https://gerrit.osmocom.org/12058
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I6308586a70c4fb3254c519330a61a9667372149f
Gerrit-Change-Number: 12058
Gerrit-PatchSet: 3
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Stefan Sperling 
Gerrit-Comment-Date: Mon, 17 Dec 2018 11:07:50 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ttcn3-hacks[master]: MSC_Tests.ttcn: introduce TC_gsup_mt_multi_part_sms

2018-12-02 Thread Vadim Yanitskiy
Hello Jenkins Builder,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/12058

to look at the new patch set (#2).

Change subject: MSC_Tests.ttcn: introduce TC_gsup_mt_multi_part_sms
..

MSC_Tests.ttcn: introduce TC_gsup_mt_multi_part_sms

The idea of this test case is to verify the process of multi-part
MT SMS transmission. The MSC should keep the RAN connection until
the last message part is transmitted.

Change-Id: I6308586a70c4fb3254c519330a61a9667372149f
Related: OS#3587
---
M msc/MSC_Tests.ttcn
M msc/expected-results.xml
2 files changed, 73 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/58/12058/2
--
To view, visit https://gerrit.osmocom.org/12058
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I6308586a70c4fb3254c519330a61a9667372149f
Gerrit-Change-Number: 12058
Gerrit-PatchSet: 2
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Jenkins Builder (102)


Change in osmo-ttcn3-hacks[master]: MSC_Tests.ttcn: introduce TC_gsup_mt_multi_part_sms

2018-12-02 Thread Vadim Yanitskiy
Vadim Yanitskiy has uploaded this change for review. ( 
https://gerrit.osmocom.org/12058


Change subject: MSC_Tests.ttcn: introduce TC_gsup_mt_multi_part_sms
..

MSC_Tests.ttcn: introduce TC_gsup_mt_multi_part_sms

The idea of this test case is to verify the process of multi-part
MT SMS transmission. The MSC should keep the RAN connection until
the last message part is transmitted.

Change-Id: I6308586a70c4fb3254c519330a61a9667372149f
Related: OS#3587
---
M msc/MSC_Tests.ttcn
M msc/expected-results.xml
2 files changed, 73 insertions(+), 0 deletions(-)



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

diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn
index 3364e64..8a29696 100644
--- a/msc/MSC_Tests.ttcn
+++ b/msc/MSC_Tests.ttcn
@@ -2291,6 +2291,77 @@
f_vty_config(MSCVTY, "msc", "no sms-over-gsup");
 }

+/* Test multi-part MT-SMS over GSUP */
+private function f_tc_gsup_mt_multi_part_sms(charstring id, BSC_ConnHdlrPars 
pars)
+runs on BSC_ConnHdlr {
+   var SmsParameters spars := valueof(t_SmsPars);
+
+   f_init_handler(pars);
+
+   /* We need to inspect GSUP activity */
+   f_create_gsup_expect(hex2str(g_pars.imsi));
+
+   /* Perform location update */
+   f_perform_lu();
+
+   /* Register an 'expect' for given IMSI (+TMSI) */
+   if (isvalue(g_pars.tmsi)) {
+   f_bssmap_register_imsi(g_pars.imsi, g_pars.tmsi);
+   } else {
+   f_bssmap_register_imsi(g_pars.imsi, ''O);
+   }
+
+   var template GSUP_PDU mt_forwardSM_res := tr_GSUP_MT_FORWARD_SM_RES(
+   imsi := g_pars.imsi,
+   /* NOTE: MSC should assign RP-MR itself */
+   sm_rp_mr := ?
+   );
+
+   /* Send 4 messages (NOTE: SM-RP-UI remains unchanged) */
+   for (var integer i := 3; i >= 0; i := i-1) {
+   /* Submit a MT SMS on GSUP (MMS is decremented) */
+   f_gsup_forwardSM_req(spars, int2oct(i, 1));
+
+   /* Expect Paging Request and Establish connection */
+   if (i == 3) { /* ... only once! */
+   BSSAP.receive(tr_BSSMAP_Paging(g_pars.imsi));
+   f_establish_fully(EST_TYPE_PAG_RESP);
+   }
+
+   /* Wait for MT SMS on DTAP */
+   f_mt_sms_expect(spars);
+
+   /* Send RP-ACK and expect MT-forwardSM-Res on GSUP */
+   f_mt_sms_send_rp_ack(spars);
+   alt {
+   [] GSUP.receive(mt_forwardSM_res) {
+   log("RX MT-forwardSM-Res (RP-ACK)");
+   setverdict(pass);
+   }
+   [] GSUP.receive {
+   log("RX unexpected GSUP message");
+   setverdict(fail);
+   mtc.stop;
+   }
+   }
+
+   /* Keep some 'distance' between transmissions */
+   f_sleep(1.5);
+   }
+
+   f_expect_clear();
+}
+testcase TC_gsup_mt_multi_part_sms() runs on MTC_CT {
+   var BSC_ConnHdlrPars pars;
+   var BSC_ConnHdlr vc_conn;
+   f_init();
+   pars := f_init_pars(91);
+   f_vty_config(MSCVTY, "msc", "sms-over-gsup");
+   vc_conn := 
f_start_handler_with_pars(refers(f_tc_gsup_mt_multi_part_sms), pars);
+   vc_conn.done;
+   f_vty_config(MSCVTY, "msc", "no sms-over-gsup");
+}
+
 /* convert GSM L3 TON to SMPP_TON enum */
 function f_sm_ton_from_gsm(BIT3 ton) return SMPP_TON {
select (ton) {
@@ -3122,6 +3193,7 @@
execute( TC_gsup_mo_smma() );
execute( TC_gsup_mt_sms_ack() );
execute( TC_gsup_mt_sms_err() );
+   execute( TC_gsup_mt_multi_part_sms() );

execute( TC_lu_and_mo_ussd_single_request() );
execute( TC_lu_and_mt_ussd_notification() );
diff --git a/msc/expected-results.xml b/msc/expected-results.xml
index 710d6d4..a4a3322 100644
--- a/msc/expected-results.xml
+++ b/msc/expected-results.xml
@@ -67,6 +67,7 @@
   
   
   
+  
   
   
   

--
To view, visit https://gerrit.osmocom.org/12058
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6308586a70c4fb3254c519330a61a9667372149f
Gerrit-Change-Number: 12058
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy