Change in osmo-ttcn3-hacks[master]: BSC LCLS: restructure tests

2018-11-18 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/11555 )

Change subject: BSC LCLS: restructure tests
..


Patch Set 5: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/11555
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: Idf9fc8e639b0ece662ab26c481899ef39fb7edfe
Gerrit-Change-Number: 11555
Gerrit-PatchSet: 5
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: daniel 
Gerrit-Comment-Date: Sun, 18 Nov 2018 20:03:23 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ttcn3-hacks[master]: BSC LCLS: restructure tests

2018-11-18 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/11555 )

Change subject: BSC LCLS: restructure tests
..

BSC LCLS: restructure tests

Move duplicated code into separate functions to simplify adding test
cases which do not use MGW MDCX methods for closing the loop.

Change-Id: Idf9fc8e639b0ece662ab26c481899ef39fb7edfe
Related: OS#3659
---
M bsc/BSC_Tests_LCLS.ttcn
1 file changed, 52 insertions(+), 60 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/bsc/BSC_Tests_LCLS.ttcn b/bsc/BSC_Tests_LCLS.ttcn
index 0151329..585059e 100644
--- a/bsc/BSC_Tests_LCLS.ttcn
+++ b/bsc/BSC_Tests_LCLS.ttcn
@@ -255,11 +255,28 @@
f_lcls_test_fini();
 }

+private function f_tc_lcls_recv_ls_exp_mgcp() runs on lcls_test_CT {
+   var MgcpCommand mgcp_cmd;
+
+   interleave {
+   [] CONN_A.receive(tr_BSSMAP_LclsNotificationSts(LCLS_STS_not_yet_ls));
+   [] 
CONN_A.receive(tr_BSSMAP_LclsNotificationSts(LCLS_STS_locally_switched));
+   [] CONN_B.receive(LclsCompSync:LCLS_COMP_SYNC_ASS_COMPL);
+   [] CONN_A.receive(tr_MDCX) -> value mgcp_cmd {
+   CONN_A.send(f_build_mdcx_rsp(mgcp_cmd));
+   }
+   /* not needed, as this MDCX is still handled within 
MSC_ConnectionHandler
+   [] CONN_B.receive(tr_MDCX) -> value mgcp_cmd {
+   CONN_B.send(f_build_mdcx_rsp(mgcp_cmd));
+   }
+   */
+   }
+}
+
 private function f_tc_lcls_gcr_bway_connect(boolean hr) runs on lcls_test_CT {
var TestHdlrParams pars_a := valueof(t_def_TestHdlrPars);
var TestHdlrParams pars_b;
var MSC_ConnHdlr vc_conn;
-   var MgcpCommand mgcp_cmd;

f_lcls_init();

@@ -281,14 +298,8 @@
f_lcls_test_init(pars_a, pars_b);

CONN_A.receive(LclsCompSync:LCLS_COMP_SYNC_ASS_COMPL);
-   interleave {
-   [] CONN_A.receive(tr_BSSMAP_LclsNotificationSts(LCLS_STS_not_yet_ls));
-   [] 
CONN_A.receive(tr_BSSMAP_LclsNotificationSts(LCLS_STS_locally_switched));
-   [] CONN_B.receive(LclsCompSync:LCLS_COMP_SYNC_ASS_COMPL);
-   [] CONN_A.receive(tr_MDCX) -> value mgcp_cmd {
-   CONN_A.send(f_build_mdcx_rsp(mgcp_cmd));
-   }
-   }
+
+   f_tc_lcls_recv_ls_exp_mgcp();

f_lcls_test_fini();
 }
@@ -366,6 +377,12 @@
f_lcls_test_fini();
 }

+/* check for the cases where LCLS is not possible due to some reason */
+private function f_lcls_not_yet_ls() runs on lcls_test_CT {
+   CONN_A.receive(LclsCompSync:LCLS_COMP_SYNC_ASS_COMPL);
+   CONN_B.receive(LclsCompSync:LCLS_COMP_SYNC_ASS_COMPL);
+   CONN_A.receive(tr_BSSMAP_LclsNotificationSts(LCLS_STS_not_yet_ls));
+}

 /* Send an ASSIGNMENT REQ with LCLS GCR+CFG+CSC; expect no connect */
 testcase TC_lcls_gcr_bway_dont_connect() runs on lcls_test_CT {
@@ -387,9 +404,7 @@
pars_b.lcls.exp_sts := LCLS_STS_not_yet_ls;

f_lcls_test_init(pars_a, pars_b);
-   CONN_A.receive(LclsCompSync:LCLS_COMP_SYNC_ASS_COMPL);
-   CONN_B.receive(LclsCompSync:LCLS_COMP_SYNC_ASS_COMPL);
-   CONN_A.receive(tr_BSSMAP_LclsNotificationSts(LCLS_STS_not_yet_ls));
+   f_lcls_not_yet_ls();
f_wait_fail_notify();
f_lcls_test_fini();
 }
@@ -435,12 +450,26 @@
pars_b.lcls.exp_sts := LCLS_STS_not_yet_ls;

f_lcls_test_init(pars_a, pars_b);
-   CONN_A.receive(LclsCompSync:LCLS_COMP_SYNC_ASS_COMPL);
-   CONN_B.receive(LclsCompSync:LCLS_COMP_SYNC_ASS_COMPL);
-   CONN_A.receive(tr_BSSMAP_LclsNotificationSts(LCLS_STS_not_yet_ls));
+   f_lcls_not_yet_ls();
f_lcls_test_fini();
 }

