pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/39767?usp=email )
Change subject: sccp: Improve logging receiving unexpected msg ......................................................................
sccp: Improve logging receiving unexpected msg
Change-Id: I90c5236882e96fc038fee0d2f4551cfc58767c78 --- M sccp/SCCP_Tests_RAW.ttcn 1 file changed, 11 insertions(+), 6 deletions(-)
Approvals: osmith: Looks good to me, but someone else must approve laforge: Looks good to me, but someone else must approve pespin: Looks good to me, approved Jenkins Builder: Verified
diff --git a/sccp/SCCP_Tests_RAW.ttcn b/sccp/SCCP_Tests_RAW.ttcn index 5d5b0ab..f7c5357 100644 --- a/sccp/SCCP_Tests_RAW.ttcn +++ b/sccp/SCCP_Tests_RAW.ttcn @@ -14,6 +14,7 @@
import from General_Types all; import from Osmocom_Types all; +import from Misc_Helpers all;
import from M3UA_Emulation all;
@@ -136,9 +137,9 @@ return exp; }
-private function f_exp_sccp(template PDU_SCCP sccp) +private function f_exp_sccp(template (present) PDU_SCCP sccp := ?) runs on SCCP_Test_RAW_CT return SCCP_MTP3_TRANSFERind { - var template SCCP_MTP3_TRANSFERind exp := tr_SCCP_MTP3_TRANSFERind(sccp); + var template (present) SCCP_MTP3_TRANSFERind exp := tr_SCCP_MTP3_TRANSFERind(sccp); var SCCP_MTP3_TRANSFERind rx; timer T := 10.0; T.start; @@ -146,13 +147,17 @@ [] MTP3.receive(exp) -> value rx { return rx; } + [] MTP3.receive(tr_SCCP_MTP3_TRANSFERind(*)) -> value rx { + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, + log2str("Unexpected MTP/SCCP received: got ", rx, " vs exp ", exp)); + } [] MTP3.receive { - setverdict(fail, "Unexpected MTP/SCCP received"); - self.stop + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, + log2str("Unexpected MTP/SCCP received: got (ASP_MTP3_PAUSE|ASP_MTP3_RESUME|ASP_MTP3_STATUS) vs exp ", exp)); } [] T.timeout { - setverdict(fail, "Timeout waiting for ", exp); - self.stop + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, + log2str("Timeout waiting for ", exp)); } } return rx;