Change in osmo-ttcn3-hacks[master]: RAW_NS: remove usage of mp_nsconfig

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

lynxis lazus gerrit-no-reply at lists.osmocom.org
Fri Sep 11 18:42:27 UTC 2020


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


Change subject: RAW_NS: remove usage of mp_nsconfig
......................................................................

RAW_NS: remove usage of mp_nsconfig

RAW_NS uses module parameter from SGSN_Components. To decouple
RAW_NS from SGSN_Component pass the NSConfiguration via f_init_ns_codec()

Change-Id: Ida8b8a6af815dc11b2ff4c65e19cc5ec25f18ae2
---
M pcu/PCU_Tests_NS.ttcn
M pcu/PCU_Tests_SNS.ttcn
M pcu/RAW_NS.ttcn
3 files changed, 26 insertions(+), 26 deletions(-)



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

diff --git a/pcu/PCU_Tests_NS.ttcn b/pcu/PCU_Tests_NS.ttcn
index f953be4..586b1b1 100644
--- a/pcu/PCU_Tests_NS.ttcn
+++ b/pcu/PCU_Tests_NS.ttcn
@@ -76,7 +76,7 @@
 
 /* test the NS-RESET procedure */
 testcase TC_ns_reset() runs on RAW_Test_CT {
-	f_init_ns_codec();
+	f_init_ns_codec(mp_nsconfig);
 	f_init_pcuif();
 
 
@@ -87,7 +87,7 @@
 
 /* ensure NS-RESET are re-transmitted */
 testcase TC_ns_reset_retrans() runs on RAW_Test_CT {
-	f_init_ns_codec();
+	f_init_ns_codec(mp_nsconfig);
 	f_init_pcuif();
 
 	var integer i;
@@ -103,7 +103,7 @@
 
 /* test the inbound NS-ALIVE procedure after NS-RESET */
 testcase TC_ns_alive() runs on RAW_Test_CT {
-	f_init_ns_codec();
+	f_init_ns_codec(mp_nsconfig);
 	f_init_pcuif();
 
 	/* Expect inbound NS-RESET procedure */
@@ -118,7 +118,7 @@
 
 /* Test for NS-RESET after NS-ALIVE timeout */
 testcase TC_ns_alive_timeout_reset() runs on RAW_Test_CT {
-	f_init_ns_codec(guard_secs := 100.0);
+	f_init_ns_codec(mp_nsconfig, guard_secs := 100.0);
 	f_init_pcuif();
 
 	/* Expect inbound NS-RESET procedure */
@@ -140,7 +140,7 @@
 
 /* test for NS-RESET/NS-ALIVE/NS-UNBLOCK */
 testcase TC_ns_unblock() runs on RAW_Test_CT {
-	f_init_ns_codec();
+	f_init_ns_codec(mp_nsconfig);
 	f_init_pcuif();
 
 	/* Expect inbound NS-RESET procedure */
@@ -155,7 +155,7 @@
 
 /* test for NS-UNBLOCK re-transmissions */
 testcase TC_ns_unblock_retrans() runs on RAW_Test_CT {
-	f_init_ns_codec();
+	f_init_ns_codec(mp_nsconfig);
 	f_init_pcuif();
 
 	/* Expect inbound NS-RESET procedure */
@@ -174,7 +174,7 @@
 
 /* full bring-up of the Gb link for NS and BSSGP layer up to BVC-FC */
 testcase TC_ns_full_bringup() runs on RAW_Test_CT {
-	f_init_ns_codec();
+	f_init_ns_codec(mp_nsconfig);
 	f_init_pcuif();
 
 	/* Expect inbound NS-RESET procedure */
@@ -200,7 +200,7 @@
 
 /* test outbound (SGSN-originated) NS-BLOCK procedure */
 testcase TC_ns_so_block() runs on RAW_Test_CT {
-	f_init_ns_codec();
+	f_init_ns_codec(mp_nsconfig);
 	f_init_pcuif();
 
 	/* Expect inbound NS-RESET procedure */
diff --git a/pcu/PCU_Tests_SNS.ttcn b/pcu/PCU_Tests_SNS.ttcn
index dd133a3..e819688 100644
--- a/pcu/PCU_Tests_SNS.ttcn
+++ b/pcu/PCU_Tests_SNS.ttcn
@@ -132,7 +132,7 @@
 
 /* PCU-originated SNS-SIZE: successful case */
 testcase TC_sns_po_size_success() runs on RAW_Test_CT {
-	f_init_ns_codec();
+	f_init_ns_codec(mp_nsconfig);
 	f_init_pcuif();
 	f_incoming_sns_size();
 	f_sleep(1.0);
@@ -141,7 +141,7 @@
 
 /* PCU-originated SNS-SIZE: NACK from our side */
 testcase TC_sns_po_size_nack() runs on RAW_Test_CT {
-	f_init_ns_codec();
+	f_init_ns_codec(mp_nsconfig);
 	f_init_pcuif();
 	f_incoming_sns_size(NS_CAUSE_PROTOCOL_ERROR_UNSPEIFIED);
 	/* FIXME: ensure we don't get a SNS-CONFIG */
@@ -152,7 +152,7 @@
 
 /* PCU-originated SNS-CONFIG: successful case */
 testcase TC_sns_po_config_success() runs on RAW_Test_CT {
-	f_init_ns_codec();
+	f_init_ns_codec(mp_nsconfig);
 	f_init_pcuif();
 	f_incoming_sns_size();
 	f_incoming_sns_config();
@@ -162,7 +162,7 @@
 
 /* PCU-originated SNS-CONFIG: successful case */
 testcase TC_sns_po_config_nack() runs on RAW_Test_CT {
-	f_init_ns_codec();
+	f_init_ns_codec(mp_nsconfig);
 	f_init_pcuif();
 	f_incoming_sns_size();
 	f_incoming_sns_config(NS_CAUSE_PROTOCOL_ERROR_UNSPEIFIED);
@@ -174,7 +174,7 @@
 
 /* SGSN-originated SNS-SIZE: successful case */
 testcase TC_sns_so_config_success() runs on RAW_Test_CT {
-	f_init_ns_codec();
+	f_init_ns_codec(mp_nsconfig);
 	f_init_pcuif();
 	f_incoming_sns_size();
 	f_incoming_sns_config();
@@ -199,8 +199,8 @@
 
 private function f_sns_bringup_1c1u(boolean sgsn_originated_reset := false) runs on RAW_Test_CT {
 	/* Activate two NS codec ports */
-	f_init_ns_codec();
-	f_init_ns_codec(1);
+	f_init_ns_codec(mp_nsconfig);
+	f_init_ns_codec(mp_nsconfig, 1);
 	f_init_pcuif();
 	/* Perform Size + BSS-originated config */
 	f_incoming_sns_size();
@@ -244,9 +244,9 @@
 
 private function f_sns_bringup_1c1u_separate(boolean sgsn_originated_reset := false) runs on RAW_Test_CT {
 	/* Activate two NS codec ports */
-	f_init_ns_codec();
-	f_init_ns_codec(1);
-	f_init_ns_codec(2);
+	f_init_ns_codec(mp_nsconfig);
+	f_init_ns_codec(mp_nsconfig, 1);
+	f_init_ns_codec(mp_nsconfig, 2);
 	f_init_pcuif();
 	/* Perform Size + BSS-originated config */
 	f_incoming_sns_size();
@@ -303,9 +303,9 @@
 /* Transmit BVC-RESET before NS-ALIVE of PCU was ACKed: expect no response */
 testcase TC_sns_1c1u_so_bvc_reset_too_early() runs on RAW_Test_CT {
 	/* Activate two NS codec ports */
-	f_init_ns_codec();
-	f_init_ns_codec(1);
-	f_init_ns_codec(2);
+	f_init_ns_codec(mp_nsconfig);
+	f_init_ns_codec(mp_nsconfig, 1);
+	f_init_ns_codec(mp_nsconfig, 2);
 	f_init_pcuif();
 	/* Perform Size + BSS-originated config */
 	f_incoming_sns_size();
@@ -331,7 +331,7 @@
 	f_sns_bringup_1c1u();
 
 	/* crate another NS codec port on the tester side */
-	f_init_ns_codec(2);
+	f_init_ns_codec(mp_nsconfig, 2);
 
 	f_outgoing_sns_add(idx_add := 2, w_sig := 0, w_user := 1, idx := 0);
 
diff --git a/pcu/RAW_NS.ttcn b/pcu/RAW_NS.ttcn
index 4300376..9c31820 100644
--- a/pcu/RAW_NS.ttcn
+++ b/pcu/RAW_NS.ttcn
@@ -38,7 +38,7 @@
 		}
 }
 
-function f_init_ns_codec(integer idx := 0, float guard_secs := 60.0, integer tc_offset := 0) runs on RAW_NS_CT {
+function f_init_ns_codec(NSConfiguration ns_config, integer idx := 0, float guard_secs := 60.0, integer tc_offset := 0) runs on RAW_NS_CT {
 	var Result res;
 
 	if (not g_T_guard.running) {
@@ -48,10 +48,10 @@
 
 	if (not isbound(g_nsconfig) or not isbound(g_nsconfig[idx])) {
 		/* copy most parts from mp_nsconfig */
-		g_nsconfig[idx] := mp_nsconfig;
+		g_nsconfig[idx] := ns_config;
 		/* adjust those parts different for each NS-VC */
-		g_nsconfig[idx].nsvci := mp_nsconfig.nsvci + idx;
-		g_nsconfig[idx].local_udp_port := mp_nsconfig.local_udp_port + idx + tc_offset;
+		g_nsconfig[idx].nsvci := ns_config.nsvci + idx;
+		g_nsconfig[idx].local_udp_port := ns_config.local_udp_port + idx + tc_offset;
 	}
 
 	map(self:NSCP[idx], system:NSCP);

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/20089
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: Ida8b8a6af815dc11b2ff4c65e19cc5ec25f18ae2
Gerrit-Change-Number: 20089
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus <lynxis at fe80.eu>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200911/17c3b4af/attachment.htm>


More information about the gerrit-log mailing list