<p>Neels Hofmeyr has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/13613">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">msc: clear the failed SMS when a test is done<br><br>If an MT SMS is triggered and not handled in the test, it is so far left behind<br>when the test ends. That causes Paging to retrigger for that SMS at any later<br>point during subsequent test runs, causing stray bogus test failures.<br><br>Actually remove the SMS from the SMS database and the queue with a new VTY<br>command: The vty command to clear failed SMS from the db is added in osmo-msc<br>I637cbd7adc075a192f49752b38779391472ff06d<br><br>Depends: I637cbd7adc075a192f49752b38779391472ff06d (osmo-msc)<br>Change-Id: I4ff05187131e93f5bc58dc7ea44546f770e5b4c1<br>---<br>M msc/MSC_Tests.ttcn<br>1 file changed, 13 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/13/13613/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn</span><br><span>index 13d1ddb..8aa6199 100644</span><br><span>--- a/msc/MSC_Tests.ttcn</span><br><span>+++ b/msc/MSC_Tests.ttcn</span><br><span>@@ -1994,6 +1994,13 @@</span><br><span>         f_vty_transceive(MSCVTY, "subscriber imsi "&imsi&" sms sender msisdn "&msisdn&" send "&text);</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+/* Remove still pending SMS */</span><br><span style="color: hsl(120, 100%, 40%);">+private function f_vty_sms_clear(charstring imsi)</span><br><span style="color: hsl(120, 100%, 40%);">+runs on BSC_ConnHdlr {</span><br><span style="color: hsl(120, 100%, 40%);">+   f_vty_transceive(MSCVTY, "subscriber imsi " & imsi & " sms delete-all");</span><br><span style="color: hsl(120, 100%, 40%);">+  f_vty_transceive(MSCVTY, "sms-queue clear");</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> /* LU followed by MT SMS */</span><br><span> private function f_tc_lu_and_mt_sms(charstring id, BSC_ConnHdlrPars pars) runs on BSC_ConnHdlr {</span><br><span>       var SmsParameters spars := valueof(t_SmsPars);</span><br><span>@@ -2088,6 +2095,8 @@</span><br><span>               }</span><br><span>    }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ f_vty_sms_clear(hex2str(g_pars.imsi));</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>     setverdict(pass);</span><br><span> }</span><br><span> testcase TC_lu_and_mt_sms_paging_and_nothing() runs on MTC_CT {</span><br><span>@@ -4456,8 +4465,8 @@</span><br><span>     * MSC/VLR would re-try to deliver the test SMS trigered above and</span><br><span>    * so the screening would fail. */</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-  /* Expire the subscriber now to avoid that the MSC will try the SMS</span><br><span style="color: hsl(0, 100%, 40%);">-      * delivery at some later point. */</span><br><span style="color: hsl(120, 100%, 40%);">+   f_vty_sms_clear(hex2str(g_pars.imsi));</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>     f_vty_transceive(MSCVTY, "subscriber imsi " & hex2str(g_pars.imsi) & " expire");</span><br><span> </span><br><span>     setverdict(pass);</span><br><span>@@ -4514,16 +4523,14 @@</span><br><span>          }</span><br><span>    }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ f_vty_sms_clear(hex2str(g_pars.imsi));</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>     /* A rejected paging with IMSI_unknown (see above) should always send</span><br><span>         * the SGs association to NULL. */</span><br><span>   f_ctrl_get_exp(IPA_CTRL, "fsm.SGs-UE.id.imsi:" & hex2str(g_pars.imsi) & ".state", "SGs-NULL");</span><br><span> </span><br><span>     f_sgsap_bssmap_screening();</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- /* Expire the subscriber now to avoid that the MSC will try the SMS</span><br><span style="color: hsl(0, 100%, 40%);">-      * delivery at some later point. */</span><br><span style="color: hsl(0, 100%, 40%);">-     f_vty_transceive(MSCVTY, "subscriber imsi " & hex2str(g_pars.imsi) & " expire");</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span>         setverdict(pass);</span><br><span> }</span><br><span> testcase TC_sgsap_mt_sms_and_reject() runs on MTC_CT {</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/13613">change 13613</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/13613"/><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: I4ff05187131e93f5bc58dc7ea44546f770e5b4c1 </div>
<div style="display:none"> Gerrit-Change-Number: 13613 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Neels Hofmeyr <nhofmeyr@sysmocom.de> </div>