Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/10004 )

Change subject: MSC_ConnectionHandler: more verbosity for 
f_check_mgcp_expectations()
......................................................................

MSC_ConnectionHandler: more verbosity for f_check_mgcp_expectations()

The function f_check_mgcp_expectations() checks the counters that
count the occurrence of MDCX and CRCX messages against computed
expected values. At the moment it is not easy to spot where exactly
the deviation occurred. Lets add some log output so that we can see
which type of message on which connection was missing or too much.
Also add a string parameter that is set to the calling functions
name so that we know from where the check has been triggered.

- Add more verbose log output for counters
- Add parameter to prepend to the log line

Change-Id: Ida0eba4ef3c1db977d392267ef76ec37b87133b3
Related: OS#3292
---
M bsc/MSC_ConnectionHandler.ttcn
1 file changed, 4 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Harald Welte: Looks good to me, approved



diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn
index 94cd9ef..63d017f 100644
--- a/bsc/MSC_ConnectionHandler.ttcn
+++ b/bsc/MSC_ConnectionHandler.ttcn
@@ -796,6 +796,10 @@
  * expected */
 function f_check_mgcp_expectations() runs on MSC_ConnHdlr {
        for (var integer i:= 0; i < sizeof(g_media.mgcp_conn); i := i+1) {
+               log(testcasename(), ": Check MGCP test expectations for 
g_media.mgcp_conn[", i , "]:",
+                   " crcx_seen=", g_media.mgcp_conn[i].crcx_seen, ", 
crcx_seen_exp=", g_media.mgcp_conn[i].crcx_seen_exp,
+                   ", mdcx_seen=", g_media.mgcp_conn[i].mdcx_seen, ", 
mdcx_seen_exp=", g_media.mgcp_conn[i].mdcx_seen_exp);
+
                if(g_media.mgcp_conn[i].crcx_seen != 
g_media.mgcp_conn[i].crcx_seen_exp) {
                        setverdict(fail, "unexpected number of MGW-CRCX 
transactions");
                }

--
To view, visit https://gerrit.osmocom.org/10004
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ida0eba4ef3c1db977d392267ef76ec37b87133b3
Gerrit-Change-Number: 10004
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <[email protected]>
Gerrit-Reviewer: Harald Welte <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <[email protected]>

Reply via email to