Change in osmo-ttcn3-hacks[master]: sgsn: rework TC_attach_closed_add_vty to be executed in a single BSSG...

2018-09-04 Thread lynxis lazus
lynxis lazus has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/10391 )

Change subject: sgsn: rework TC_attach_closed_add_vty to be executed in a 
single BSSGP_ConnHldr
..

sgsn: rework TC_attach_closed_add_vty to be executed in a single BSSGP_ConnHldr

When stopping and starting BSSGP_ConnHdlr multiple times, there
are Port connecting problems. Using a single iteration of
BSSGP_ConnHldr.start() works around this problem.

Change-Id: I8e5ae832f3908a172b9beb6d936074b806e0c799
---
M sgsn/SGSN_Tests.ttcn
1 file changed, 13 insertions(+), 6 deletions(-)

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



diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn
index 8094866..3f479da 100644
--- a/sgsn/SGSN_Tests.ttcn
+++ b/sgsn/SGSN_Tests.ttcn
@@ -1766,7 +1766,7 @@
/* unregister the old IMSI */
f_bssgp_client_unregister(g_pars.imsi);
/* Simulate a foreign IMSI */
-   g_pars.imsi := '001010123456789'H;
+   g_pars.imsi := '001010123456700'H;
f_bssgp_client_register(g_pars.imsi, g_pars.tlli, 
g_pars.bssgp_cell_id[0]);

/* there is no auth */
@@ -1786,6 +1786,15 @@
}
}
 }
+
+private function f_TC_attach_closed_add_vty(charstring id) runs on 
BSSGP_ConnHdlr {
+
+   f_TC_attach_closed_foreign(id);
+   f_TC_attach_closed_imsi_added(id);
+
+}
+
+
 testcase TC_attach_closed_add_vty() runs on test_CT {
/* VTY-> SGSN: policy close
 * MS -> SGSN: Attach Request
@@ -1805,12 +1814,10 @@
f_sleep(1.0);
f_vty_config(SGSNVTY, "sgsn", "auth-policy closed");
f_vty_config(SGSNVTY, "sgsn", "imsi-acl del 001010123456789");
+   f_vty_config(SGSNVTY, "sgsn", "imsi-acl del 001010123456700");
+   f_vty_config(SGSNVTY, "sgsn", "imsi-acl add 001010123456700");
/* test with foreign IMSI: Must Reject */
-   vc_conn := f_start_handler(refers(f_TC_attach_closed_foreign), 
testcasename(), g_gb, 9);
-   vc_conn.done;
-   f_vty_config(SGSNVTY, "sgsn", "imsi-acl add 001010123456789");
-   /* test with same IMSI: Must Accept */
-   vc_conn := f_start_handler(refers(f_TC_attach_closed_imsi_added), 
testcasename(), g_gb, 10);
+   vc_conn := f_start_handler(refers(f_TC_attach_closed_add_vty), 
testcasename(), g_gb, 9);
vc_conn.done;
 }


--
To view, visit https://gerrit.osmocom.org/10391
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: I8e5ae832f3908a172b9beb6d936074b806e0c799
Gerrit-Change-Number: 10391
Gerrit-PatchSet: 3
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: lynxis lazus 


Change in osmo-ttcn3-hacks[master]: sgsn: rework TC_attach_closed_add_vty to be executed in a single BSSG...

2018-08-09 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/10391 )

Change subject: sgsn: rework TC_attach_closed_add_vty to be executed in a 
single BSSGP_ConnHldr
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/10391
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: I8e5ae832f3908a172b9beb6d936074b806e0c799
Gerrit-Change-Number: 10391
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Thu, 09 Aug 2018 11:11:06 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ttcn3-hacks[master]: sgsn: rework TC_attach_closed_add_vty to be executed in a single BSSG...

2018-08-07 Thread lynxis lazus
lynxis lazus has uploaded this change for review. ( 
https://gerrit.osmocom.org/10391


Change subject: sgsn: rework TC_attach_closed_add_vty to be executed in a 
single BSSGP_ConnHldr
..

sgsn: rework TC_attach_closed_add_vty to be executed in a single BSSGP_ConnHldr

When stopping and starting BSSGP_ConnHdlr multiple times, there
are Port connecting problems. Using a single iteration of
BSSGP_ConnHldr.start() works around this problem.

Change-Id: I8e5ae832f3908a172b9beb6d936074b806e0c799
---
M sgsn/SGSN_Tests.ttcn
1 file changed, 13 insertions(+), 6 deletions(-)



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

diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn
index 43c297e..a6a3c6c 100644
--- a/sgsn/SGSN_Tests.ttcn
+++ b/sgsn/SGSN_Tests.ttcn
@@ -1738,7 +1738,7 @@
/* unregister the old IMSI */
f_bssgp_client_unregister(g_pars.imsi);
/* Simulate a foreign IMSI */
-   g_pars.imsi := '001010123456789'H;
+   g_pars.imsi := '001010123456700'H;
f_bssgp_client_register(g_pars.imsi, g_pars.tlli, 
g_pars.bssgp_cell_id[0]);

/* there is no auth */
@@ -1758,6 +1758,15 @@
}
}
 }
+
+private function f_TC_attach_closed_add_vty(charstring id) runs on 
BSSGP_ConnHdlr {
+
+   f_TC_attach_closed_foreign(id);
+   f_TC_attach_closed_imsi_added(id);
+
+}
+
+
 testcase TC_attach_closed_add_vty() runs on test_CT {
/* VTY-> SGSN: policy close
 * MS -> SGSN: Attach Request
@@ -1777,12 +1786,10 @@
f_sleep(1.0);
f_vty_config(SGSNVTY, "sgsn", "auth-policy closed");
f_vty_config(SGSNVTY, "sgsn", "imsi-acl del 001010123456789");
+   f_vty_config(SGSNVTY, "sgsn", "imsi-acl del 001010123456700");
+   f_vty_config(SGSNVTY, "sgsn", "imsi-acl add 001010123456700");
/* test with foreign IMSI: Must Reject */
-   vc_conn := f_start_handler(refers(f_TC_attach_closed_foreign), 
testcasename(), g_gb, 9);
-   vc_conn.done;
-   f_vty_config(SGSNVTY, "sgsn", "imsi-acl add 001010123456789");
-   /* test with same IMSI: Must Accept */
-   vc_conn := f_start_handler(refers(f_TC_attach_closed_imsi_added), 
testcasename(), g_gb, 10);
+   vc_conn := f_start_handler(refers(f_TC_attach_closed_add_vty), 
testcasename(), g_gb, 9);
vc_conn.done;
 }


--
To view, visit https://gerrit.osmocom.org/10391
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: I8e5ae832f3908a172b9beb6d936074b806e0c799
Gerrit-Change-Number: 10391
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus