<p>neels <strong>submitted</strong> this change.</p><p><a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/19585">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  neels: Looks good to me, approved
  Jenkins Builder: Verified

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">bsc: fix f_vty_msc_allow_attach(): do not create new empty mscs (fix latest)<br><br>In the ttcn3-bsc-latest tests, there are no 'msc 1' and 'msc 2' configured, so<br>stepping into 'msc 1' and '2' creates two new, empty MSC configurations.<br>osmo-bsc latest actually still tries to use them and fails 2/3 Compl L3.<br><br>So do not step into 'msc' config scopes if no such MSC is mentioned in the<br>running config yet.<br><br>This should finally fix the bsc latest tests after I broke them in<br>I02ad58ed7d0d0aac61e393b415e09c6c5c8a70ca and<br>Ibd5adb359b3fb302e2c70700d911878aef605ff3 and<br>I75295d638072df9f5213a7e74e4a960c009c2865.<br>Yes, I know :/<br><br>Change-Id: Ibfeeea98c2a962dec58ad03beb35bb7f83cad228<br>---<br>M bsc/BSC_Tests.ttcn<br>1 file changed, 8 insertions(+), 0 deletions(-)<br><br></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 15d83da..1c02cb6 100644</span><br><span>--- a/bsc/BSC_Tests.ttcn</span><br><span>+++ b/bsc/BSC_Tests.ttcn</span><br><span>@@ -837,7 +837,15 @@</span><br><span> </span><br><span> private function f_vty_msc_allow_attach(TELNETasp_PT pt, my_BooleanList allow_attach_list)</span><br><span> {</span><br><span style="color: hsl(120, 100%, 40%);">+ var charstring config := f_vty_transceive_ret(pt, "show running-config");</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>        for (var integer msc_nr := 0; msc_nr < sizeof(allow_attach_list); msc_nr := msc_nr+1) {</span><br><span style="color: hsl(120, 100%, 40%);">+            if (f_strstr(config, "\nmsc " & int2str(msc_nr) & "\n") < 0) {</span><br><span style="color: hsl(120, 100%, 40%);">+                 /* There is no 'msc N' for this msc_nr in the running config, so don't create an empty msc by</span><br><span style="color: hsl(120, 100%, 40%);">+                      * stepping into that config node. */</span><br><span style="color: hsl(120, 100%, 40%);">+                 log("msc ", msc_nr, " is not configured, skipping");</span><br><span style="color: hsl(120, 100%, 40%);">+                      continue;</span><br><span style="color: hsl(120, 100%, 40%);">+             }</span><br><span>            f_vty_enter_cfg_msc(pt, msc_nr);</span><br><span>             if (allow_attach_list[msc_nr]) {</span><br><span>                     /* strict := false: ignore if osmo-bsc does not support this config option (latest build) */</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/19585">change 19585</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/c/osmo-ttcn3-hacks/+/19585"/><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-Change-Id: Ibfeeea98c2a962dec58ad03beb35bb7f83cad228 </div>
<div style="display:none"> Gerrit-Change-Number: 19585 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: neels <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: neels <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>