pespin has uploaded this change for review.

View Change

stp: set up all M3UA ports in array in steps

This way we have all ports in more or less the same state when handling
messages.
It should also speed up tests and mitigate sporadic failures under some
scenarios where we already accept the SCTP conn instead of rejecting it
and waiting for reconnect from client.

Change-Id: I585d9c768301bfd9ba849876923787137fc35981
---
M stp/STP_Tests_M3UA.ttcn
1 file changed, 9 insertions(+), 2 deletions(-)

git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/99/39299/1
diff --git a/stp/STP_Tests_M3UA.ttcn b/stp/STP_Tests_M3UA.ttcn
index 52cbf7d..0ae854b 100644
--- a/stp/STP_Tests_M3UA.ttcn
+++ b/stp/STP_Tests_M3UA.ttcn
@@ -337,13 +337,16 @@

f_init_common();

+ for (i := 0; i < NR_M3UA; i:=i+1) {
+ map(self:M3UA[i], system:M3UA_CODEC_PT);
+ }
+
activate(as_m3ua_sctp());
if (ignore_ssnm) {
activate(as_m3ua_ssnm_ignore());
}

for (i := 0; i < NR_M3UA; i:=i+1) {
- map(self:M3UA[i], system:M3UA_CODEC_PT);
if (mp_m3ua_configs[i].use_tcp) {
f_M3UA_connect_tcp(i);
} else {
@@ -371,8 +374,12 @@

for (i := NR_M3UA; i < NR_M3UA+NR_M3UA_SRV; i:=i+1) {
map(self:M3UA[i], system:M3UA_CODEC_PT);
- /* bind+ listen */
+ }
+ for (i := NR_M3UA; i < NR_M3UA+NR_M3UA_SRV; i:=i+1) {
+ /* bind + listen */
f_M3UA_listen(i);
+ }
+ for (i := NR_M3UA; i < NR_M3UA+NR_M3UA_SRV; i:=i+1) {
/* wait for accept() */
M3UA[i].receive(tr_ConnOpened) -> value port_evt {
g_m3ua_conn_id[i] := port_evt.connOpened.connId;

To view, visit change 39299. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newchange
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I585d9c768301bfd9ba849876923787137fc35981
Gerrit-Change-Number: 39299
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin@sysmocom.de>