+/* Expect given LCLS status alongside with corresponding MDCX commands */
+private function f_lcls_sts_mgcp(BIT4 expected_status) runs on lcls_test_CT {
+   var MgcpCommand mgcp_cmd;
+
+   interleave {
+   [] 
CONN_B.receive(tr_BSSMAP_LclsConnCtrlAck(tr_BSSMAP_IE_LclsSts(expected_status)));
+   [] CONN_A.receive(tr_BSSMAP_LclsNotificationSts(expected_status));
+   [] CONN_A.receive(tr_MDCX) -> value mgcp_cmd {
+   CONN_A.send(f_build_mdcx_rsp(mgcp_cmd));
+   }
+   [] CONN_B.receive(tr_MDCX) -> value mgcp_cmd {
+   CONN_B.send(f_build_mdcx_rsp(mgcp_cmd));
+   }
+   }
+}
+
 /* Send an ASSIGNMENT REQ with "do not connect" and enable later using LCLS 
CTRL */
 testcase TC_lcls_gcr_bway_dont_connect_csc() runs on lcls_test_CT {
var TestHdlrParams pars_a := valueof(t_def_TestHdlrPars);
@@ -463,9 +492,7 @@

/* start call and expect it to be "not yet" LS */
f_lcls_test_init(pars_a, pars_b);
-   CONN_A.receive(LclsCompSync:LCLS_COMP_SYNC_ASS_COMPL);
-   CONN_B.receive(LclsCompSync:LCLS_COMP_SYNC_ASS_COMPL);
-   CONN_A.receive(tr_BSSMAP_LclsNotificationSts(LCLS_STS_not_yet_ls));
+   f_lcls_not_yet_ls();
f_sleep(2.0);

/* send 

Change in osmo-ttcn3-hacks[master]: BSC LCLS: restructure tests

2018-11-06 Thread Max
Hello daniel, Harald Welte, Jenkins Builder,

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

https://gerrit.osmocom.org/11555

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

Change subject: BSC LCLS: restructure tests
..

BSC LCLS: restructure tests

Move duplicated code into separate functions to simplify adding test
cases which do not use MGW MDCX methods for closing the loop.

Change-Id: Idf9fc8e639b0ece662ab26c481899ef39fb7edfe
Related: OS#3659
---
M bsc/BSC_Tests_LCLS.ttcn
1 file changed, 52 insertions(+), 60 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/55/11555/4
--
To view, visit https://gerrit.osmocom.org/11555
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: Idf9fc8e639b0ece662ab26c481899ef39fb7edfe
Gerrit-Change-Number: 11555
Gerrit-PatchSet: 4
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: daniel 


Change in osmo-ttcn3-hacks[master]: BSC LCLS: restructure tests

2018-11-06 Thread daniel
daniel has posted comments on this change. ( https://gerrit.osmocom.org/11555 )

Change subject: BSC LCLS: restructure tests
..


Patch Set 2: Code-Review-1


--
To view, visit https://gerrit.osmocom.org/11555
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: Idf9fc8e639b0ece662ab26c481899ef39fb7edfe
Gerrit-Change-Number: 11555
Gerrit-PatchSet: 2
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: daniel 
Gerrit-Comment-Date: Tue, 06 Nov 2018 17:25:42 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ttcn3-hacks[master]: BSC LCLS: restructure tests

2018-11-06 Thread daniel
daniel has posted comments on this change. ( https://gerrit.osmocom.org/11555 )

Change subject: BSC LCLS: restructure tests
..


Patch Set 2:

(1 comment)

https://gerrit.osmocom.org/#/c/11555/2/bsc/BSC_Tests_LCLS.ttcn
File bsc/BSC_Tests_LCLS.ttcn:

https://gerrit.osmocom.org/#/c/11555/2/bsc/BSC_Tests_LCLS.ttcn@302
PS2, Line 302:  f_tc_lcls_recv_ls_exp_mgcp()
Missing semicolon ;
TTCN3 seems to accept it, but I think we want to keep this syntax as C-like as 
possible.



--
To view, visit https://gerrit.osmocom.org/11555
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: Idf9fc8e639b0ece662ab26c481899ef39fb7edfe
Gerrit-Change-Number: 11555
Gerrit-PatchSet: 2
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-CC: daniel 
Gerrit-Comment-Date: Tue, 06 Nov 2018 17:24:55 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmo-ttcn3-hacks[master]: BSC LCLS: restructure tests

2018-10-31 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/11555 )

Change subject: BSC LCLS: restructure tests
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/11555
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: Idf9fc8e639b0ece662ab26c481899ef39fb7edfe
Gerrit-Change-Number: 11555
Gerrit-PatchSet: 1
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Wed, 31 Oct 2018 22:07:13 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ttcn3-hacks[master]: BSC LCLS: restructure tests

2018-10-31 Thread Max
Max has posted comments on this change. ( https://gerrit.osmocom.org/11555 )

Change subject: BSC LCLS: restructure tests
..


Set Ready For Review


--
To view, visit https://gerrit.osmocom.org/11555
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: Idf9fc8e639b0ece662ab26c481899ef39fb7edfe
Gerrit-Change-Number: 11555
Gerrit-PatchSet: 1
Gerrit-Owner: Max 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Wed, 31 Oct 2018 19:15:23 +
Gerrit-HasComments: No
Gerrit-HasLabels: No