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

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">bsc CBSP: f_page2rsl(): allow expecting specific nr of blocks<br><br>Subsequent patch I3cace19f9e5adc8ebab13ef2328a36dc150b2b31 adds a test with<br>specific payload lengths. To verify the correctness of the number-of-blocks<br>calculation (recently fixed), allow pinpointing the expected blocks count.<br><br>Change-Id: Ie58a6175e55ab2679dc69f9e191d0efc0e84cde0<br>---<br>M bsc/BSC_Tests_CBSP.ttcn<br>1 file changed, 7 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/bsc/BSC_Tests_CBSP.ttcn b/bsc/BSC_Tests_CBSP.ttcn</span><br><span>index ea080a2..657d172 100644</span><br><span>--- a/bsc/BSC_Tests_CBSP.ttcn</span><br><span>+++ b/bsc/BSC_Tests_CBSP.ttcn</span><br><span>@@ -310,7 +310,8 @@</span><br><span> }</span><br><span> </span><br><span> /* build a RSL_Message receive template from a CBSP page */</span><br><span style="color: hsl(0, 100%, 40%);">-private function f_page2rsl(CBSP_IE page, uint16_t msg_id, uint16_t ser_no, boolean ext_cbch := false)</span><br><span style="color: hsl(120, 100%, 40%);">+private function f_page2rsl(CBSP_IE page, uint16_t msg_id, uint16_t ser_no, boolean ext_cbch := false,</span><br><span style="color: hsl(120, 100%, 40%);">+                            template (present) integer expect_blocks := ?)</span><br><span> return template (present) RSL_Message</span><br><span> {</span><br><span>        var template RSL_Message tr;</span><br><span>@@ -325,6 +326,11 @@</span><br><span>          num_blocks := num_blocks + 1;</span><br><span>        }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ if (not istemplatekind(expect_blocks, "omit") and not match(num_blocks, expect_blocks)) {</span><br><span style="color: hsl(120, 100%, 40%);">+           setverdict(fail, "mismatch: CBSP page expect_blocks == ", expect_blocks, ", but generated num_blocks == ", num_blocks);</span><br><span style="color: hsl(120, 100%, 40%);">+           mtc.stop;</span><br><span style="color: hsl(120, 100%, 40%);">+     }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>  var integer lblock := f_cbsp_block_count_enc(num_blocks);</span><br><span> </span><br><span>        tr := tr_RSL_SMSCB_CMD(tr_RslCbCmdType(lblock), f_pad_oct(payload, 88, '00'O));</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/19588">change 19588</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/+/19588"/><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: Ie58a6175e55ab2679dc69f9e191d0efc0e84cde0 </div>
<div style="display:none"> Gerrit-Change-Number: 19588 </div>
<div style="display:none"> Gerrit-PatchSet: 3 </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: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>