<p>dexter has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/10004">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">MSC_ConnectionHandler: more verbosity for f_check_mgcp_expectations()<br><br>The function f_check_mgcp_expectations() checks the counters that<br>count the occurrence of MDCX and CRCX messages against computed<br>expected values. At the moment it is not easy to spot where exactly<br>the deviation occurred. Lets add some log output so that we can see<br>which type of message on which connection was missing or too much.<br>Also add a string parameter that is set to the calling functions<br>name so that we know from where the check has been triggered.<br><br>- Add more verbose log output for counters<br>- Add parameter to prepend to the log line<br><br>Change-Id: Ida0eba4ef3c1db977d392267ef76ec37b87133b3<br>Related: OS#3292<br>---<br>M bsc/BSC_Tests.ttcn<br>M bsc/MSC_ConnectionHandler.ttcn<br>2 files changed, 7 insertions(+), 3 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/04/10004/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn</span><br><span>index 2897a0b..ef37a7f 100644</span><br><span>--- a/bsc/BSC_Tests.ttcn</span><br><span>+++ b/bsc/BSC_Tests.ttcn</span><br><span>@@ -2134,7 +2134,7 @@</span><br><span> </span><br><span>  /* Check the amount of MGCP transactions is still consistant with the</span><br><span>         * test expectation */</span><br><span style="color: hsl(0, 100%, 40%);">-  f_check_mgcp_expectations()</span><br><span style="color: hsl(120, 100%, 40%);">+   f_check_mgcp_expectations("f_tc_ho_int")</span><br><span> }</span><br><span> </span><br><span> testcase TC_ho_int() runs on test_CT {</span><br><span>diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn</span><br><span>index ba4d19d..dd13ee2 100644</span><br><span>--- a/bsc/MSC_ConnectionHandler.ttcn</span><br><span>+++ b/bsc/MSC_ConnectionHandler.ttcn</span><br><span>@@ -794,8 +794,12 @@</span><br><span> </span><br><span> /* Helper function to check if the activity on the MGCP matches what we</span><br><span>  * expected */</span><br><span style="color: hsl(0, 100%, 40%);">-function f_check_mgcp_expectations() runs on MSC_ConnHdlr {</span><br><span style="color: hsl(120, 100%, 40%);">+function f_check_mgcp_expectations(charstring caller) runs on MSC_ConnHdlr {</span><br><span>  for (var integer i:= 0; i < sizeof(g_media.mgcp_conn); i := i+1) {</span><br><span style="color: hsl(120, 100%, 40%);">+         log(caller, ": Check MGCP test expectations for g_media.mgcp_conn[", i , "]:",</span><br><span style="color: hsl(120, 100%, 40%);">+                " crcx_seen=", g_media.mgcp_conn[i].crcx_seen, ", crcx_seen_exp=", g_media.mgcp_conn[i].crcx_seen_exp,</span><br><span style="color: hsl(120, 100%, 40%);">+                    ", mdcx_seen=", g_media.mgcp_conn[i].mdcx_seen, ", mdcx_seen_exp=", g_media.mgcp_conn[i].mdcx_seen_exp);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>           if(g_media.mgcp_conn[i].crcx_seen != g_media.mgcp_conn[i].crcx_seen_exp) {</span><br><span>                   setverdict(fail, "unexpected number of MGW-CRCX transactions");</span><br><span>            }</span><br><span>@@ -947,7 +951,7 @@</span><br><span>              self.stop;</span><br><span>   }</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-   f_check_mgcp_expectations();</span><br><span style="color: hsl(120, 100%, 40%);">+  f_check_mgcp_expectations("f_establish_fully");</span><br><span> }</span><br><span> </span><br><span> type record HandoverState {</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/10004">change 10004</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/10004"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-ttcn3-hacks </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: Ida0eba4ef3c1db977d392267ef76ec37b87133b3 </div>
<div style="display:none"> Gerrit-Change-Number: 10004 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: dexter <pmaier@sysmocom.de> </div>