summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2019-03-01 19:34:55 +0100
committerHarald Welte <laforge@gnumonks.org>2019-03-02 00:04:52 +0100
commitea3c7e945e21c2a6391f816543307786196c4b13 (patch)
tree2fade82be9796d8df29da7b53448fc80de1fb5c4
parent913bbf6908a24c44251b0547ff3148799cb743fb (diff)
PCU: Split RAW_PCU_CT from RAW_NS_CT
Let's split the PCUIF-side component from the NS-side component and create a new RAW_Test_CT which derives from both. Change-Id: I15021c5dea16e39a530d8d9080e37a7f2a6c4fa7
-rw-r--r--pcu/PCU_Tests_RAW.ttcn23
-rw-r--r--pcu/PCU_Tests_RAW_SNS.ttcn20
2 files changed, 24 insertions, 19 deletions
diff --git a/pcu/PCU_Tests_RAW.ttcn b/pcu/PCU_Tests_RAW.ttcn
index 397e895..923b086 100644
--- a/pcu/PCU_Tests_RAW.ttcn
+++ b/pcu/PCU_Tests_RAW.ttcn
@@ -34,12 +34,17 @@ type component RAW_NS_CT {
var ConnectionId g_ns_conn_id[4] := {-1, -1, -1, -1};
var NSConfiguration g_nsconfig[4];
timer g_T_guard;
+}
+type component RAW_PCU_CT {
/* PCUIF (we emulate the BTS part) */
port PCUIF_CODEC_PT PCU;
var ConnectionId g_pcu_conn_id := -1;
}
+type component RAW_Test_CT extends RAW_NS_CT, RAW_PCU_CT {
+}
+
private altstep as_Tguard() runs on RAW_NS_CT {
[] g_T_guard.timeout {
setverdict(fail, "Timeout of T_guard");
@@ -47,7 +52,7 @@ private altstep as_Tguard() runs on RAW_NS_CT {
}
}
-function f_init_pcuif() runs on RAW_NS_CT {
+function f_init_pcuif() runs on RAW_PCU_CT {
map(self:PCU, system:PCU);
/* Connect the Unix Domain Socket */
@@ -202,7 +207,7 @@ private altstep as_rx_ns_unblock_ack(boolean oneshot := false, integer idx := 0)
}
/* test the NS-RESET procedure */
-testcase TC_ns_reset() runs on RAW_NS_CT {
+testcase TC_ns_reset() runs on RAW_Test_CT {
f_init_ns_codec();
f_init_pcuif();
@@ -213,7 +218,7 @@ testcase TC_ns_reset() runs on RAW_NS_CT {
}
/* ensure NS-RESET are re-transmitted */
-testcase TC_ns_reset_retrans() runs on RAW_NS_CT {
+testcase TC_ns_reset_retrans() runs on RAW_Test_CT {
f_init_ns_codec();
f_init_pcuif();
@@ -229,7 +234,7 @@ testcase TC_ns_reset_retrans() runs on RAW_NS_CT {
}
/* test the inbound NS-ALIVE procedure after NS-RESET */
-testcase TC_ns_alive() runs on RAW_NS_CT {
+testcase TC_ns_alive() runs on RAW_Test_CT {
f_init_ns_codec();
f_init_pcuif();
@@ -242,7 +247,7 @@ testcase TC_ns_alive() runs on RAW_NS_CT {
}
/* Test for NS-RESET after NS-ALIVE timeout */
-testcase TC_ns_alive_timeout_reset() runs on RAW_NS_CT {
+testcase TC_ns_alive_timeout_reset() runs on RAW_Test_CT {
f_init_ns_codec(guard_secs := 100.0);
f_init_pcuif();
@@ -260,7 +265,7 @@ testcase TC_ns_alive_timeout_reset() runs on RAW_NS_CT {
}
/* test for NS-RESET/NS-ALIVE/NS-UNBLOCK */
-testcase TC_ns_unblock() runs on RAW_NS_CT {
+testcase TC_ns_unblock() runs on RAW_Test_CT {
f_init_ns_codec();
f_init_pcuif();
@@ -276,7 +281,7 @@ testcase TC_ns_unblock() runs on RAW_NS_CT {
}
/* test for NS-UNBLOCK re-transmissions */
-testcase TC_ns_unblock_retrans() runs on RAW_NS_CT {
+testcase TC_ns_unblock_retrans() runs on RAW_Test_CT {
f_init_ns_codec();
f_init_pcuif();
@@ -296,7 +301,7 @@ testcase TC_ns_unblock_retrans() runs on RAW_NS_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_NS_CT {
+testcase TC_ns_full_bringup() runs on RAW_Test_CT {
f_init_ns_codec();
f_init_pcuif();
@@ -323,7 +328,7 @@ testcase TC_ns_full_bringup() runs on RAW_NS_CT {
}
/* test outbound (SGSN-originated) NS-BLOCK procedure */
-testcase TC_ns_so_block() runs on RAW_NS_CT {
+testcase TC_ns_so_block() runs on RAW_Test_CT {
f_init_ns_codec();
f_init_pcuif();
diff --git a/pcu/PCU_Tests_RAW_SNS.ttcn b/pcu/PCU_Tests_RAW_SNS.ttcn
index 2369b04..5a370d9 100644
--- a/pcu/PCU_Tests_RAW_SNS.ttcn
+++ b/pcu/PCU_Tests_RAW_SNS.ttcn
@@ -105,7 +105,7 @@ runs on RAW_NS_CT {
/* PCU-originated SNS-SIZE: successful case */
-testcase TC_sns_po_size_success() runs on RAW_NS_CT {
+testcase TC_sns_po_size_success() runs on RAW_Test_CT {
f_init_ns_codec();
f_init_pcuif();
f_incoming_sns_size();
@@ -114,7 +114,7 @@ testcase TC_sns_po_size_success() runs on RAW_NS_CT {
}
/* PCU-originated SNS-SIZE: NACK from our side */
-testcase TC_sns_po_size_nack() runs on RAW_NS_CT {
+testcase TC_sns_po_size_nack() runs on RAW_Test_CT {
f_init_ns_codec();
f_init_pcuif();
f_incoming_sns_size(NS_CAUSE_PROTOCOL_ERROR_UNSPEIFIED);
@@ -125,7 +125,7 @@ testcase TC_sns_po_size_nack() runs on RAW_NS_CT {
}
/* PCU-originated SNS-CONFIG: successful case */
-testcase TC_sns_po_config_success() runs on RAW_NS_CT {
+testcase TC_sns_po_config_success() runs on RAW_Test_CT {
f_init_ns_codec();
f_init_pcuif();
f_incoming_sns_size();
@@ -135,7 +135,7 @@ testcase TC_sns_po_config_success() runs on RAW_NS_CT {
}
/* PCU-originated SNS-CONFIG: successful case */
-testcase TC_sns_po_config_nack() runs on RAW_NS_CT {
+testcase TC_sns_po_config_nack() runs on RAW_Test_CT {
f_init_ns_codec();
f_init_pcuif();
f_incoming_sns_size();
@@ -147,7 +147,7 @@ testcase TC_sns_po_config_nack() runs on RAW_NS_CT {
/* SGSN-originated SNS-SIZE: successful case */
-testcase TC_sns_so_config_success() runs on RAW_NS_CT {
+testcase TC_sns_so_config_success() runs on RAW_Test_CT {
f_init_ns_codec();
f_init_pcuif();
f_incoming_sns_size();
@@ -171,7 +171,7 @@ testcase TC_sns_so_config_success() runs on RAW_NS_CT {
setverdict(pass);
}
-private function f_sns_bringup_1c1u() runs on RAW_NS_CT {
+private function f_sns_bringup_1c1u() runs on RAW_Test_CT {
/* Activate two NS codec ports */
f_init_ns_codec();
f_init_ns_codec(1);
@@ -206,13 +206,13 @@ private function f_sns_bringup_1c1u() runs on RAW_NS_CT {
}
/* Test full IP-SNS bring-up with two NS-VCs, one sig-only and one user-only */
-testcase TC_sns_1c1u() runs on RAW_NS_CT {
+testcase TC_sns_1c1u() runs on RAW_Test_CT {
f_sns_bringup_1c1u();
setverdict(pass);
}
/* Test adding new IP endpoints at runtime */
-testcase TC_sns_add() runs on RAW_NS_CT {
+testcase TC_sns_add() runs on RAW_Test_CT {
f_sns_bringup_1c1u();
/* crate another NS codec port on the tester side */
@@ -230,7 +230,7 @@ testcase TC_sns_add() runs on RAW_NS_CT {
}
/* Test deleting IP endpoints at runtime */
-testcase TC_sns_del() runs on RAW_NS_CT {
+testcase TC_sns_del() runs on RAW_Test_CT {
f_sns_bringup_1c1u();
f_outgoing_sns_del(idx_del := 1, w_sig := 0, w_user := 1, idx := 0);
@@ -239,7 +239,7 @@ testcase TC_sns_del() runs on RAW_NS_CT {
}
/* Test changing weights at runtime */
-testcase TC_sns_chg_weight() runs on RAW_NS_CT {
+testcase TC_sns_chg_weight() runs on RAW_Test_CT {
f_sns_bringup_1c1u();
/* change w_user from 1 to 200 */