aboutsummaryrefslogtreecommitdiffstats
path: root/pcu
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2020-09-11 20:08:41 +0200
committerlaforge <laforge@osmocom.org>2020-09-14 12:01:42 +0000
commit2beaa20295ebf74eb4aaa150cf724b227686b77a (patch)
treea3efc33e54cf82e3ea98ebad9cfff0a42a4e4e07 /pcu
parentb3d4c670adf8302d1053ff536573a69deacdbf21 (diff)
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
Diffstat (limited to 'pcu')
-rw-r--r--pcu/PCU_Tests_NS.ttcn16
-rw-r--r--pcu/PCU_Tests_SNS.ttcn28
-rw-r--r--pcu/RAW_NS.ttcn8
3 files changed, 26 insertions, 26 deletions
diff --git a/pcu/PCU_Tests_NS.ttcn b/pcu/PCU_Tests_NS.ttcn
index f953be44..586b1b1e 100644
--- a/pcu/PCU_Tests_NS.ttcn
+++ b/pcu/PCU_Tests_NS.ttcn
@@ -76,7 +76,7 @@ runs on RAW_Test_CT {
/* 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 @@ testcase TC_ns_reset() runs on RAW_Test_CT {
/* 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 @@ testcase TC_ns_reset_retrans() runs on RAW_Test_CT {
/* 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 @@ testcase TC_ns_alive() runs on RAW_Test_CT {
/* 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 @@ testcase TC_ns_alive_timeout_reset() runs on RAW_Test_CT {
/* 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 @@ testcase TC_ns_unblock() runs on RAW_Test_CT {
/* 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 @@ testcase TC_ns_unblock_retrans() runs on RAW_Test_CT {
/* 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 @@ testcase TC_ns_full_bringup() runs on RAW_Test_CT {
/* 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 dd133a34..e8196889 100644
--- a/pcu/PCU_Tests_SNS.ttcn
+++ b/pcu/PCU_Tests_SNS.ttcn
@@ -132,7 +132,7 @@ runs on RAW_NS_CT {
/* 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 @@ testcase TC_sns_po_size_success() runs on RAW_Test_CT {
/* 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 @@ testcase TC_sns_po_size_nack() runs on RAW_Test_CT {
/* 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 @@ testcase TC_sns_po_config_success() runs on RAW_Test_CT {
/* 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 @@ testcase TC_sns_po_config_nack() runs on RAW_Test_CT {
/* 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 @@ testcase TC_sns_so_config_success() runs on RAW_Test_CT {
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 @@ testcase TC_sns_1c1u() runs on RAW_Test_CT {
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 @@ testcase TC_sns_1c1u_so_bvc_reset() runs on RAW_Test_CT {
/* 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 @@ testcase TC_sns_add() runs on RAW_Test_CT {
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 43003767..9c31820c 100644
--- a/pcu/RAW_NS.ttcn
+++ b/pcu/RAW_NS.ttcn
@@ -38,7 +38,7 @@ public altstep as_Tguard() runs on RAW_NS_CT {
}
}
-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 @@ function f_init_ns_codec(integer idx := 0, float guard_secs := 60.0, integer tc_
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);