fixeria has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36150?usp=email )
Change subject: stp: add testcases for M3UA-over-TCP
......................................................................
stp: add testcases for M3UA-over-TCP
Change-Id: I1e2a887aa22f317783b3207494fd707d7b426439
Related: docker-playground.git I210b7d62845075dcfe147f2f77603625cc1e64f9
Related: SYS#5424
---
M stp/STP_Tests_M3UA.ttcn
1 file changed, 74 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/50/36150/1
diff --git a/stp/STP_Tests_M3UA.ttcn b/stp/STP_Tests_M3UA.ttcn
index 3100ab6..4c2d526 100644
--- a/stp/STP_Tests_M3UA.ttcn
+++ b/stp/STP_Tests_M3UA.ttcn
@@ -1203,6 +1203,64 @@
f_clear_m3ua();
}
+private function f_TC_m3ua_tcp(integer idx_a, integer idx_b) runs on RAW_M3UA_CT {
+ var M3uaConfig cfg_a := mp_m3ua_configs[idx_a];
+ var M3uaConfig cfg_b := mp_m3ua_configs[idx_b];
+ var OCT4 rctx_a := int2oct(cfg_a.routing_ctx, 4);
+ var OCT4 rctx_b := int2oct(cfg_b.routing_ctx, 4);
+ var OCT4 pc_a := int2oct(cfg_a.point_code, 4);
+ var OCT4 pc_b := int2oct(cfg_b.point_code, 4);
+
+ /* establish connection with ASP 'A' */
+ if (idx_a < NR_M3UA) {
+ f_M3UA_asp_up_act(idx_a, rctx := rctx_a);
+ } else {
+ f_M3UA_CLNT_asp_up_act(idx_a, rctx := rctx_a);
+ }
+
+ /* establish connection with ASP 'B' */
+ if (idx_b < NR_M3UA) {
+ f_M3UA_asp_up_act(idx_b, rctx := rctx_b);
+ } else {
+ f_M3UA_CLNT_asp_up_act(idx_b, rctx := rctx_b);
+ }
+
+ /* M3UA/A -> M3UA/B */
+ f_test_traffic(idx_a, rctx_a, pc_a,
+ idx_b, rctx_b, pc_b);
+ /* M3UA/B -> M3UA/A */
+ f_test_traffic(idx_b, rctx_b, pc_b,
+ idx_a, rctx_a, pc_a);
+
+ f_clear_m3ua();
+}
+
+/* test routing between M3UA/SCTP (client) and M3UA/TCP (client) */
+testcase TC_m3ua_tcp_cli() runs on RAW_M3UA_CT {
+ f_init_m3ua();
+ f_TC_m3ua_tcp(0, 3); /* 'asp-sender' <-> 'asp-sender-tcp' */
+}
+
+/* test routing between M3UA/SCTP (client) and M3UA/TCP (server) */
+testcase TC_m3ua_tcp_cli_srv() runs on RAW_M3UA_CT {
+ f_init_m3ua();
+ f_init_m3ua_srv();
+ f_TC_m3ua_tcp(0, M3UA_SRV(3)); /* 'asp-sender' <->
'asp-client-tcp' */
+}
+
+/* test routing between M3UA/SCTP (server) and M3UA/TCP (server) */
+testcase TC_m3ua_tcp_srv() runs on RAW_M3UA_CT {
+ f_init_m3ua_srv();
+ f_TC_m3ua_tcp(M3UA_SRV(0), M3UA_SRV(3)); /* 'asp-client' <->
'asp-client-tcp' */
+}
+
+/* test routing between M3UA/SCTP (server) and M3UA/TCP (client) */
+testcase TC_m3ua_tcp_srv_cli() runs on RAW_M3UA_CT {
+ f_init_m3ua();
+ f_init_m3ua_srv();
+ f_TC_m3ua_tcp(M3UA_SRV(0), 3); /* 'asp-client' <->
'asp-sender-tcp' */
+}
+
control {
/* M3UA Tests */
@@ -1218,6 +1276,11 @@
execute( TC_tmt_broadcast() );
execute( TC_act_rctx_data_no_rctx() );
+ execute( TC_m3ua_tcp_cli() );
+ execute( TC_m3ua_tcp_cli_srv() );
+ execute( TC_m3ua_tcp_srv() );
+ execute( TC_m3ua_tcp_srv_cli() );
+
/* M3UA RKM tests */
execute( TC_rkm_reg_static_notpermitted() );
execute( TC_rkm_reg_static_permitted() );
--
To view, visit
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36150?usp=email
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: I1e2a887aa22f317783b3207494fd707d7b426439
Gerrit-Change-Number: 36150
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: newchange