<p>daniel has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21525">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">gbproxy: Fail on timeout in f_send_paging_xs_exp_one_bss<br><br>These functions would not set a verdict in case no message was ever<br>received. This patch ensures that a timeout while waiting for a paging<br>message actually fails the test.<br><br>Change-Id: If71db2d37d67d02c5d9550202128ee3470762964<br>Related: SYS#5002<br>---<br>M gbproxy/GBProxy_Tests.ttcn<br>1 file changed, 18 insertions(+), 6 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/25/21525/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/gbproxy/GBProxy_Tests.ttcn b/gbproxy/GBProxy_Tests.ttcn</span><br><span>index a84d346..714a56d 100644</span><br><span>--- a/gbproxy/GBProxy_Tests.ttcn</span><br><span>+++ b/gbproxy/GBProxy_Tests.ttcn</span><br><span>@@ -1140,6 +1140,7 @@</span><br><span> boolean use_sig := false,integer pcu_idx := 0)</span><br><span> runs on BSSGP_ConnHdlr {</span><br><span> var template (present) PDU_BSSGP exp_rx;</span><br><span style="color: hsl(120, 100%, 40%);">+ var boolean test_done := false;</span><br><span> /* doesn't really make sense: Sending to a single BVCI means the message ends up</span><br><span> * at that BVC (cell) only, and paging all over the BSS area is not possible */</span><br><span> exp_rx := f_send_paging_ps(p4, sgsn_idx, use_sig);</span><br><span>@@ -1147,15 +1148,17 @@</span><br><span> timer T := 2.0;</span><br><span> T.start;</span><br><span> alt {</span><br><span style="color: hsl(0, 100%, 40%);">- [not use_sig] PCU[pcu_idx].receive(exp_rx) {</span><br><span style="color: hsl(120, 100%, 40%);">+ [not use_sig and not test_done] PCU[pcu_idx].receive(exp_rx) {</span><br><span> setverdict(pass);</span><br><span style="color: hsl(120, 100%, 40%);">+ test_done := true;</span><br><span> repeat;</span><br><span> }</span><br><span> [not use_sig] PCU_SIG[pcu_idx].receive(exp_rx) {</span><br><span> setverdict(fail, "Received paging on SIGNALING BVC, expected PTP BVC");</span><br><span> }</span><br><span style="color: hsl(0, 100%, 40%);">- [use_sig] PCU_SIG[pcu_idx].receive(exp_rx) {</span><br><span style="color: hsl(120, 100%, 40%);">+ [use_sig and not test_done] PCU_SIG[pcu_idx].receive(exp_rx) {</span><br><span> setverdict(pass);</span><br><span style="color: hsl(120, 100%, 40%);">+ test_done := true;</span><br><span> repeat;</span><br><span> }</span><br><span> [use_sig] PCU[pcu_idx].receive(exp_rx) {</span><br><span>@@ -1173,7 +1176,10 @@</span><br><span> [] any from PCU_SIG.receive(PDU_BSSGP:{pDU_BSSGP_PAGING_PS:=?}) {</span><br><span> setverdict(fail, "Different Paging than expected on SIGNALING BVC");</span><br><span> }</span><br><span style="color: hsl(0, 100%, 40%);">- [] T.timeout;</span><br><span style="color: hsl(120, 100%, 40%);">+ [not test_done] T.timeout {</span><br><span style="color: hsl(120, 100%, 40%);">+ setverdict(fail, "Timeout waiting for paging");</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+ [test_done] T.timeout;</span><br><span> }</span><br><span> }</span><br><span> </span><br><span>@@ -1555,6 +1561,7 @@</span><br><span> boolean use_sig := false,integer pcu_idx := 0)</span><br><span> runs on BSSGP_ConnHdlr {</span><br><span> var template (present) PDU_BSSGP exp_rx;</span><br><span style="color: hsl(120, 100%, 40%);">+ var boolean test_done := false;</span><br><span> /* doesn't really make sense: Sending to a single BVCI means the message ends up</span><br><span> * at that BVC (cell) only, and paging all over the BSS area is not possible */</span><br><span> exp_rx := f_send_paging_cs(p4, sgsn_idx, use_sig);</span><br><span>@@ -1562,15 +1569,17 @@</span><br><span> timer T := 2.0;</span><br><span> T.start;</span><br><span> alt {</span><br><span style="color: hsl(0, 100%, 40%);">- [not use_sig] PCU[pcu_idx].receive(exp_rx) {</span><br><span style="color: hsl(120, 100%, 40%);">+ [not use_sig and not test_done] PCU[pcu_idx].receive(exp_rx) {</span><br><span> setverdict(pass);</span><br><span style="color: hsl(120, 100%, 40%);">+ test_done := true;</span><br><span> repeat;</span><br><span> }</span><br><span> [not use_sig] PCU_SIG[pcu_idx].receive(exp_rx) {</span><br><span> setverdict(fail, "Received paging on SIGNALING BVC, expected PTP BVC");</span><br><span> }</span><br><span style="color: hsl(0, 100%, 40%);">- [use_sig] PCU_SIG[pcu_idx].receive(exp_rx) {</span><br><span style="color: hsl(120, 100%, 40%);">+ [use_sig and not test_done] PCU_SIG[pcu_idx].receive(exp_rx) {</span><br><span> setverdict(pass);</span><br><span style="color: hsl(120, 100%, 40%);">+ test_done := true;</span><br><span> repeat;</span><br><span> }</span><br><span> [use_sig] PCU[pcu_idx].receive(exp_rx) {</span><br><span>@@ -1588,7 +1597,10 @@</span><br><span> [] any from PCU_SIG.receive(PDU_BSSGP:{pDU_BSSGP_PAGING_CS:=?}) {</span><br><span> setverdict(fail, "Different Paging than expected on SIGNALING BVC");</span><br><span> }</span><br><span style="color: hsl(0, 100%, 40%);">- [] T.timeout;</span><br><span style="color: hsl(120, 100%, 40%);">+ [not test_done] T.timeout {</span><br><span style="color: hsl(120, 100%, 40%);">+ setverdict(fail, "Timeout while waiting for paging")</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+ [test_done] T.timeout;</span><br><span> }</span><br><span> }</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21525">change 21525</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/+/21525"/><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: If71db2d37d67d02c5d9550202128ee3470762964 </div>
<div style="display:none"> Gerrit-Change-Number: 21525 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: daniel <dwillmann@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>