pespin submitted this change.

View Change

Approvals: osmith: Looks good to me, approved Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve
sccp: Let some time for SCCP RLC to reach IUT before finishing test

Otherwise tear down of the test component immediatelly afterwards
creates a race condition where sometimes the RLC message is not sent
before closing the socket.
As a result, the SCCP-SCOC stays in DISCONN_PEND until T(rel) fires a
while afterwards, generating a new RLSD in a follow-up test, disrupting
expectancies of that unrelated test.

Since sccp_demo_user doesn't implement a Layer Manager, the recv() 0
from the socket doesn't automatically tear down the SCCP conn, since it
could have several ASPs:
"""
0: asp-asp-srv-client: ss7_asp_xua_srv_conn_rx_cb(): sctp_recvmsg() returned 0 (flags=0x80)
...
asp-srv-client: connection closed
XUA_ASP(asp-srv-client){ASP_ACTIVE}: Received Event SCTP-COMM_DOWN.ind
XUA_ASP(asp-srv-client){ASP_ACTIVE}: state_chg to ASP_DOWN
XUA_AS(as-srv-client){AS_ACTIVE}: Received Event ASPAS-ASP_DOWN.ind
XUA_AS(as-srv-client){AS_ACTIVE}: state_chg to AS_PENDING
Delivering N-PCSTATE.indication to SCCP User 'SCCP Management'
Ignoring SCCP user primitive N-PCSTATE.indication
[Here same 2 lines for SCCP User 'refuser', 'echo', 'callback', 'test_client_vty']
XUA_ASP(asp-srv-client){ASP_DOWN}: No Layer Manager, dropping M-ASP_DOWN.indication
XUA_ASP(asp-srv-client){ASP_DOWN}: No Layer Manager, dropping M-SCTP_RELEASE.indication
"""

Change-Id: Id7d5970bb0fe0e42fedcb56fe4a738a92ddd5bbf
---
M sccp/SCCP_Tests_RAW.ttcn
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/sccp/SCCP_Tests_RAW.ttcn b/sccp/SCCP_Tests_RAW.ttcn
index f1f602c..5d5b0ab 100644
--- a/sccp/SCCP_Tests_RAW.ttcn
+++ b/sccp/SCCP_Tests_RAW.ttcn
@@ -252,6 +252,8 @@
log("Waiting for RLSD");
f_exp_sccp(tr_SCCP_RLSD(remote_lref, g_own_lref, hex2int('0D'H))); /* Cause: Expiration of Rx Inactivity Timer */
f_send_sccp(ts_SCCP_RLC(g_own_lref, remote_lref));
+ /* Let some time for peer to receive the RLC */
+ f_sleep(1.0);
setverdict(pass);
}

@@ -325,6 +327,8 @@
self.stop;
}
}
+ /* Let some time for peer to receive the RLC */
+ f_sleep(1.0);
}

private function f_tx_xudt_exp(SCCP_PAR_Address calling, SCCP_PAR_Address called, octetstring data) runs on SCCP_Test_RAW_CT {
@@ -521,7 +525,8 @@
var template (present) integer cause := ?;
f_exp_sccp(tr_SCCP_RLSD(remote_lref, g_own_lref, cause));
f_send_sccp(ts_SCCP_RLC(g_own_lref, remote_lref));
-
+ /* Let some time for peer to receive the RLC */
+ f_sleep(1.0);
setverdict(pass);
}


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

Gerrit-MessageType: merged
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Id7d5970bb0fe0e42fedcb56fe4a738a92ddd5bbf
Gerrit-Change-Number: 39126
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge@osmocom.org>
Gerrit-Reviewer: osmith <osmith@sysmocom.de>
Gerrit-Reviewer: pespin <pespin@sysmocom.de>