pespin has uploaded this change for review. ( 
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(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/67/39767/1

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;

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/39767?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: newchange
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I90c5236882e96fc038fee0d2f4551cfc58767c78
Gerrit-Change-Number: 39767
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <[email protected]>

Reply via email to